diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-02 14:05:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-02 14:05:30 +0300 |
commit | 962f182fcc989ec587282e44f889188ce241ba31 (patch) | |
tree | da100971ec4952d0c56cb404862099c670bcfe0e /src/net/tmwa/chathandler.cpp | |
parent | 4df121e6dcdf53436f50ce81dd60096ce0138a2c (diff) | |
download | plus-962f182fcc989ec587282e44f889188ce241ba31.tar.gz plus-962f182fcc989ec587282e44f889188ce241ba31.tar.bz2 plus-962f182fcc989ec587282e44f889188ce241ba31.tar.xz plus-962f182fcc989ec587282e44f889188ce241ba31.zip |
Add const to more classes.
Diffstat (limited to 'src/net/tmwa/chathandler.cpp')
-rw-r--r-- | src/net/tmwa/chathandler.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index 6b695c1ee..6bf00aecc 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/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<const 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<const 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)); } |