summaryrefslogtreecommitdiff
path: root/src/net/eathena/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-21 18:57:48 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-21 18:57:48 +0300
commit35cfd460655878c9a615abc8ea1cb2f7577a7f3b (patch)
tree2b4cb899f7f442912f89de30f4a5ab0add0727ce /src/net/eathena/chathandler.cpp
parentcfe4c893ba4ba30379919636d3c508ebf1594e23 (diff)
downloadmanaverse-35cfd460655878c9a615abc8ea1cb2f7577a7f3b.tar.gz
manaverse-35cfd460655878c9a615abc8ea1cb2f7577a7f3b.tar.bz2
manaverse-35cfd460655878c9a615abc8ea1cb2f7577a7f3b.tar.xz
manaverse-35cfd460655878c9a615abc8ea1cb2f7577a7f3b.zip
some other fixes from cpplint.
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r--src/net/eathena/chathandler.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 940227b3c..eae8e7ffc 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -113,7 +113,7 @@ void ChatHandler::talk(const std::string &text,
MessageOut outMsg(CMSG_CHAT_MESSAGE);
// Added + 1 in order to let eAthena parse admin commands correctly
- outMsg.writeInt16(static_cast<short>(mes.length() + 4 + 1));
+ outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4 + 1));
outMsg.writeString(mes, static_cast<int>(mes.length() + 1));
}
@@ -121,7 +121,7 @@ void ChatHandler::talkRaw(const std::string &mes) const
{
MessageOut outMsg(CMSG_CHAT_MESSAGE);
// Added + 1 in order to let eAthena parse admin commands correctly
- outMsg.writeInt16(static_cast<short>(mes.length() + 4 + 1));
+ outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4 + 1));
outMsg.writeString(mes, static_cast<int>(mes.length() + 1));
}
@@ -129,7 +129,7 @@ void ChatHandler::privateMessage(const std::string &recipient,
const std::string &text)
{
MessageOut outMsg(CMSG_CHAT_WHISPER);
- outMsg.writeInt16(static_cast<short>(text.length() + 28));
+ outMsg.writeInt16(static_cast<int16_t>(text.length() + 28));
outMsg.writeString(recipient, 24);
outMsg.writeString(text, static_cast<int>(text.length()));
mSentWhispers.push(recipient);
@@ -153,13 +153,13 @@ void ChatHandler::sendRaw(const std::string &args) const
if (pos != std::string::npos)
{
str = line.substr(0, pos);
- outMsg = new MessageOut(static_cast<short>(atoi(str.c_str())));
+ outMsg = new MessageOut(static_cast<int16_t>(atoi(str.c_str())));
line = line.substr(pos + 1);
pos = line.find(" ");
}
else
{
- outMsg = new MessageOut(static_cast<short>(atoi(line.c_str())));
+ outMsg = new MessageOut(static_cast<int16_t>(atoi(line.c_str())));
delete outMsg;
return;
}
@@ -185,7 +185,7 @@ void ChatHandler::processRaw(MessageOut &outMsg, const std::string &line)
if (line.length() <= 3)
outMsg.writeInt8(static_cast<unsigned char>(i));
else if (line.length() <= 5)
- outMsg.writeInt16(static_cast<short>(i));
+ outMsg.writeInt16(static_cast<int16_t>(i));
else
outMsg.writeInt32(i);
}
@@ -215,7 +215,7 @@ void ChatHandler::processRaw(MessageOut &outMsg, const std::string &line)
outMsg.writeInt8(static_cast<unsigned char>(i));
break;
case '2':
- outMsg.writeInt16(static_cast<short>(i));
+ outMsg.writeInt16(static_cast<int16_t>(i));
break;
case '4':
outMsg.writeInt32(i);
@@ -225,14 +225,14 @@ void ChatHandler::processRaw(MessageOut &outMsg, const std::string &line)
pos = line.find(",");
if (pos != std::string::npos)
{
- const unsigned short x = static_cast<unsigned short>(
+ const uint16_t x = static_cast<uint16_t>(
atoi(data.substr(0, pos).c_str()));
data = data.substr(pos + 1);
pos = line.find(",");
if (pos == std::string::npos)
break;
- const unsigned short y = static_cast<unsigned short>(
+ const uint16_t y = static_cast<uint16_t>(
atoi(data.substr(0, pos).c_str()));
const int dir = atoi(data.substr(pos + 1).c_str());
outMsg.writeCoordinates(x, y,