From 82fc28f77f4ba1d613c1930781f77b45e4af5121 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 15 Jan 2010 16:41:15 +0000 Subject: (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header --- src/network/core/core.cpp | 1 + src/network/core/core.h | 1 - src/network/core/host.h | 2 ++ src/network/core/tcp.h | 2 -- src/network/core/tcp_game.cpp | 1 + src/network/core/tcp_game.h | 2 +- src/network/core/udp.cpp | 1 + src/network/core/udp.h | 3 --- src/network/network.cpp | 2 +- src/network/network.h | 1 - src/network/network_base.h | 2 ++ src/network/network_chat_gui.cpp | 4 +++- src/network/network_client.cpp | 2 ++ src/network/network_client.h | 2 ++ src/network/network_command.cpp | 4 ++-- src/network/network_content.h | 1 - src/network/network_content_gui.cpp | 1 + src/network/network_func.h | 2 +- src/network/network_gui.cpp | 4 +++- src/network/network_gui.h | 2 ++ src/network/network_internal.h | 6 ------ src/network/network_server.cpp | 5 +++-- src/network/network_server.h | 2 ++ src/network/network_type.h | 3 --- src/network/network_udp.cpp | 2 ++ src/network/network_udp.h | 2 ++ 26 files changed, 34 insertions(+), 26 deletions(-) (limited to 'src/network') diff --git a/src/network/core/core.cpp b/src/network/core/core.cpp index 76049f6fb..4c724e47e 100644 --- a/src/network/core/core.cpp +++ b/src/network/core/core.cpp @@ -15,6 +15,7 @@ #include "../../stdafx.h" #include "../../debug.h" +#include "os_abstraction.h" #include "packet.h" diff --git a/src/network/core/core.h b/src/network/core/core.h index a47ebff87..bf013909a 100644 --- a/src/network/core/core.h +++ b/src/network/core/core.h @@ -14,7 +14,6 @@ #ifndef NETWORK_CORE_H #define NETWORK_CORE_H -#include "os_abstraction.h" #include "../../newgrf_config.h" #ifdef ENABLE_NETWORK diff --git a/src/network/core/host.h b/src/network/core/host.h index 48f24e318..46bfa4e1f 100644 --- a/src/network/core/host.h +++ b/src/network/core/host.h @@ -14,6 +14,8 @@ #ifndef NETWORK_CORE_HOST_H #define NETWORK_CORE_HOST_H +#include "address.h" + void NetworkFindBroadcastIPs(NetworkAddressList *broadcast); #endif /* NETWORK_CORE_HOST_H */ diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index b24e241f1..b9866cc4e 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -14,9 +14,7 @@ #ifndef NETWORK_CORE_TCP_H #define NETWORK_CORE_TCP_H -#include "os_abstraction.h" #include "address.h" -#include "core.h" #include "packet.h" #ifdef ENABLE_NETWORK diff --git a/src/network/core/tcp_game.cpp b/src/network/core/tcp_game.cpp index 027498ea1..ec41d1327 100644 --- a/src/network/core/tcp_game.cpp +++ b/src/network/core/tcp_game.cpp @@ -15,6 +15,7 @@ #include "../../stdafx.h" +#include "../network.h" #include "../network_internal.h" #include "../../core/pool_func.hpp" diff --git a/src/network/core/tcp_game.h b/src/network/core/tcp_game.h index 7c049dfe3..a678c247a 100644 --- a/src/network/core/tcp_game.h +++ b/src/network/core/tcp_game.h @@ -16,7 +16,7 @@ #include "os_abstraction.h" #include "tcp.h" -#include "packet.h" +#include "../network_type.h" #include "../../core/pool_type.hpp" #ifdef ENABLE_NETWORK diff --git a/src/network/core/udp.cpp b/src/network/core/udp.cpp index c9bbcf353..e855bdfcf 100644 --- a/src/network/core/udp.cpp +++ b/src/network/core/udp.cpp @@ -15,6 +15,7 @@ #include "../../stdafx.h" #include "../../date_func.h" +#include "../../debug.h" #include "udp.h" /** diff --git a/src/network/core/udp.h b/src/network/core/udp.h index b36c1c8b2..82435d9ff 100644 --- a/src/network/core/udp.h +++ b/src/network/core/udp.h @@ -71,12 +71,9 @@ #ifndef NETWORK_CORE_UDP_H #define NETWORK_CORE_UDP_H -#include "os_abstraction.h" #include "address.h" -#include "core.h" #include "game.h" #include "packet.h" -#include "../../debug.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network.cpp b/src/network/network.cpp index 899ca88c8..c57703efb 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -16,12 +16,12 @@ #include "../strings_func.h" #include "../command_func.h" #include "../date_func.h" -#include "network_internal.h" #include "network_client.h" #include "network_server.h" #include "network_content.h" #include "network_udp.h" #include "network_gamelist.h" +#include "network_base.h" #include "core/udp.h" #include "core/host.h" #include "network_gui.h" diff --git a/src/network/network.h b/src/network/network.h index 41569b26c..3dd63d03c 100644 --- a/src/network/network.h +++ b/src/network/network.h @@ -12,7 +12,6 @@ #ifndef NETWORK_H #define NETWORK_H -#include "../company_type.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network_base.h b/src/network/network_base.h index 4ed03e1f2..ff204062f 100644 --- a/src/network/network_base.h +++ b/src/network/network_base.h @@ -15,7 +15,9 @@ #ifdef ENABLE_NETWORK #include "network_type.h" +#include "core/address.h" #include "../core/pool_type.hpp" +#include "../company_type.h" typedef Pool NetworkClientInfoPool; extern NetworkClientInfoPool _networkclientinfo_pool; diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index 522106b80..f10d51a2b 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -24,8 +24,10 @@ #include "../querystring_gui.h" #include "../town.h" #include "../window_func.h" -#include "network_internal.h" +#include "../core/geometry_func.hpp" +#include "network.h" #include "network_client.h" +#include "network_base.h" #include "table/strings.h" diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 592c210de..688a21ef0 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -26,6 +26,8 @@ #include "../company_base.h" #include "../company_gui.h" #include "../rev.h" +#include "network.h" +#include "network_base.h" #include "table/strings.h" diff --git a/src/network/network_client.h b/src/network/network_client.h index c987340ca..17562fcec 100644 --- a/src/network/network_client.h +++ b/src/network/network_client.h @@ -14,6 +14,8 @@ #ifdef ENABLE_NETWORK +#include "network_internal.h" + DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_GAME_INFO); DEF_CLIENT_SEND_COMMAND(PACKET_CLIENT_COMPANY_INFO); DEF_CLIENT_SEND_COMMAND_PARAM(PACKET_CLIENT_COMMAND)(const CommandPacket *cp); diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index 834d28da4..7e849cf9a 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -13,13 +13,13 @@ #include "../stdafx.h" #include "../debug.h" -#include "network_internal.h" #include "network_client.h" +#include "network.h" #include "../command_func.h" #include "../company_func.h" /** Table with all the callbacks we'll use for conversion*/ -static const CommandCallback * const _callback_table[] = { +static CommandCallback * const _callback_table[] = { /* 0x00 */ NULL, /* 0x01 */ CcBuildPrimaryVehicle, /* 0x02 */ CcBuildAirport, diff --git a/src/network/network_content.h b/src/network/network_content.h index aa9a1ffbd..ad9ab3783 100644 --- a/src/network/network_content.h +++ b/src/network/network_content.h @@ -13,7 +13,6 @@ #define NETWORK_CONTENT_H #include "core/tcp_content.h" -#include "../core/smallvec_type.hpp" #if defined(ENABLE_NETWORK) diff --git a/src/network/network_content_gui.cpp b/src/network/network_content_gui.cpp index 7d3c223db..af6bcc9bc 100644 --- a/src/network/network_content_gui.cpp +++ b/src/network/network_content_gui.cpp @@ -19,6 +19,7 @@ #include "../base_media_base.h" #include "../sortlist_type.h" #include "../querystring_gui.h" +#include "../core/geometry_func.hpp" #include "network_content.h" #include "table/strings.h" diff --git a/src/network/network_func.h b/src/network/network_func.h index e6e6a30fd..02cc131f5 100644 --- a/src/network/network_func.h +++ b/src/network/network_func.h @@ -16,8 +16,8 @@ #include "network_type.h" #include "../console_type.h" #include "../gfx_type.h" -#include "../core/smallvec_type.hpp" #include "../openttd.h" +#include "../company_type.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index 6b39c8afe..d8c8dd390 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -14,10 +14,11 @@ #include "../strings_func.h" #include "../date_func.h" #include "../fios.h" -#include "network_internal.h" #include "network_client.h" #include "network_gui.h" #include "network_gamelist.h" +#include "network.h" +#include "network_base.h" #include "../gui.h" #include "network_udp.h" #include "../window_func.h" @@ -27,6 +28,7 @@ #include "../sortlist_type.h" #include "../company_base.h" #include "../company_func.h" +#include "../core/geometry_func.hpp" #include "table/strings.h" #include "../table/sprites.h" diff --git a/src/network/network_gui.h b/src/network/network_gui.h index eb64e1ed7..a196c75e9 100644 --- a/src/network/network_gui.h +++ b/src/network/network_gui.h @@ -12,6 +12,8 @@ #ifndef NETWORK_GUI_H #define NETWORK_GUI_H +#include "../company_type.h" +#include "../economy_type.h" #include "../window_type.h" #include "network_type.h" diff --git a/src/network/network_internal.h b/src/network/network_internal.h index 6e5da115c..0d6814b60 100644 --- a/src/network/network_internal.h +++ b/src/network/network_internal.h @@ -12,13 +12,7 @@ #ifndef NETWORK_INTERNAL_H #define NETWORK_INTERNAL_H -#include "network.h" #include "network_func.h" -#include "network_base.h" -#include "core/os_abstraction.h" -#include "core/core.h" -#include "core/config.h" -#include "core/packet.h" #include "core/tcp_game.h" #include "../command_type.h" diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 89d97ae50..8e68f5c97 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -14,12 +14,13 @@ #include "../stdafx.h" #include "../debug.h" #include "../strings_func.h" -#include "network_internal.h" -#include "../vehicle_base.h" #include "../date_func.h" #include "network_server.h" #include "network_udp.h" +#include "network.h" +#include "network_base.h" #include "../console_func.h" +#include "../company_base.h" #include "../command_func.h" #include "../saveload/saveload.h" #include "../station_base.h" diff --git a/src/network/network_server.h b/src/network/network_server.h index 2e52a07b5..8e7342a9e 100644 --- a/src/network/network_server.h +++ b/src/network/network_server.h @@ -14,6 +14,8 @@ #ifdef ENABLE_NETWORK +#include "network_internal.h" + DEF_SERVER_SEND_COMMAND(PACKET_SERVER_MAP); DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR_QUIT)(NetworkClientSocket *cs, ClientID client_id, NetworkErrorCode errorno); DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR)(NetworkClientSocket *cs, NetworkErrorCode error); diff --git a/src/network/network_type.h b/src/network/network_type.h index 4d5fcee69..f023fe985 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -12,9 +12,6 @@ #ifndef NETWORK_TYPE_H #define NETWORK_TYPE_H -#include "../company_type.h" -#include "../economy_type.h" -#include "core/config.h" #include "core/game.h" #ifdef ENABLE_NETWORK diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index be6e01e33..817fb40d6 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -19,9 +19,11 @@ #include "../stdafx.h" #include "../date_func.h" #include "../map_func.h" +#include "../debug.h" #include "network_gamelist.h" #include "network_internal.h" #include "network_udp.h" +#include "network.h" #include "../core/endian_func.hpp" #include "../company_base.h" #include "../thread/thread.h" diff --git a/src/network/network_udp.h b/src/network/network_udp.h index 4200391cb..bd315baba 100644 --- a/src/network/network_udp.h +++ b/src/network/network_udp.h @@ -14,6 +14,8 @@ #ifdef ENABLE_NETWORK +#include "core/address.h" + void NetworkUDPInitialize(); void NetworkUDPSearchGame(); void NetworkUDPQueryMasterServer(); -- cgit v1.2.3-70-g09d2