summaryrefslogtreecommitdiff
path: root/src/net/eathena/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-02 14:05:30 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-02 14:05:30 +0300
commit962f182fcc989ec587282e44f889188ce241ba31 (patch)
treeda100971ec4952d0c56cb404862099c670bcfe0e /src/net/eathena/chathandler.cpp
parent4df121e6dcdf53436f50ce81dd60096ce0138a2c (diff)
downloadplus-962f182fcc989ec587282e44f889188ce241ba31.tar.gz
plus-962f182fcc989ec587282e44f889188ce241ba31.tar.bz2
plus-962f182fcc989ec587282e44f889188ce241ba31.tar.xz
plus-962f182fcc989ec587282e44f889188ce241ba31.zip
Add const to more classes.
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r--src/net/eathena/chathandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 756faf6f3..77cf50acd 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -177,7 +177,7 @@ void ChatHandler::processRaw(MessageOut &outMsg, std::string &line)
size_t pos = line.find(":");
if (pos == std::string::npos)
{
- int i = atoi(line.c_str());
+ const int i = atoi(line.c_str());
if (line.length() <= 3)
outMsg.writeInt8(static_cast<char>(i));
else if (line.length() <= 5)
@@ -221,16 +221,16 @@ void ChatHandler::processRaw(MessageOut &outMsg, std::string &line)
pos = line.find(",");
if (pos != std::string::npos)
{
- unsigned short x = static_cast<unsigned short>(
+ const unsigned short x = static_cast<unsigned short>(
atoi(data.substr(0, pos).c_str()));
data = data.substr(pos + 1);
pos = line.find(",");
if (pos == std::string::npos)
break;
- unsigned short y = static_cast<unsigned short>(
+ const unsigned short y = static_cast<unsigned short>(
atoi(data.substr(0, pos).c_str()));
- int dir = atoi(data.substr(pos + 1).c_str());
+ const int dir = atoi(data.substr(pos + 1).c_str());
outMsg.writeCoordinates(x, y,
static_cast<unsigned char>(dir));
}