summaryrefslogtreecommitdiff
path: root/src/macros.h
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2007-11-20 14:11:19 +0000
committerskidd13 <skidd13@openttd.org>2007-11-20 14:11:19 +0000
commita91c2a4c395fc532ada8a097ff05b41d69d7ee3d (patch)
tree4c9dc0c05cd700da1675c02c334dcc834adf512c /src/macros.h
parenteeaa348f8bfafae1a6e56b857a97d9d23577dcac (diff)
downloadopenttd-a91c2a4c395fc532ada8a097ff05b41d69d7ee3d.tar.xz
(svn r11485) -Codechange: Remove the doubled function ToggleBitT and rename the remaining to fit with the naming style
Diffstat (limited to 'src/macros.h')
-rw-r--r--src/macros.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/macros.h b/src/macros.h
index 4ad64c032..71ecb4c1e 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -279,9 +279,9 @@ template<typename T> static inline T ClrBit(T& x, const uint8 y)
* @param y The bit position to toggle
* @return The new value of the old value with the bit toggled
*/
-template<typename T> static inline T TOGGLEBIT(T& x, const uint8 y)
+template<typename T> static inline T ToggleBit(T& x, const uint8 y)
{
- return x ^= (T)1U << y;
+ return x = (T)(x ^ (T)(1U << y));
}