summaryrefslogtreecommitdiff
path: root/src/net/eathena
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/eathena
parent7d606d7dd9708c9c382d1f8eba5fed9becdfd3d5 (diff)
downloadplus-954d4527558bbf797fd0389b0400fb05963ff96b.tar.gz
plus-954d4527558bbf797fd0389b0400fb05963ff96b.tar.bz2
plus-954d4527558bbf797fd0389b0400fb05963ff96b.tar.xz
plus-954d4527558bbf797fd0389b0400fb05963ff96b.zip
Add some more missing consts.
Diffstat (limited to 'src/net/eathena')
-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
5 files changed, 10 insertions, 10 deletions
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;