diff options
author | belugas <belugas@openttd.org> | 2007-07-11 01:45:44 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2007-07-11 01:45:44 +0000 |
commit | 95c877cf7171baf54a886583cadb84c231944915 (patch) | |
tree | 3d0d4cf723cd789cd3035a654b5acd22da966e83 /src | |
parent | b9db8ecf41d62d7885331e2c641b4c522675d881 (diff) | |
download | openttd-95c877cf7171baf54a886583cadb84c231944915.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.cpp | 1 |
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; |