summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-07-11 01:45:44 +0000
committerbelugas <belugas@openttd.org>2007-07-11 01:45:44 +0000
commit5111c6205cedc91c336c30f641d731ecee1afc74 (patch)
tree3d0d4cf723cd789cd3035a654b5acd22da966e83 /src
parent8b174417046e403ad0b1ade6bcd64f42c4f68f39 (diff)
downloadopenttd-5111c6205cedc91c336c30f641d731ecee1afc74.tar.xz
(svn r10504) -Codechange: Shorten the test if no track bit has been found
Diffstat (limited to 'src')
-rw-r--r--src/town_cmd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index bff65782b..1fce94752 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -640,6 +640,7 @@ static RoadBits GetTownRoadMask(TileIndex tile)
TrackBits b = GetAnyRoadTrackBits(tile, ROADTYPE_ROAD);
RoadBits r = ROAD_NONE;
+ if (b == TRACK_BIT_NONE) return r;
if (b & TRACK_BIT_X) r |= ROAD_X;
if (b & TRACK_BIT_Y) r |= ROAD_Y;
if (b & TRACK_BIT_UPPER) r |= ROAD_NE | ROAD_NW;