diff options
author | glx <glx@openttd.org> | 2019-12-17 22:04:09 +0100 |
---|---|---|
committer | Niels Martin Hansen <nielsm@indvikleren.dk> | 2019-12-21 20:13:03 +0100 |
commit | ee7a8eebca774666cd3625431a86dd05113b5e88 (patch) | |
tree | 7a7843a2ffae14db6e15933eb1bb29923945ddb0 /src/smallmap_gui.cpp | |
parent | 0b489f99249a8c62ee3826e490ed17f29377581c (diff) | |
download | openttd-ee7a8eebca774666cd3625431a86dd05113b5e88.tar.xz |
Codechange: Replace FOR_ALL_TOWNS with range-based for loops
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r-- | src/smallmap_gui.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp index d8816265d..00f682f63 100644 --- a/src/smallmap_gui.cpp +++ b/src/smallmap_gui.cpp @@ -914,8 +914,7 @@ void SmallMapWindow::DrawVehicles(const DrawPixelInfo *dpi, Blitter *blitter) co */ void SmallMapWindow::DrawTowns(const DrawPixelInfo *dpi) const { - const Town *t; - FOR_ALL_TOWNS(t) { + for (const Town *t : Town::Iterate()) { /* Remap the town coordinate */ Point pt = this->RemapTile(TileX(t->xy), TileY(t->xy)); int x = pt.x - this->subscroll - (t->cache.sign.width_small >> 1); |