diff --git a/sources.cmake b/sources.cmake index 76867d6aa..b406c9462 100644 --- a/sources.cmake +++ b/sources.cmake @@ -1,5 +1,5 @@ # Modify this file to change the last-modified date when you add/remove a file. -# This will then trigger a new cmake run automatically. +# This will then trigger a new cmake run automatically. file(GLOB_RECURSE STK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.hpp") file(GLOB_RECURSE STK_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp") file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*") diff --git a/src/network/network.cpp b/src/network/network.cpp index 65b6c72f2..bd8dc3a18 100755 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -21,6 +21,7 @@ #include "config/user_config.hpp" #include "io/file_manager.hpp" #include "network/network_string.hpp" +#include "network/transport_address.hpp" #include "utils/time.hpp" #include diff --git a/src/network/network.hpp b/src/network/network.hpp index a677cbf52..1196f3b25 100644 --- a/src/network/network.hpp +++ b/src/network/network.hpp @@ -22,8 +22,8 @@ #ifndef HEADER_NETWORK_HPP #define HEADER_NETWORK_HPP -#include "network/types.hpp" #include "utils/synchronised.hpp" +#include "utils/types.hpp" // enet.h includes win32.h, which without lean_and_mean includes // winspool.h, which defines MAX_PRIORITY as a macro, which then @@ -31,7 +31,10 @@ #define WIN32_LEAN_AND_MEAN #include +#include + class NetworkString; +class TransportAddress; /** \class EnetHost * A small wrapper around enet to allow sending and receiving diff --git a/src/network/protocol.hpp b/src/network/protocol.hpp index a1a5e9e8b..c4353441a 100644 --- a/src/network/protocol.hpp +++ b/src/network/protocol.hpp @@ -24,7 +24,6 @@ #define PROTOCOL_HPP #include "network/network_string.hpp" -#include "network/types.hpp" #include "utils/leak_check.hpp" #include "utils/no_copy.hpp" #include "utils/types.hpp" diff --git a/src/network/protocols/client_lobby_room_protocol.hpp b/src/network/protocols/client_lobby_room_protocol.hpp index ae73cc22d..05d834706 100644 --- a/src/network/protocols/client_lobby_room_protocol.hpp +++ b/src/network/protocols/client_lobby_room_protocol.hpp @@ -2,7 +2,7 @@ #define CLIENT_LOBBY_ROOM_PROTOCOL_HPP #include "network/protocols/lobby_room_protocol.hpp" -#include "network/types.hpp" +#include "network/transport_address.hpp" class STKPeer; diff --git a/src/network/protocols/connect_to_peer.hpp b/src/network/protocols/connect_to_peer.hpp index a74efeeb8..d64cf59bc 100644 --- a/src/network/protocols/connect_to_peer.hpp +++ b/src/network/protocols/connect_to_peer.hpp @@ -20,7 +20,7 @@ #define CONNECT_TO_SERVER_HPP #include "network/protocol.hpp" -#include "network/types.hpp" +#include "network/transport_address.hpp" #include "utils/cpp2011.hpp" #include diff --git a/src/network/protocols/connect_to_server.hpp b/src/network/protocols/connect_to_server.hpp index eaab38e4e..4fbaacbd9 100644 --- a/src/network/protocols/connect_to_server.hpp +++ b/src/network/protocols/connect_to_server.hpp @@ -20,7 +20,7 @@ #define CONNECT_TO_SERVER_HPP #include "network/protocol.hpp" -#include "network/types.hpp" +#include "network/transport_address.hpp" #include "utils/cpp2011.hpp" #include diff --git a/src/network/protocols/get_peer_address.hpp b/src/network/protocols/get_peer_address.hpp index bda7e857c..de59cb9c3 100644 --- a/src/network/protocols/get_peer_address.hpp +++ b/src/network/protocols/get_peer_address.hpp @@ -20,6 +20,7 @@ #define GET_PEER_ADDRESS_HPP #include "network/protocol.hpp" +#include "network/transport_address.hpp" namespace Online { class XMLRequest; } diff --git a/src/network/protocols/ping_protocol.hpp b/src/network/protocols/ping_protocol.hpp index 70d2a7662..2dc8e1666 100644 --- a/src/network/protocols/ping_protocol.hpp +++ b/src/network/protocols/ping_protocol.hpp @@ -2,7 +2,7 @@ #define PING_PROTOCOL_HPP #include "network/protocol.hpp" - +#include "network/transport_address.hpp" class PingProtocol : public Protocol { diff --git a/src/network/stk_host.hpp b/src/network/stk_host.hpp index 020e05c39..c1d3e92f5 100644 --- a/src/network/stk_host.hpp +++ b/src/network/stk_host.hpp @@ -24,7 +24,7 @@ #include "network/network.hpp" #include "network/network_string.hpp" -#include "network/types.hpp" +#include "network/transport_address.hpp" #include "utils/synchronised.hpp" // enet.h includes win32.h, which without lean_and_mean includes diff --git a/src/network/stk_peer.cpp b/src/network/stk_peer.cpp index 1e29c787c..f842ed9d6 100644 --- a/src/network/stk_peer.cpp +++ b/src/network/stk_peer.cpp @@ -19,7 +19,7 @@ #include "network/stk_peer.hpp" #include "network/game_setup.hpp" #include "network/network_string.hpp" -#include "network/types.hpp" +#include "network/transport_address.hpp" #include "utils/log.hpp" #include diff --git a/src/network/types.hpp b/src/network/transport_address.hpp similarity index 98% rename from src/network/types.hpp rename to src/network/transport_address.hpp index b4ff0beb8..809d49760 100644 --- a/src/network/types.hpp +++ b/src/network/transport_address.hpp @@ -19,8 +19,8 @@ /*! \file types.hpp * \brief Declares the general types that are used by the network. */ -#ifndef HEADER_NETWORK_TYPES_HPP -#define HEADER_NETWORK_TYPES_HPP +#ifndef HEADER_TRANSPORT_ADDRESS_HPP +#define HEADER_TRANSPORT_ADDRESS_HPP #include "utils/no_copy.hpp" #include "utils/string_utils.hpp"