From 46454b631d5fd78e07bb292328526639539b7ce3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 14 Dec 2015 20:05:49 +0300 Subject: Move netconsts.h into const directory. --- src/CMakeLists.txt | 2 +- src/Makefile.am | 2 +- src/client.cpp | 3 ++- src/const/net/net.h | 36 ++++++++++++++++++++++++++++++++++++ src/defaults.cpp | 2 +- src/net/netconsts.h | 36 ------------------------------------ 6 files changed, 41 insertions(+), 40 deletions(-) create mode 100644 src/const/net/net.h delete mode 100644 src/net/netconsts.h (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 47a15746c..2638c9f08 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -557,7 +557,7 @@ SET(SRCS net/npchandler.h net/net.cpp net/net.h - net/netconsts.h + const/net/net.h net/partyhandler.h enums/net/partyshare.h enums/net/servertype.h diff --git a/src/Makefile.am b/src/Makefile.am index eb452277d..930f1916c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1216,7 +1216,7 @@ manaplus_SOURCES += main.cpp \ net/messageout.h \ net/net.cpp \ net/net.h \ - net/netconsts.h \ + const/net/net.h \ net/npchandler.h \ net/partyhandler.h \ net/pethandler.h \ diff --git a/src/client.cpp b/src/client.cpp index d97ae9742..c61d9ef2d 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -43,6 +43,8 @@ #include "being/playerinfo.h" #include "being/playerrelations.h" +#include "const/net/net.h" + #include "input/inputmanager.h" #include "input/joystick.h" #include "input/keyboardconfig.h" @@ -84,7 +86,6 @@ #include "net/ipc.h" #include "net/loginhandler.h" #include "net/net.h" -#include "net/netconsts.h" #include "net/updatetypeoperators.h" #include "net/packetlimiter.h" #include "net/partyhandler.h" diff --git a/src/const/net/net.h b/src/const/net/net.h new file mode 100644 index 000000000..a0bc58eee --- /dev/null +++ b/src/const/net/net.h @@ -0,0 +1,36 @@ +/* + * The ManaPlus Client + * Copyright (C) 2013-2015 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONST_NET_NET_H +#define CONST_NET_NET_H + +#if defined(__GXX_EXPERIMENTAL_CXX0X__) +#include +#else +#include +#endif + +#ifdef TMWA_SUPPORT +static const uint16_t DEFAULT_PORT = 6901; +#else +static const uint16_t DEFAULT_PORT = 6900; +#endif + +#endif // CONST_NET_NET_H diff --git a/src/defaults.cpp b/src/defaults.cpp index 2dce71236..2324ee6fd 100644 --- a/src/defaults.cpp +++ b/src/defaults.cpp @@ -34,7 +34,7 @@ #include "render/graphics.h" -#include "net/netconsts.h" +#include "const/net/net.h" #ifndef USE_SDL2 #include diff --git a/src/net/netconsts.h b/src/net/netconsts.h deleted file mode 100644 index 50b2349be..000000000 --- a/src/net/netconsts.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * The ManaPlus Client - * Copyright (C) 2013-2015 The ManaPlus Developers - * - * This file is part of The ManaPlus Client. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifndef NET_NETCONSTS_H -#define NET_NETCONSTS_H - -#if defined(__GXX_EXPERIMENTAL_CXX0X__) -#include -#else -#include -#endif - -#ifdef TMWA_SUPPORT -static const uint16_t DEFAULT_PORT = 6901; -#else -static const uint16_t DEFAULT_PORT = 6900; -#endif - -#endif // NET_NETCONSTS_H -- cgit v1.2.3-70-g09d2