diff --git a/lib/std/priority_dequeue.zig b/lib/std/priority_dequeue.zig index 9df8c07f7eedd524410e9a0f52970f20165c821e..5dd861bcbd45773a138874a97291fdacb95bc17c 100644 --- 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; }