summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-10-04 20:00:56 +0000
committerrubidium <rubidium@openttd.org>2009-10-04 20:00:56 +0000
commit5ff6053326c060c0c717a0b5745423dda92d7af9 (patch)
treecc22e4d6ce8af11fa57166e92c49e4c5ca9ba1a2 /src/network/core
parent1ee5520854db0f7097554da048c28b389326a0c6 (diff)
downloadopenttd-5ff6053326c060c0c717a0b5745423dda92d7af9.tar.xz
(svn r17699) -Codechange: move #ifdef ENABLE_NETWORK till after the 'generic' includes so compilation without network support doesn't get broken as easily by changes in header files
Diffstat (limited to 'src/network/core')
-rw-r--r--src/network/core/address.h4
-rw-r--r--src/network/core/core.h4
-rw-r--r--src/network/core/game.h4
-rw-r--r--src/network/core/packet.h4
-rw-r--r--src/network/core/tcp.h4
-rw-r--r--src/network/core/tcp_content.h4
-rw-r--r--src/network/core/tcp_game.h4
-rw-r--r--src/network/core/udp.h4
8 files changed, 16 insertions, 16 deletions
diff --git a/src/network/core/address.h b/src/network/core/address.h
index 72631220c..6385c5d02 100644
--- a/src/network/core/address.h
+++ b/src/network/core/address.h
@@ -12,13 +12,13 @@
#ifndef NETWORK_ADDRESS_H
#define NETWORK_ADDRESS_H
-#ifdef ENABLE_NETWORK
-
#include "os_abstraction.h"
#include "config.h"
#include "../../string_func.h"
#include "../../core/smallmap_type.hpp"
+#ifdef ENABLE_NETWORK
+
class NetworkAddress;
typedef SmallVector<NetworkAddress, 4> NetworkAddressList;
typedef SmallMap<NetworkAddress, SOCKET, 4> SocketList;
diff --git a/src/network/core/core.h b/src/network/core/core.h
index c14bc83a9..a47ebff87 100644
--- a/src/network/core/core.h
+++ b/src/network/core/core.h
@@ -14,11 +14,11 @@
#ifndef NETWORK_CORE_H
#define NETWORK_CORE_H
-#ifdef ENABLE_NETWORK
-
#include "os_abstraction.h"
#include "../../newgrf_config.h"
+#ifdef ENABLE_NETWORK
+
bool NetworkCoreInitialize();
void NetworkCoreShutdown();
diff --git a/src/network/core/game.h b/src/network/core/game.h
index ab94481db..c82c5aefe 100644
--- a/src/network/core/game.h
+++ b/src/network/core/game.h
@@ -15,12 +15,12 @@
#ifndef NETWORK_CORE_GAME_H
#define NETWORK_CORE_GAME_H
-#ifdef ENABLE_NETWORK
-
#include "config.h"
#include "../../newgrf_config.h"
#include "../../date_type.h"
+#ifdef ENABLE_NETWORK
+
/**
* The game information that is not generated on-the-fly and has to
* be sent to the clients.
diff --git a/src/network/core/packet.h b/src/network/core/packet.h
index 32340263c..6b5442e0e 100644
--- a/src/network/core/packet.h
+++ b/src/network/core/packet.h
@@ -14,11 +14,11 @@
#ifndef NETWORK_CORE_PACKET_H
#define NETWORK_CORE_PACKET_H
-#ifdef ENABLE_NETWORK
-
#include "config.h"
#include "core.h"
+#ifdef ENABLE_NETWORK
+
typedef uint16 PacketSize; ///< Size of the whole packet.
typedef uint8 PacketType; ///< Identifier for the packet
diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h
index fa3f0a12e..c368339ef 100644
--- a/src/network/core/tcp.h
+++ b/src/network/core/tcp.h
@@ -14,13 +14,13 @@
#ifndef NETWORK_CORE_TCP_H
#define NETWORK_CORE_TCP_H
-#ifdef ENABLE_NETWORK
-
#include "os_abstraction.h"
#include "address.h"
#include "core.h"
#include "packet.h"
+#ifdef ENABLE_NETWORK
+
/** Base socket handler for all TCP sockets */
class NetworkTCPSocketHandler : public NetworkSocketHandler {
private:
diff --git a/src/network/core/tcp_content.h b/src/network/core/tcp_content.h
index b1b100817..2c54641eb 100644
--- a/src/network/core/tcp_content.h
+++ b/src/network/core/tcp_content.h
@@ -14,13 +14,13 @@
#ifndef NETWORK_CORE_CONTENT_H
#define NETWORK_CORE_CONTENT_H
-#ifdef ENABLE_NETWORK
-
#include "os_abstraction.h"
#include "tcp.h"
#include "packet.h"
#include "../../debug.h"
+#ifdef ENABLE_NETWORK
+
/** The values in the enum are important; they are used as database 'keys' */
enum ContentType {
CONTENT_TYPE_BEGIN = 1, ///< Helper to mark the begin of the types
diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h
index 080fab7d2..7c049dfe3 100644
--- a/src/network/core/tcp_game.h
+++ b/src/network/core/tcp_game.h
@@ -14,13 +14,13 @@
#ifndef NETWORK_CORE_TCP_GAME_H
#define NETWORK_CORE_TCP_GAME_H
-#ifdef ENABLE_NETWORK
-
#include "os_abstraction.h"
#include "tcp.h"
#include "packet.h"
#include "../../core/pool_type.hpp"
+#ifdef ENABLE_NETWORK
+
/**
* Enum with all types of UDP packets.
* The order of the first 4 packets MUST not be changed, as
diff --git a/src/network/core/udp.h b/src/network/core/udp.h
index 106c48dde..b36c1c8b2 100644
--- a/src/network/core/udp.h
+++ b/src/network/core/udp.h
@@ -71,8 +71,6 @@
#ifndef NETWORK_CORE_UDP_H
#define NETWORK_CORE_UDP_H
-#ifdef ENABLE_NETWORK
-
#include "os_abstraction.h"
#include "address.h"
#include "core.h"
@@ -80,6 +78,8 @@
#include "packet.h"
#include "../../debug.h"
+#ifdef ENABLE_NETWORK
+
/** Enum with all types of UDP packets. The order MUST not be changed **/
enum PacketUDPType {
PACKET_UDP_CLIENT_FIND_SERVER, ///< Queries a game server for game information