summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-28 13:07:24 +0000
committerrubidium <rubidium@openttd.org>2007-01-28 13:07:24 +0000
commit5d3ad5601d54e5dcea533c2de6bd6ebebcbd59d8 (patch)
tree64708c358e3e2e8ae5077392e4be4032839b0a8e /src/network
parent508dc154df8d845d84a2ed24ff801fc760cfe577 (diff)
downloadopenttd-5d3ad5601d54e5dcea533c2de6bd6ebebcbd59d8.tar.xz
(svn r8437) -Codechange: move often duplicated (in MSU) define to the udp header.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/core/udp.h1
-rw-r--r--src/network/network_udp.cpp2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/network/core/udp.h b/src/network/core/udp.h
index bd8f4c2ad..1d09675ef 100644
--- a/src/network/core/udp.h
+++ b/src/network/core/udp.h
@@ -90,6 +90,7 @@ enum PacketUDPType {
};
#define DECLARE_UDP_RECEIVE_COMMAND(type) virtual void NetworkPacketReceive_## type ##_command(Packet *p, const struct sockaddr_in *)
+#define DEF_UDP_RECEIVE_COMMAND(cls, type) void cls ##NetworkUDPSocketHandler::NetworkPacketReceive_ ## type ## _command(Packet *p, const struct sockaddr_in *client_addr)
/** Base socket handler for all UDP sockets */
class NetworkUDPSocketHandler : public NetworkSocketHandler {
diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp
index 2b7fe7d94..ceea85973 100644
--- a/src/network/network_udp.cpp
+++ b/src/network/network_udp.cpp
@@ -32,8 +32,6 @@ NetworkUDPSocketHandler *_udp_client_socket; ///< udp client socket
NetworkUDPSocketHandler *_udp_server_socket; ///< udp server socket
NetworkUDPSocketHandler *_udp_master_socket; ///< udp master socket
-#define DEF_UDP_RECEIVE_COMMAND(cls, type) void cls ##NetworkUDPSocketHandler::NetworkPacketReceive_ ## type ## _command(Packet *p, const struct sockaddr_in *client_addr)
-
///*** Communication with the masterserver ***/
class MasterNetworkUDPSocketHandler : public NetworkUDPSocketHandler {