summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-20 21:19:59 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-20 21:19:59 +0300
commita9f6959a96395edc64ff57bf5ba1d75cca8e86c3 (patch)
treef6975bea7e87380ee7d063ccfb2efbc835341c91 /src/net/ea
parent3e8fecc9a62afff0054fa0fa23af86c8ef15a1c9 (diff)
downloadmanaplus-a9f6959a96395edc64ff57bf5ba1d75cca8e86c3.tar.gz
manaplus-a9f6959a96395edc64ff57bf5ba1d75cca8e86c3.tar.bz2
manaplus-a9f6959a96395edc64ff57bf5ba1d75cca8e86c3.tar.xz
manaplus-a9f6959a96395edc64ff57bf5ba1d75cca8e86c3.zip
Add missing const in net directory.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/charserverhandler.cpp3
-rw-r--r--src/net/ea/charserverhandler.h6
-rw-r--r--src/net/ea/chathandler.cpp2
-rw-r--r--src/net/ea/chathandler.h2
-rw-r--r--src/net/ea/gamehandler.cpp2
-rw-r--r--src/net/ea/gamehandler.h4
-rw-r--r--src/net/ea/inventoryhandler.cpp6
-rw-r--r--src/net/ea/inventoryhandler.h8
-rw-r--r--src/net/ea/loginhandler.cpp2
-rw-r--r--src/net/ea/loginhandler.h2
10 files changed, 19 insertions, 18 deletions
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index 75d83f490..28ed96bab 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -44,6 +44,7 @@ CharServerHandler::CharServerHandler() :
}
void CharServerHandler::setCharSelectDialog(CharSelectDialog *const window)
+ const
{
mCharSelectDialog = window;
updateCharSelectDialog();
@@ -69,7 +70,7 @@ unsigned int CharServerHandler::maxSprite() const
return EA_SPRITE_VECTOREND;
}
-void CharServerHandler::clear()
+void CharServerHandler::clear() const
{
delete_all(mCharacters);
mCharacters.clear();
diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h
index e1972af05..c16328a82 100644
--- a/src/net/ea/charserverhandler.h
+++ b/src/net/ea/charserverhandler.h
@@ -36,7 +36,7 @@ class CharServerHandler notfinal : public Net::CharServerHandler
public:
A_DELETE_COPY(CharServerHandler)
- void setCharSelectDialog(CharSelectDialog *const window)
+ void setCharSelectDialog(CharSelectDialog *const window) const
override final;
void requestCharacters() override final;
@@ -47,9 +47,9 @@ class CharServerHandler notfinal : public Net::CharServerHandler
unsigned int maxSprite() const override final A_CONST A_WARN_UNUSED;
- virtual void connect() = 0;
+ virtual void connect() const = 0;
- void clear() override final;
+ void clear() const override final;
protected:
CharServerHandler();
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 9b485c2d0..8ce8ec59d 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -41,7 +41,7 @@ ChatHandler::ChatHandler()
ChatRecv::mSkipping = true;
}
-void ChatHandler::clear()
+void ChatHandler::clear() const
{
ChatRecv::mShowMotd = config.getBoolValue("showmotd");
ChatRecv::mSkipping = true;
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h
index cf0044fcd..9a67b79b1 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/ea/chathandler.h
@@ -42,7 +42,7 @@ class ChatHandler notfinal : public Net::ChatHandler
void me(const std::string &restrict text,
const std::string &restrict channel) const override final;
- void clear() override final;
+ void clear() const override final;
};
} // namespace Ea
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index 782601b50..397e10a29 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -47,7 +47,7 @@ void GameHandler::setMap(const std::string &map)
GameRecv::mMap = map.substr(0, map.rfind("."));
}
-void GameHandler::clear()
+void GameHandler::clear() const
{
GameRecv::mMap.clear();
GameRecv::mCharID = BeingId_zero;
diff --git a/src/net/ea/gamehandler.h b/src/net/ea/gamehandler.h
index a12a918cc..c18333ab5 100644
--- a/src/net/ea/gamehandler.h
+++ b/src/net/ea/gamehandler.h
@@ -40,9 +40,9 @@ class GameHandler notfinal : public Net::GameHandler
bool removeDeadBeings() const override final A_WARN_UNUSED
{ return true; }
- virtual void setMap(const std::string &map);
+ static void setMap(const std::string &map);
- void clear() override final;
+ void clear() const override final;
void initEngines() const override final;
};
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 81fc0103a..9a3b5a442 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -54,7 +54,7 @@ InventoryHandler::~InventoryHandler()
delete2(InventoryRecv::mStorage);
}
-void InventoryHandler::clear()
+void InventoryHandler::clear() const
{
delete2(InventoryRecv::mStorage);
}
@@ -98,7 +98,7 @@ size_t InventoryHandler::getSize(const InventoryTypeT type) const
return 0;
}
}
-void InventoryHandler::destroyStorage()
+void InventoryHandler::destroyStorage() const
{
BLOCK_START("InventoryHandler::closeStorage")
if (storageWindow)
@@ -110,7 +110,7 @@ void InventoryHandler::destroyStorage()
BLOCK_END("InventoryHandler::closeStorage")
}
-void InventoryHandler::forgotStorage()
+void InventoryHandler::forgotStorage() const
{
storageWindow = nullptr;
}
diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h
index 31a755b42..98a617c83 100644
--- a/src/net/ea/inventoryhandler.h
+++ b/src/net/ea/inventoryhandler.h
@@ -41,7 +41,7 @@ class InventoryHandler notfinal : public Net::InventoryHandler
virtual ~InventoryHandler();
- void clear() override final;
+ void clear() const override final;
bool canSplit(const Item *const item) const
override final A_CONST A_WARN_UNUSED;
@@ -55,11 +55,11 @@ class InventoryHandler notfinal : public Net::InventoryHandler
size_t getSize(const InventoryTypeT type) const override final
A_CONST A_WARN_UNUSED;
- void pushPickup(const BeingId floorId);
+ static void pushPickup(const BeingId floorId);
- void destroyStorage() override final;
+ void destroyStorage() const override final;
- void forgotStorage() override final;
+ void forgotStorage() const override final;
Inventory *getStorage() const override final;
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index 20034f9f8..a3ebb8fb3 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -130,7 +130,7 @@ const Worlds &LoginHandler::getWorlds() const
return LoginRecv::mWorlds;
}
-void LoginHandler::clearWorlds()
+void LoginHandler::clearWorlds() const
{
delete_all(LoginRecv::mWorlds);
LoginRecv::mWorlds.clear();
diff --git a/src/net/ea/loginhandler.h b/src/net/ea/loginhandler.h
index b7b6136b5..7cd4c9c1b 100644
--- a/src/net/ea/loginhandler.h
+++ b/src/net/ea/loginhandler.h
@@ -56,7 +56,7 @@ class LoginHandler notfinal : public Net::LoginHandler
const Worlds &getWorlds() const override final A_CONST A_WARN_UNUSED;
- void clearWorlds() override final;
+ void clearWorlds() const override final;
virtual ServerInfo *getCharServer() const A_WARN_UNUSED = 0;