From 95c877cf7171baf54a886583cadb84c231944915 Mon Sep 17 00:00:00 2001 From: belugas Date: Wed, 11 Jul 2007 01:45:44 +0000 Subject: (svn r10504) -Codechange: Shorten the test if no track bit has been found --- src/town_cmd.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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; -- cgit v1.2.3-70-g09d2