diff options
author | alberth <alberth@openttd.org> | 2010-03-20 15:30:57 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-03-20 15:30:57 +0000 |
commit | f05a8635fdaea2bf3e9148a070d3750afbba8ebc (patch) | |
tree | 4a02a67c38cdf022a8c068ecb316dcbde16a640b /src/rail_cmd.cpp | |
parent | 073f627930ba7816302afe10dcd2b44031c70fb6 (diff) | |
download | openttd-f05a8635fdaea2bf3e9148a070d3750afbba8ebc.tar.xz |
(svn r19483) -Codechange: Code layout fixes, and parentheses reduction.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 71a5f3dde..c25ba9107 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -727,8 +727,7 @@ static CommandCost ValidateAutoDrag(Trackdir *trackdir, TileIndex start, TileInd if (!IsDiagonalTrackdir(*trackdir)) { trdx = _trackdelta[*trackdir].x; trdy = _trackdelta[*trackdir].y; - if (abs(dx) != abs(dy) && abs(dx) + abs(trdy) != abs(dy) + abs(trdx)) - return CMD_ERROR; + if (abs(dx) != abs(dy) && abs(dx) + abs(trdy) != abs(dy) + abs(trdx)) return CMD_ERROR; } return CommandCost(); |