summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-05-09 10:35:13 +0000
committerpeter1138 <peter1138@openttd.org>2006-05-09 10:35:13 +0000
commitde12d4a207f04339c9b193edfa72d13590bb30ed (patch)
tree751b7b80c3e712fa29e31f784b9bd83a7c7324d6
parentc9defc0fea20dc900c0c6d3f8aac8984b024052f (diff)
downloadopenttd-de12d4a207f04339c9b193edfa72d13590bb30ed.tar.xz
(svn r4791) - Codechange: Mark road bits as unsigned. Fixes warning with older gcc versions.
-rw-r--r--road.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/road.h b/road.h
index 1d8d4b862..a7860af28 100644
--- a/road.h
+++ b/road.h
@@ -4,10 +4,10 @@
#define ROAD_H
typedef enum RoadBits {
- ROAD_NW = 1,
- ROAD_SW = 2,
- ROAD_SE = 4,
- ROAD_NE = 8,
+ ROAD_NW = 1U,
+ ROAD_SW = 2U,
+ ROAD_SE = 4U,
+ ROAD_NE = 8U,
ROAD_X = ROAD_SW | ROAD_NE,
ROAD_Y = ROAD_NW | ROAD_SE,
ROAD_ALL = ROAD_X | ROAD_Y
@@ -20,7 +20,7 @@ static inline RoadBits ComplementRoadBits(RoadBits r)
static inline RoadBits DiagDirToRoadBits(DiagDirection d)
{
- return 1 << (3 ^ d);
+ return 1U << (3 ^ d);
}
#endif