diff options
author | rubidium <rubidium@openttd.org> | 2009-07-22 16:56:36 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-22 16:56:36 +0000 |
commit | 3bcfa7c52ad592ccfaf58ad499e78fd89aea6722 (patch) | |
tree | 93679153f8b75af75846228e5cd2c1a1a1ed0296 /src/ai | |
parent | 13a7c550ad86f94bdf0dca83cd402cfd1ca6e8ba (diff) | |
download | openttd-3bcfa7c52ad592ccfaf58ad499e78fd89aea6722.tar.xz |
(svn r16917) -Codechange: fix some GCC 4.5 'case X is not in enum Y' warnings
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/api/ai_road.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/ai/api/ai_road.cpp b/src/ai/api/ai_road.cpp index fd3ec11d9..f5489348f 100644 --- a/src/ai/api/ai_road.cpp +++ b/src/ai/api/ai_road.cpp @@ -266,14 +266,14 @@ static int32 LookupWithBuildOnSlopes(::Slope slope, Array *existing, int32 start case SLOPE_W: /* A slope similar to a SLOPE_W. */ switch (new_roadbits) { - case 6: // ROAD_SE | ROAD_SW: - case 9: // ROAD_NE | ROAD_NW: - case 12: // ROAD_NE | ROAD_SE: + case ROAD_N: + case ROAD_E: + case ROAD_S: /* Cannot build anything with a turn from the low side. */ return 0; - case 5: // ROAD_SE | ROAD_NW: - case 10: // ROAD_NE | ROAD_SW: + case ROAD_X: + case ROAD_Y: /* A 'sloped' tile is going to be build. */ if ((existing_roadbits | new_roadbits) != new_roadbits) { /* There is already a foundation on the tile, or at least @@ -282,25 +282,25 @@ static int32 LookupWithBuildOnSlopes(::Slope slope, Array *existing, int32 start } /* If the start is in the low part, it is automatically * building the second part too. */ - return ((start_roadbits & (ROAD_NE | ROAD_SE)) && !(existing_roadbits & (ROAD_SW | ROAD_NW))) ? 2 : 1; + return ((start_roadbits & ROAD_E) && !(existing_roadbits & ROAD_W)) ? 2 : 1; default: /* Roadbits causing a foundation are going to be build. * When the existing roadbits are slopes (the lower bits * are used), this cannot be done. */ if ((existing_roadbits | new_roadbits) == new_roadbits) return 1; - return (existing_roadbits & (ROAD_NE | ROAD_SE)) ? 0 : 1; + return (existing_roadbits & ROAD_E) ? 0 : 1; } case SLOPE_SW: /* A slope similar to a SLOPE_SW. */ switch (new_roadbits) { - case 9: // ROAD_NE | ROAD_NW: - case 12: // ROAD_NE | ROAD_SE: + case ROAD_N: + case ROAD_E: /* Cannot build anything with a turn from the low side. */ return 0; - case 10: // ROAD_NE | ROAD_SW: + case ROAD_X: /* A 'sloped' tile is going to be build. */ if ((existing_roadbits | new_roadbits) != new_roadbits) { /* There is already a foundation on the tile, or at least |