| ... | @@ -81,7 +81,7 @@ pub fn PriorityDequeue(comptime T: type) type { | ... | @@ -81,7 +81,7 @@ pub fn PriorityDequeue(comptime T: type) type { |
| 81 | // next two are on a max layer; | 81 | // next two are on a max layer; |
| 82 | // next four are on a min layer, and so on. | 82 | // next four are on a min layer, and so on. |
| 83 | const leading_zeros = @clz(usize, index + 1); | 83 | const leading_zeros = @clz(usize, index + 1); |
| 84 | const highest_set_bit = 63 - leading_zeros; | 84 | const highest_set_bit = @bitSizeOf(usize) - 1 - leading_zeros; |
| 85 | return (highest_set_bit & 1) == 0; | 85 | return (highest_set_bit & 1) == 0; |
| 86 | } | 86 | } |
| 87 | | 87 | |