summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-13 01:11:50 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-13 01:11:50 +0300
commit308e352fbf2fd4f96d797e596fc41083e53e6106 (patch)
treee874de1b2ebcaec013f6b1c3363faacc698a438d /src/net
parentc67648bcc2ebd94da7ad90dc1f886b9f8206de8e (diff)
downloadmanaverse-308e352fbf2fd4f96d797e596fc41083e53e6106.tar.gz
manaverse-308e352fbf2fd4f96d797e596fc41083e53e6106.tar.bz2
manaverse-308e352fbf2fd4f96d797e596fc41083e53e6106.tar.xz
manaverse-308e352fbf2fd4f96d797e596fc41083e53e6106.zip
Fix code style.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/network.cpp4
-rw-r--r--src/net/eathena/npchandler.cpp14
-rw-r--r--src/net/eathena/npchandler.h2
-rw-r--r--src/net/tmwa/network.cpp4
4 files changed, 12 insertions, 12 deletions
diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp
index b16d36158..57b450f1a 100644
--- a/src/net/eathena/network.cpp
+++ b/src/net/eathena/network.cpp
@@ -114,10 +114,10 @@ static const int messagesSize = 0xffff;
Network *Network::mInstance = nullptr;
Network::Network() :
- Ea::Network()
+ Ea::Network(),
+ mMessageHandlers(new MessageHandler*[messagesSize])
{
mInstance = this;
- mMessageHandlers = new MessageHandler*[messagesSize];
memset(&mMessageHandlers[0], 0, sizeof(MessageHandler*) * 0xffff);
}
diff --git a/src/net/eathena/npchandler.cpp b/src/net/eathena/npchandler.cpp
index af90c6fd6..530ba0416 100644
--- a/src/net/eathena/npchandler.cpp
+++ b/src/net/eathena/npchandler.cpp
@@ -67,32 +67,32 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
switch (msg.getId())
{
case SMSG_NPC_CHOICE:
- npcId = getNpc(msg, true);
+ getNpc(msg, true);
processNpcChoice(msg);
break;
case SMSG_NPC_MESSAGE:
- npcId = getNpc(msg, true);
+ getNpc(msg, true);
processNpcMessage(msg);
break;
case SMSG_NPC_CLOSE:
- npcId = getNpc(msg, false);
+ getNpc(msg, false);
processNpcClose(msg);
break;
case SMSG_NPC_NEXT:
- npcId = getNpc(msg, false);
+ getNpc(msg, false);
processNpcNext(msg);
break;
case SMSG_NPC_INT_INPUT:
- npcId = getNpc(msg, false);
+ getNpc(msg, false);
processNpcIntInput(msg);
break;
case SMSG_NPC_STR_INPUT:
- npcId = getNpc(msg, false);
+ getNpc(msg, false);
processNpcStrInput(msg);
break;
@@ -101,7 +101,7 @@ void NpcHandler::handleMessage(Net::MessageIn &msg)
break;
case SMSG_NPC_VIEWPOINT:
- npcId = getNpc(msg, true);
+ getNpc(msg, true);
processNpcViewPoint(msg, npcId);
break;
diff --git a/src/net/eathena/npchandler.h b/src/net/eathena/npchandler.h
index 2d5be025d..fc6a3fb6e 100644
--- a/src/net/eathena/npchandler.h
+++ b/src/net/eathena/npchandler.h
@@ -66,7 +66,7 @@ class NpcHandler final : public MessageHandler, public Ea::NpcHandler
void sellItem(int beingId, int itemId, int amount);
- int getNpc(Net::MessageIn &msg, bool haveLength) A_WARN_UNUSED;
+ int getNpc(Net::MessageIn &msg, bool haveLength);
void processNpcCutin(Net::MessageIn &msg, int npcId);
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp
index 40106ebfa..957fdd5a3 100644
--- a/src/net/tmwa/network.cpp
+++ b/src/net/tmwa/network.cpp
@@ -92,10 +92,10 @@ static const int messagesSize = 0xffff;
Network *Network::mInstance = nullptr;
Network::Network() :
- Ea::Network()
+ Ea::Network(),
+ mMessageHandlers(new MessageHandler*[messagesSize])
{
mInstance = this;
- mMessageHandlers = new MessageHandler*[messagesSize];
memset(&mMessageHandlers[0], 0, sizeof(MessageHandler*) * 0xffff);
}