mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
math.big: remove unnecessary casting from Integer.is_power_of_2/0 (#24614)
This commit is contained in:
parent
5e2ce5f3e1
commit
0d00eb712c
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue