commit ecee1cae454ad5924f4698caaa712348858d9179 (tree)
parent 94c47855ec8291c5f582a983a79f3b2287dfaaca
Author: Zander Khan <git@zander.xyz>
Date: Sat, 16 Jan 2021 17:48:55 +0000
Remove magic number
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/std/priority_dequeue.zig b/lib/std/priority_dequeue.zig
@@ -81,7 +81,7 @@ pub fn PriorityDequeue(comptime T: type) type {
// next two are on a max layer;
// next four are on a min layer, and so on.
const leading_zeros = @clz(usize, index + 1);
- const highest_set_bit = 63 - leading_zeros;
+ const highest_set_bit = @bitSizeOf(usize) - 1 - leading_zeros;
return (highest_set_bit & 1) == 0;
}