From c2816a9cad9d94d1734d64ab89237c925fa57620 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 5 Sep 2015 15:13:34 +0300 Subject: Fix compilation warnings. --- src/CMakeLists.txt | 1 + src/Makefile.am | 1 + src/net/character.h | 2 ++ src/net/characters.h | 37 +++++++++++++++++++++++++++++++++++++ src/net/charserverhandler.h | 4 ++-- src/net/chathandler.h | 2 ++ 6 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 src/net/characters.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a91afbc07..85629bf12 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -527,6 +527,7 @@ SET(SRCS gui/windows/worldselectdialog.h net/adminhandler.h net/character.h + net/characters.h net/charserverhandler.cpp net/charserverhandler.h net/chathandler.h diff --git a/src/Makefile.am b/src/Makefile.am index ba83b5fcb..fe04346ef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1146,6 +1146,7 @@ manaplus_SOURCES += main.cpp \ net/beinghandler.h \ net/buysellhandler.h \ net/character.h \ + net/characters.h \ net/charserverhandler.cpp \ net/charserverhandler.h \ net/chathandler.h \ diff --git a/src/net/character.h b/src/net/character.h index 4e30d18eb..9a014c312 100644 --- a/src/net/character.h +++ b/src/net/character.h @@ -57,6 +57,8 @@ struct Character final uint16_t slot; /**< The index in the list of characters */ }; +typedef std::list Characters; + } // namespace Net #endif // NET_CHARACTER_H diff --git a/src/net/characters.h b/src/net/characters.h new file mode 100644 index 000000000..f9c4802b4 --- /dev/null +++ b/src/net/characters.h @@ -0,0 +1,37 @@ +/* + * The ManaPlus Client + * Copyright (C) 2009 The Mana World Development Team + * Copyright (C) 2009-2010 The Mana Developers + * Copyright (C) 2011-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_CHARACTERS_H +#define NET_CHARACTERS_H + +#include + +#include "localconsts.h" + +namespace Net +{ + class Character; + + typedef std::list Characters; +} // namespace Net + +#endif // NET_CHARACTERS_H diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h index 6d0c58d7f..7a6a78a7c 100644 --- a/src/net/charserverhandler.h +++ b/src/net/charserverhandler.h @@ -25,6 +25,8 @@ #include "being/localplayer.h" +#include "net/characters.h" + class CharCreateDialog; class CharSelectDialog; @@ -33,8 +35,6 @@ namespace Net struct Character; -typedef std::list Characters; - class CharServerHandler notfinal { public: diff --git a/src/net/chathandler.h b/src/net/chathandler.h index f8659a8b2..630946498 100644 --- a/src/net/chathandler.h +++ b/src/net/chathandler.h @@ -23,6 +23,7 @@ #ifndef NET_CHATHANDLER_H #define NET_CHATHANDLER_H +#include #include #include "localconsts.h" @@ -31,6 +32,7 @@ struct ChatObject; namespace Net { + class ChatHandler notfinal { public: -- cgit v1.2.3-70-g09d2