diff options
-rw-r--r-- | aoc/2021/15/part-one.zig | 2 | ||||
-rw-r--r-- | aoc/2021/15/part-two.zig | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/aoc/2021/15/part-one.zig b/aoc/2021/15/part-one.zig index a99e1cb..700bcf4 100644 --- a/aoc/2021/15/part-one.zig +++ b/aoc/2021/15/part-one.zig @@ -12,7 +12,7 @@ const Risk = packed struct { v: u18, pub fn lt(self: Risk, other: Risk) Order { - return order(@bitCast(u32, self), @bitCast(u32, other)); + return order(self.v, other.v); } pub fn move(self: Risk, queue: *PQ(Risk), dx: i8, dy: i8) !void { diff --git a/aoc/2021/15/part-two.zig b/aoc/2021/15/part-two.zig index cc77035..452a6c9 100644 --- a/aoc/2021/15/part-two.zig +++ b/aoc/2021/15/part-two.zig @@ -12,7 +12,7 @@ const Risk = packed struct { v: u22, pub fn lt(self: Risk, other: Risk) Order { - return order(@bitCast(u40, self), @bitCast(u40, other)); + return order(self.v, other.v); } pub fn move(self: Risk, queue: *PQ(Risk), dx: i10, dy: i10) !void { |