summaryrefslogtreecommitdiff
path: root/src/net
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
parentea31c48b1d89c1fb849278c21a74a680b289f29f (diff)
downloadmanaplus-dd18101f7bcc1962e1378766165351aa4cfda01d.tar.gz
manaplus-dd18101f7bcc1962e1378766165351aa4cfda01d.tar.bz2
manaplus-dd18101f7bcc1962e1378766165351aa4cfda01d.tar.xz
manaplus-dd18101f7bcc1962e1378766165351aa4cfda01d.zip
Fix code style.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/playerhandler.cpp2
-rw-r--r--src/net/eathena/beinghandler.cpp1
-rw-r--r--src/net/eathena/chathandler.cpp18
-rw-r--r--src/net/eathena/tradehandler.cpp2
-rw-r--r--src/net/tmwa/beinghandler.cpp3
-rw-r--r--src/net/tmwa/skillhandler.cpp1
6 files changed, 11 insertions, 16 deletions
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index c12dc081e..f1bbc79c0 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -46,8 +46,6 @@
#include "resources/map/map.h"
-#include "net/messagein.h"
-
#include "net/ea/eaprotocol.h"
#include "debug.h"
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;
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 7ce768d62..27cad62ba 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -362,7 +362,8 @@ void BeingHandler::processBeingChangeLookContinue(Net::MessageIn &msg,
localPlayer->imitateOutfit(dstBeing, SPRITE_HEAD_BOTTOM);
break;
case 6: // eAthena LOOK_HAIR_COLOR
- dstBeing->setHairColor(SPRITE_HAIR_COLOR, static_cast<uint8_t>(id));
+ dstBeing->setHairColor(SPRITE_HAIR_COLOR,
+ static_cast<uint8_t>(id));
break;
case 7: // Clothes color
// ignoring it
diff --git a/src/net/tmwa/skillhandler.cpp b/src/net/tmwa/skillhandler.cpp
index 1567d576a..b88e9e509 100644
--- a/src/net/tmwa/skillhandler.cpp
+++ b/src/net/tmwa/skillhandler.cpp
@@ -35,7 +35,6 @@
#include "resources/notifytypes.h"
#include "utils/gettext.h"
-#include "utils/stringutils.h"
#include "debug.h"