mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
Remove magic number
This commit is contained in:
parent
94c47855ec
commit
ecee1cae45
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue