summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-12-25 19:58:50 +0000
committeralberth <alberth@openttd.org>2010-12-25 19:58:50 +0000
commitd2564a3e56aca3ca6b253eb2b2c8f4911102d498 (patch)
tree90a96e6d17f946c0bf680d39b6a551dcd74a2c3b /src
parent2c41b8ee97f4b6211a4cb88dc4df460b615470fb (diff)
downloadopenttd-d2564a3e56aca3ca6b253eb2b2c8f4911102d498.tar.xz
(svn r21638) -Codechange (r1): Simplify testing that outersize.x is bigger than 0.
Diffstat (limited to 'src')
-rw-r--r--src/viewport.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 3fcc45125..be0118aad 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -1040,8 +1040,7 @@ static void DrawTileSelection(const TileInfo *ti)
}
/* Check if it's inside the outer area? */
- if (!is_redsq && _thd.outersize.x &&
- _thd.size.x < _thd.size.x + _thd.outersize.x &&
+ if (!is_redsq && _thd.outersize.x > 0 &&
IsInsideBS(ti->x, _thd.pos.x + _thd.offs.x, _thd.size.x + _thd.outersize.x) &&
IsInsideBS(ti->y, _thd.pos.y + _thd.offs.y, _thd.size.y + _thd.outersize.y)) {
/* Draw a blue rect. */