summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-03-20 15:30:57 +0000
committeralberth <alberth@openttd.org>2010-03-20 15:30:57 +0000
commitf05a8635fdaea2bf3e9148a070d3750afbba8ebc (patch)
tree4a02a67c38cdf022a8c068ecb316dcbde16a640b /src/rail_cmd.cpp
parent073f627930ba7816302afe10dcd2b44031c70fb6 (diff)
downloadopenttd-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.cpp3
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();