summaryrefslogtreecommitdiff
path: root/src/network/core/tcp_game.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-22 14:23:36 +0000
committersmatz <smatz@openttd.org>2009-05-22 14:23:36 +0000
commit04723b240ebc7384954f73590be517ad2a47ce04 (patch)
treeac4bd41288d9d96a256ea0c702d1a75502bfecd9 /src/network/core/tcp_game.h
parentb687ac51ee5e8628ed56319df573c903c0c86ef3 (diff)
downloadopenttd-04723b240ebc7384954f73590be517ad2a47ce04.tar.xz
(svn r16377) -Codechange: unify FOR_ALL_* macros, use separate index variable instead of var->index
Diffstat (limited to 'src/network/core/tcp_game.h')
-rw-r--r--src/network/core/tcp_game.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h
index 3bbb3ac0a..bfc82f17f 100644
--- a/src/network/core/tcp_game.h
+++ b/src/network/core/tcp_game.h
@@ -108,8 +108,8 @@ public:
void Send_Command(Packet *p, const CommandPacket *cp);
};
-#define FOR_ALL_CLIENT_SOCKETS_FROM(d, start) for (d = NetworkClientSocket::Get(start); d != NULL; d = (d->index + 1U < NetworkClientSocket::GetPoolSize()) ? NetworkClientSocket::Get(d->index + 1U) : NULL) if (d->IsValid())
-#define FOR_ALL_CLIENT_SOCKETS(d) FOR_ALL_CLIENT_SOCKETS_FROM(d, 0)
+#define FOR_ALL_CLIENT_SOCKETS_FROM(var, start) FOR_ALL_ITEMS_FROM(NetworkClientSocket, clientsocket_index, var, start)
+#define FOR_ALL_CLIENT_SOCKETS(var) FOR_ALL_CLIENT_SOCKETS_FROM(var, 0)
#endif /* ENABLE_NETWORK */