summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-10 19:23:42 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-10 19:23:42 +0300
commitdd18101f7bcc1962e1378766165351aa4cfda01d (patch)
treec17e27e70422cbd357f7206a37f06385bfe3b1e2 /src/net/eathena
parentea31c48b1d89c1fb849278c21a74a680b289f29f (diff)
downloadmanaverse-dd18101f7bcc1962e1378766165351aa4cfda01d.tar.gz
manaverse-dd18101f7bcc1962e1378766165351aa4cfda01d.tar.bz2
manaverse-dd18101f7bcc1962e1378766165351aa4cfda01d.tar.xz
manaverse-dd18101f7bcc1962e1378766165351aa4cfda01d.zip
Fix code style.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/beinghandler.cpp1
-rw-r--r--src/net/eathena/chathandler.cpp18
-rw-r--r--src/net/eathena/tradehandler.cpp2
3 files changed, 9 insertions, 12 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index b0620b1f2..3bc28ed08 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -53,7 +53,6 @@
#include "resources/map/map.h"
-#include "utils/stringutils.h"
#include "utils/timer.h"
#include "debug.h"
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index f7ef27cb5..7461f8bd8 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -713,7 +713,7 @@ void ChatHandler::processChatRoomLeave(Net::MessageIn &msg)
msg.readInt16("users");
const std::string name = msg.readString(24, "name");
const int status = msg.readUInt8("flag"); // 0 - left, 1 - kicked
- switch(status)
+ switch (status)
{
case 0:
NotifyManager::notify(NotifyTypes::ROOM_LEAVE, name);
@@ -894,7 +894,7 @@ void ChatHandler::talkPet(const std::string &restrict text,
void ChatHandler::processChatRoomCreateAck(Net::MessageIn &msg)
{
const int result = msg.readUInt8("flag");
- switch(result)
+ switch (result)
{
case 0:
{
@@ -933,7 +933,7 @@ void ChatHandler::processChatRoomDestroy(Net::MessageIn &msg)
void ChatHandler::processChatRoomJoinFailed(Net::MessageIn &msg)
{
const int result = msg.readUInt8("flag");
- switch(result)
+ switch (result)
{
case 0:
NotifyManager::notify(NotifyTypes::ROOM_ERROR_FULL);
@@ -977,9 +977,9 @@ void ChatHandler::processChatRoomSettings(Net::MessageIn &msg)
const int sz = msg.readInt16("len") - 17;
const int ownerId = msg.readInt32("owner id");
const int chatId = msg.readInt32("chat id");
- const int limit = msg.readInt16("limit");
+ const uint16_t limit = msg.readInt16("limit");
msg.readInt16("users");
- const int type = msg.readUInt8("type");
+ const uint16_t type = msg.readUInt8("type");
const std::string &title = msg.readString(sz, "title");
ChatObject *const chat = localPlayer->getChat();
if (chat && chat->chatId == chatId)
@@ -1000,7 +1000,7 @@ void ChatHandler::processChatRoomRoleChange(Net::MessageIn &msg)
{
const int role = msg.readInt32("role");
const std::string name = msg.readString(24, "name");
- switch(role)
+ switch (role)
{
case 0:
NotifyManager::notify(NotifyTypes::ROOM_ROLE_OWNER, name);
@@ -1034,7 +1034,7 @@ void ChatHandler::processMVPNoItem(Net::MessageIn &msg)
void ChatHandler::processMannerMessage(Net::MessageIn &msg)
{
const int result = msg.readInt32("type");
- switch(result)
+ switch (result)
{
case 0:
NotifyManager::notify(NotifyTypes::MANNER_CHANGED);
@@ -1101,8 +1101,8 @@ void ChatHandler::setChatRoomOptions(const int limit,
const std::string &title) const
{
createOutPacket(CMSG_SET_CHAT_ROOM_OPTIONS);
- const int sz = title.size();
- outMsg.writeInt16(15 + sz, "len");
+ const int sz = static_cast<int>(title.size());
+ outMsg.writeInt16(static_cast<int16_t>(15 + sz), "len");
outMsg.writeInt16(static_cast<int16_t>(limit), "limit");
outMsg.writeInt8(static_cast<int8_t>(isPublic ? 1 : 0), "type");
outMsg.writeString(password, 8, "password");
diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp
index 562e250b2..a7a9c3300 100644
--- a/src/net/eathena/tradehandler.cpp
+++ b/src/net/eathena/tradehandler.cpp
@@ -37,8 +37,6 @@
#include "resources/notifytypes.h"
-#include "utils/stringutils.h"
-
#include "debug.h"
extern Net::TradeHandler *tradeHandler;