summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-11-04 18:32:51 +0000
committertruelight <truelight@openttd.org>2007-11-04 18:32:51 +0000
commit508c13d1f975d599e6742f6e7fdcfa279e57ebf9 (patch)
treef7c1fe808cc4f478ac2b83f3328d2118bcad162c
parent038817a7087749db6b4797a3ab97a692252ca8f2 (diff)
downloadopenttd-508c13d1f975d599e6742f6e7fdcfa279e57ebf9.tar.xz
(svn r11379) -Fix r11378: KillFirstBit2x64 accepts and returns unsigned variables, not signed, so enforce that a bit
-rw-r--r--src/macros.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/macros.h b/src/macros.h
index e4b7bf203..260c87e50 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -421,9 +421,9 @@ Faster ( or at least cleaner ) implementation below?
* @param value The value to clear the first bit
* @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;
}
/**