(svn r21638) -Codechange (r1): Simplify testing that outersize.x is bigger than 0.

This commit is contained in:
alberth 2010-12-25 19:58:50 +00:00
parent 2c41b8ee97
commit d2564a3e56

View File

@ -1040,8 +1040,7 @@ static void DrawTileSelection(const TileInfo *ti)
} }
/* Check if it's inside the outer area? */ /* Check if it's inside the outer area? */
if (!is_redsq && _thd.outersize.x && if (!is_redsq && _thd.outersize.x > 0 &&
_thd.size.x < _thd.size.x + _thd.outersize.x &&
IsInsideBS(ti->x, _thd.pos.x + _thd.offs.x, _thd.size.x + _thd.outersize.x) && 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)) { IsInsideBS(ti->y, _thd.pos.y + _thd.offs.y, _thd.size.y + _thd.outersize.y)) {
/* Draw a blue rect. */ /* Draw a blue rect. */