diff options
author | alberth <alberth@openttd.org> | 2010-02-06 09:27:04 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-02-06 09:27:04 +0000 |
commit | 3f2c4d744a1b2abae15229b32a0692ed2c0033ee (patch) | |
tree | 06d1bc2e4618df5e2c144f0f30172ba1105686df /src | |
parent | 32db019d9ed66a3dfefc5e289ee6b0822968c326 (diff) | |
download | openttd-3f2c4d744a1b2abae15229b32a0692ed2c0033ee.tar.xz |
(svn r19026) -Codechange: Move a constant computation out of the loop.
Diffstat (limited to 'src')
-rw-r--r-- | src/smallmap_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index 223b07b17..9dfc2c289 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -518,10 +518,10 @@ class SmallMapWindow : public Window { void DrawSmallMapColumn(void *dst, uint xc, uint yc, int pitch, int reps, int start_pos, int end_pos, Blitter *blitter, GetSmallMapPixels *proc) const { void *dst_ptr_abs_end = blitter->MoveTo(_screen.dst_ptr, 0, _screen.height); + uint min_xy = _settings_game.construction.freeform_edges ? 1 : 0; do { /* Check if the tile (xc,yc) is within the map range */ - uint min_xy = _settings_game.construction.freeform_edges ? 1 : 0; if (IsInsideMM(xc, min_xy, MapMaxX()) && IsInsideMM(yc, min_xy, MapMaxY())) { /* Check if the dst pointer points to a pixel inside the screen buffer */ if (dst < _screen.dst_ptr) continue; |