summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortron <tron@openttd.org>2007-02-25 11:59:26 +0000
committertron <tron@openttd.org>2007-02-25 11:59:26 +0000
commite981e0a55318659a06bfeff60e09ad720c2bed8d (patch)
tree39dda58df56e01a938b0a0aa5d414fb74689524f /src
parent311af1a956ac7beda22061503999e185a81f129d (diff)
downloadopenttd-e981e0a55318659a06bfeff60e09ad720c2bed8d.tar.xz
(svn r8901) -Fix
Get rid of DECLARE_ENUM_AS_BIT_INDEX(Trackdir, TrackdirBits) and DECLARE_ENUM_AS_BIT_INDEX() altogether
Diffstat (limited to 'src')
-rw-r--r--src/helpers.hpp7
-rw-r--r--src/rail.h1
2 files changed, 0 insertions, 8 deletions
diff --git a/src/helpers.hpp b/src/helpers.hpp
index d0071ae0b..9f4cf0c82 100644
--- a/src/helpers.hpp
+++ b/src/helpers.hpp
@@ -70,13 +70,6 @@ template <typename T> static inline T delta(T a, T b) { return a < b ? b - a : a
FORCEINLINE mask_t& operator ^= (mask_t& m1, mask_t m2) {m1 = m1 ^ m2; return m1;} \
FORCEINLINE mask_t operator ~(mask_t m) {return (mask_t)(~(int)m);}
-/** probably redundant enum combining operators (as we have conversion functions)
- * but the old code is full of such arithmetics */
-# define DECLARE_ENUM_AS_BIT_INDEX(idx_t, mask_t) \
- FORCEINLINE mask_t operator << (int m, idx_t i) {return (mask_t)(m << (int)i);} \
- FORCEINLINE mask_t operator << (mask_t m, int i) {return (mask_t)(((int)m) << i);} \
- FORCEINLINE mask_t operator >> (mask_t m, int i) {return (mask_t)(((int)m) >> i);}
-
/** Informative template class exposing basic enumeration properties used by several
* other templates below. Here we have only forward declaration. For each enum type
diff --git a/src/rail.h b/src/rail.h
index 622fa60c0..81b085f4e 100644
--- a/src/rail.h
+++ b/src/rail.h
@@ -161,7 +161,6 @@ typedef enum TrackdirBits {
template <> struct EnumPropsT<TrackdirBits> : MakeEnumPropsT<TrackdirBits, uint16, TRACKDIR_BIT_NONE, TRACKDIR_BIT_MASK, INVALID_TRACKDIR_BIT> {};
typedef TinyEnumT<TrackdirBits> TrackdirBitsShort;
DECLARE_ENUM_AS_BIT_SET(TrackdirBits);
-DECLARE_ENUM_AS_BIT_INDEX(Trackdir, TrackdirBits);
/** This struct contains all the info that is needed to draw and construct tracks.
*/