From d2564a3e56aca3ca6b253eb2b2c8f4911102d498 Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 25 Dec 2010 19:58:50 +0000 Subject: (svn r21638) -Codechange (r1): Simplify testing that outersize.x is bigger than 0. --- src/viewport.cpp | 3 +-- 1 file changed, 1 insertion(+), 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. */ -- cgit v1.2.3-54-g00ecf