summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-20 23:58:09 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-20 23:58:09 +0300
commit954d4527558bbf797fd0389b0400fb05963ff96b (patch)
treeec90371d34f88b3e22e9d65ad71d349ee53f62fe /src/net
parent7d606d7dd9708c9c382d1f8eba5fed9becdfd3d5 (diff)
downloadmv-954d4527558bbf797fd0389b0400fb05963ff96b.tar.gz
mv-954d4527558bbf797fd0389b0400fb05963ff96b.tar.bz2
mv-954d4527558bbf797fd0389b0400fb05963ff96b.tar.xz
mv-954d4527558bbf797fd0389b0400fb05963ff96b.zip
Add some more missing consts.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/charserverhandler.h2
-rw-r--r--src/net/chathandler.h2
-rw-r--r--src/net/ea/charserverhandler.cpp2
-rw-r--r--src/net/ea/charserverhandler.h2
-rw-r--r--src/net/eathena/charserverrecv.cpp4
-rw-r--r--src/net/eathena/chathandler.cpp2
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/generalhandler.cpp8
-rw-r--r--src/net/eathena/generalhandler.h4
-rw-r--r--src/net/generalhandler.h4
-rw-r--r--src/net/tmwa/chathandler.cpp2
-rw-r--r--src/net/tmwa/chathandler.h3
-rw-r--r--src/net/tmwa/generalhandler.cpp8
-rw-r--r--src/net/tmwa/generalhandler.h4
14 files changed, 25 insertions, 24 deletions
diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h
index c053eff81..26bfb4ba3 100644
--- a/src/net/charserverhandler.h
+++ b/src/net/charserverhandler.h
@@ -49,7 +49,7 @@ class CharServerHandler notfinal
virtual void setCharCreateDialog(CharCreateDialog *const window)
const = 0;
- virtual void requestCharacters() = 0;
+ virtual void requestCharacters() const = 0;
virtual void chooseCharacter(Net::Character *const character)
const = 0;
diff --git a/src/net/chathandler.h b/src/net/chathandler.h
index c619b353a..1595cd37a 100644
--- a/src/net/chathandler.h
+++ b/src/net/chathandler.h
@@ -57,7 +57,7 @@ class ChatHandler notfinal
const std::string &restrict text)
const = 0;
- virtual void joinChannel(const std::string &channel) = 0;
+ virtual void joinChannel(const std::string &channel) const = 0;
virtual void partChannel(const std::string &channel) const = 0;
diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp
index 28ed96bab..d58a1fc3e 100644
--- a/src/net/ea/charserverhandler.cpp
+++ b/src/net/ea/charserverhandler.cpp
@@ -50,7 +50,7 @@ void CharServerHandler::setCharSelectDialog(CharSelectDialog *const window)
updateCharSelectDialog();
}
-void CharServerHandler::requestCharacters()
+void CharServerHandler::requestCharacters() const
{
connect();
}
diff --git a/src/net/ea/charserverhandler.h b/src/net/ea/charserverhandler.h
index c16328a82..09899cd0c 100644
--- a/src/net/ea/charserverhandler.h
+++ b/src/net/ea/charserverhandler.h
@@ -39,7 +39,7 @@ class CharServerHandler notfinal : public Net::CharServerHandler
void setCharSelectDialog(CharSelectDialog *const window) const
override final;
- void requestCharacters() override final;
+ void requestCharacters() const override final;
unsigned int baseSprite() const override final A_CONST A_WARN_UNUSED;
diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp
index 03ca40aaa..e82a8c144 100644
--- a/src/net/eathena/charserverrecv.cpp
+++ b/src/net/eathena/charserverrecv.cpp
@@ -221,7 +221,7 @@ void CharServerRecv::processCharMapInfo(Net::MessageIn &restrict msg)
ServerInfo &server = mapServer;
BLOCK_START("CharServerRecv::processCharMapInfo")
PlayerInfo::setCharId(msg.readInt32("char id"));
- GameHandler *const gh = static_cast<GameHandler*>(gameHandler);
+ const GameHandler *const gh = static_cast<GameHandler*>(gameHandler);
gh->setMap(msg.readString(16, "map name"));
if (config.getBoolValue("usePersistentIP") || settings.persistentIp)
{
@@ -256,7 +256,7 @@ void CharServerRecv::processChangeMapServer(Net::MessageIn &msg)
Network *const network = Network::mInstance;
ServerInfo &server = mapServer;
BLOCK_START("CharServerRecv::processChangeMapServer")
- GameHandler *const gh = static_cast<GameHandler*>(gameHandler);
+ const GameHandler *const gh = static_cast<GameHandler*>(gameHandler);
if (!gh || !network)
{
BLOCK_END("CharServerRecv::processChangeMapServer")
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 9653384c3..3c4ab0040 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -235,7 +235,7 @@ void ChatHandler::joinChat(const ChatObject *const chat,
outMsg.writeString(password, 8, "password");
}
-void ChatHandler::joinChannel(const std::string &channel)
+void ChatHandler::joinChannel(const std::string &channel) const
{
if (serverFeatures->haveJoinChannel())
{
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index ed9183465..f8356a84d 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -49,7 +49,7 @@ class ChatHandler final : public Ea::ChatHandler
const std::string &restrict text) const
override final;
- void joinChannel(const std::string &channel) override final;
+ void joinChannel(const std::string &channel) const override final;
void who() const override final;
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 5d9bb790b..0cc91b297 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -146,14 +146,14 @@ void GeneralHandler::load() const
Network::mInstance->registerHandlers();
}
-void GeneralHandler::reload()
+void GeneralHandler::reload() const
{
if (Network::mInstance)
Network::mInstance->disconnect();
static_cast<LoginHandler*>(mLoginHandler)->clearWorlds();
- CharServerHandler *const charHandler = static_cast<CharServerHandler*>(
- mCharServerHandler);
+ const CharServerHandler *const charHandler =
+ static_cast<CharServerHandler*>(mCharServerHandler);
charHandler->setCharCreateDialog(nullptr);
charHandler->setCharSelectDialog(nullptr);
static_cast<PartyHandler*>(mPartyHandler)->reload();
@@ -164,7 +164,7 @@ void GeneralHandler::reloadPartially() const
static_cast<PartyHandler*>(mPartyHandler)->reload();
}
-void GeneralHandler::unload()
+void GeneralHandler::unload() const
{
clearHandlers();
}
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index 42080f3a9..7ff2ea34a 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -74,9 +74,9 @@ class GeneralHandler final : public Net::GeneralHandler
void load() const override final;
- void reload() override final;
+ void reload() const override final;
- void unload() override final;
+ void unload() const override final;
void flushNetwork() const override final;
diff --git a/src/net/generalhandler.h b/src/net/generalhandler.h
index 9e6a20ff3..fa3de5da2 100644
--- a/src/net/generalhandler.h
+++ b/src/net/generalhandler.h
@@ -36,9 +36,9 @@ class GeneralHandler notfinal
virtual void load() const = 0;
- virtual void reload() = 0;
+ virtual void reload() const = 0;
- virtual void unload() = 0;
+ virtual void unload() const = 0;
virtual void flushNetwork() const = 0;
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index 998a3eba1..da25c83cf 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -213,7 +213,7 @@ void ChatHandler::joinChat(const ChatObject *const chat A_UNUSED,
{
}
-void ChatHandler::joinChannel(const std::string &channel A_UNUSED)
+void ChatHandler::joinChannel(const std::string &channel A_UNUSED) const
{
}
diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h
index 7e5ce94a5..d03c609f8 100644
--- a/src/net/tmwa/chathandler.h
+++ b/src/net/tmwa/chathandler.h
@@ -49,7 +49,8 @@ class ChatHandler final : public Ea::ChatHandler
const std::string &restrict text) const
override final;
- void joinChannel(const std::string &channel) override final A_CONST;
+ void joinChannel(const std::string &channel) const override final
+ A_CONST;
void who() const override final;
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index bc6029a94..10b5cf5f2 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -153,14 +153,14 @@ void GeneralHandler::load() const
Network::mInstance->registerHandlers();
}
-void GeneralHandler::reload()
+void GeneralHandler::reload() const
{
if (Network::mInstance)
Network::mInstance->disconnect();
static_cast<LoginHandler*>(mLoginHandler)->clearWorlds();
- CharServerHandler *const charHandler = static_cast<CharServerHandler*>(
- mCharServerHandler);
+ const CharServerHandler *const charHandler =
+ static_cast<CharServerHandler*>(mCharServerHandler);
charHandler->setCharCreateDialog(nullptr);
charHandler->setCharSelectDialog(nullptr);
static_cast<PartyHandler*>(mPartyHandler)->reload();
@@ -171,7 +171,7 @@ void GeneralHandler::reloadPartially() const
static_cast<PartyHandler*>(mPartyHandler)->reload();
}
-void GeneralHandler::unload()
+void GeneralHandler::unload() const
{
clearHandlers();
}
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index 45efe3345..18273d093 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -75,9 +75,9 @@ class GeneralHandler final : public Net::GeneralHandler
void load() const override final;
- void reload() override final;
+ void reload() const override final;
- void unload() override final;
+ void unload() const override final;
void flushNetwork() const override final;