mirror of https://github.com/OpenTTD/OpenTTD
(svn r11379) -Fix r11378: KillFirstBit2x64 accepts and returns unsigned variables, not signed, so enforce that a bit
parent
038817a708
commit
508c13d1f9
|
@ -421,9 +421,9 @@ Faster ( or at least cleaner ) implementation below?
|
||||||
* @param value The value to clear the first bit
|
* @param value The value to clear the first bit
|
||||||
* @return The new value with the first bit cleared
|
* @return The new value with the first bit cleared
|
||||||
*/
|
*/
|
||||||
static inline int KillFirstBit2x64(int value)
|
static inline uint KillFirstBit2x64(uint value)
|
||||||
{
|
{
|
||||||
return value &= (int)(value - 1) | 0x3FFFC0C0;
|
return value &= (uint)(value - 1) | 0x3FFFC0C0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue