diff options
author | alberth <alberth@openttd.org> | 2010-07-24 10:14:39 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-07-24 10:14:39 +0000 |
commit | be6c0584240caf420b2475a0be036391e842e8af (patch) | |
tree | 6111751cf5526e1eb41176782d84766c4e9ed185 /src/rail_cmd.cpp | |
parent | 645b6ce77345867fa96861843197481131566c46 (diff) | |
download | openttd-be6c0584240caf420b2475a0be036391e842e8af.tar.xz |
(svn r20211) -Codechange: Indented code should have curly braces around it.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index eedfe7546..e866046a5 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -562,8 +562,9 @@ CommandCost CmdRemoveSingleRail(TileIndex tile, DoCommandFlag flags, uint32 p1, cost.AddCost(RailClearCost(GetRailType(tile))); /* Charge extra to remove signals on the track, if they are there */ - if (HasSignalOnTrack(tile, track)) + if (HasSignalOnTrack(tile, track)) { cost.AddCost(DoCommand(tile, track, 0, flags, CMD_REMOVE_SIGNALS)); + } if (flags & DC_EXEC) { if (HasReservedTracks(tile, trackbit)) { @@ -703,12 +704,10 @@ static CommandCost ValidateAutoDrag(Trackdir *trackdir, TileIndex start, TileInd } /* validate the direction */ - while ( - (trdx <= 0 && dx > 0) || - (trdx >= 0 && dx < 0) || - (trdy <= 0 && dy > 0) || - (trdy >= 0 && dy < 0) - ) { + while ((trdx <= 0 && dx > 0) || + (trdx >= 0 && dx < 0) || + (trdy <= 0 && dy > 0) || + (trdy >= 0 && dy < 0)) { if (!HasBit(*trackdir, 3)) { // first direction is invalid, try the other SetBit(*trackdir, 3); // reverse the direction trdx = -trdx; |