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/network | |
parent | 0b489f99249a8c62ee3826e490ed17f29377581c (diff) | |
download | openttd-ee7a8eebca774666cd3625431a86dd05113b5e88.tar.xz |
Codechange: Replace FOR_ALL_TOWNS with range-based for loops
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_chat_gui.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index adaf6978c..07348c048 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -347,9 +347,7 @@ struct NetworkChatWindow : public Window { * Not that the following assumes all town indices are adjacent, ie no * towns have been deleted. */ if (*item < (uint)MAX_CLIENT_SLOTS + Town::GetPoolSize()) { - const Town *t; - - FOR_ALL_TOWNS_FROM(t, *item - MAX_CLIENT_SLOTS) { + for (const Town *t : Town::Iterate(*item - MAX_CLIENT_SLOTS)) { /* Get the town-name via the string-system */ SetDParam(0, t->index); GetString(chat_tab_temp_buffer, STR_TOWN_NAME, lastof(chat_tab_temp_buffer)); |