summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2013-08-10 12:47:10 +0000
committerfonsinchen <fonsinchen@openttd.org>2013-08-10 12:47:10 +0000
commit6777059c15feba7deb59957116a63718a22a928d (patch)
tree26777660b2730477de23af24a88a1ad3d145f3e8 /src
parent94add80602de7ad3f0957f7310d0f0f775c9d731 (diff)
downloadopenttd-6777059c15feba7deb59957116a63718a22a928d.tar.xz
(svn r25707) -Fix: apply coding style wrt if/else
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_industrytiles.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/newgrf_industrytiles.cpp b/src/newgrf_industrytiles.cpp
index 1d7ec08ae..65e3c530d 100644
--- a/src/newgrf_industrytiles.cpp
+++ b/src/newgrf_industrytiles.cpp
@@ -212,15 +212,13 @@ bool DrawNewIndustryTile(TileInfo *ti, Industry *i, IndustryGfx gfx, const Indus
IndustryTileResolverObject object(gfx, ti->tile, i);
const SpriteGroup *group = SpriteGroup::Resolve(inds->grf_prop.spritegroup[0], &object);
- if (group == NULL || group->type != SGT_TILELAYOUT) {
- return false;
- } else {
- /* Limit the building stage to the number of stages supplied. */
- const TileLayoutSpriteGroup *tlgroup = (const TileLayoutSpriteGroup *)group;
- byte stage = GetIndustryConstructionStage(ti->tile);
- IndustryDrawTileLayout(ti, tlgroup, i->random_colour, stage, gfx);
- return true;
- }
+ if (group == NULL || group->type != SGT_TILELAYOUT) return false;
+
+ /* Limit the building stage to the number of stages supplied. */
+ const TileLayoutSpriteGroup *tlgroup = (const TileLayoutSpriteGroup *)group;
+ byte stage = GetIndustryConstructionStage(ti->tile);
+ IndustryDrawTileLayout(ti, tlgroup, i->random_colour, stage, gfx);
+ return true;
}
extern bool IsSlopeRefused(Slope current, Slope refused);