mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-12 09:59:59 +00:00
changed the patch files that we can also use them with busybox for testing in Woodpecker
This commit is contained in:
@@ -1,8 +1,20 @@
|
||||
46c46
|
||||
< if (my_scale == 0) @compileError("Scale 1:0 is not valid!");
|
||||
---
|
||||
> if (my_scale == 0) my_scale = 1; //@compileError("Scale 1:0 is not valid!");
|
||||
72c72
|
||||
< var scale: u32 = undefined;
|
||||
---
|
||||
> comptime var scale: u32 = undefined;
|
||||
--- exercises/068_comptime3.zig 2023-10-03 22:15:22.125574535 +0200
|
||||
+++ answers/068_comptime3.zig 2023-10-05 20:04:07.149435295 +0200
|
||||
@@ -43,7 +43,7 @@
|
||||
//
|
||||
// Please change this so that it sets a 0 scale to 1
|
||||
// instead.
|
||||
- if (my_scale == 0) @compileError("Scale 1:0 is not valid!");
|
||||
+ if (my_scale == 0) my_scale = 1; //@compileError("Scale 1:0 is not valid!");
|
||||
|
||||
self.scale = my_scale;
|
||||
self.hull_length /= my_scale;
|
||||
@@ -69,7 +69,7 @@
|
||||
// Hey, we can't just pass this runtime variable as an
|
||||
// argument to the scaleMe() method. What would let us do
|
||||
// that?
|
||||
- var scale: u32 = undefined;
|
||||
+ comptime var scale: u32 = undefined;
|
||||
|
||||
scale = 32; // 1:32 scale
|
||||
|
||||
|
||||
Reference in New Issue
Block a user