mirror of
https://github.com/vlang/v.git
synced 2025-08-03 17:57:59 -04:00
math.big: remove unnecessary casting from Integer.is_power_of_2/0 (#24614)
This commit is contained in:
parent
5e2ce5f3e1
commit
0d00eb712c
@ -1224,7 +1224,7 @@ pub fn (x Integer) is_power_of_2() bool {
|
||||
return false
|
||||
}
|
||||
}
|
||||
n := u32(x.digits.last())
|
||||
n := x.digits.last()
|
||||
return n & (n - u32(1)) == 0
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user