diff options
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/generalhandler.cpp | 7 | ||||
-rw-r--r-- | src/net/ea/network.cpp | 6 | ||||
-rw-r--r-- | src/net/ea/partyhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/messagehandler.h | 3 |
4 files changed, 8 insertions, 12 deletions
diff --git a/src/net/ea/generalhandler.cpp b/src/net/ea/generalhandler.cpp index 2dee8d1e..91406278 100644 --- a/src/net/ea/generalhandler.cpp +++ b/src/net/ea/generalhandler.cpp @@ -140,10 +140,7 @@ void GeneralHandler::load() void GeneralHandler::unload() { mNetwork->clearHandlers(); - - // The party tab might not have been made (if we never loaded the main GUI) - if (partyTab) - delete partyTab; + delete partyTab; } void GeneralHandler::flushNetwork() @@ -159,7 +156,7 @@ bool GeneralHandler::isNetworkConnected() void GeneralHandler::guiWindowsLoaded() { - partyTab = new PartyTab(); + partyTab = new PartyTab; } } // namespace EAthena diff --git a/src/net/ea/network.cpp b/src/net/ea/network.cpp index 8f55236f..690ca946 100644 --- a/src/net/ea/network.cpp +++ b/src/net/ea/network.cpp @@ -175,7 +175,7 @@ void Network::disconnect() void Network::registerHandler(MessageHandler *handler) { - for (const Uint16 *i = handler->handledMessages; *i; i++) + for (const Uint16 *i = handler->handledMessages; *i; ++i) { mMessageHandlers[*i] = handler; } @@ -185,7 +185,7 @@ void Network::registerHandler(MessageHandler *handler) void Network::unregisterHandler(MessageHandler *handler) { - for (const Uint16 *i = handler->handledMessages; *i; i++) + for (const Uint16 *i = handler->handledMessages; *i; ++i) { mMessageHandlers.erase(*i); } @@ -196,7 +196,7 @@ void Network::unregisterHandler(MessageHandler *handler) void Network::clearHandlers() { MessageHandlerIterator i; - for (i = mMessageHandlers.begin(); i != mMessageHandlers.end(); i++) + for (i = mMessageHandlers.begin(); i != mMessageHandlers.end(); ++i) { i->second->setNetwork(0); } diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index f76bd7d8..c1d625f5 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -36,8 +36,8 @@ #include "utils/gettext.h" #include "utils/strprintf.h" -PartyTab *partyTab; -PartyHandler *partyHandler; +PartyTab *partyTab = 0; +PartyHandler *partyHandler = 0; PartyHandler::PartyHandler() { diff --git a/src/net/messagehandler.h b/src/net/messagehandler.h index 1aa0b401..28d4fea5 100644 --- a/src/net/messagehandler.h +++ b/src/net/messagehandler.h @@ -44,8 +44,7 @@ class MessageHandler virtual void handleMessage(MessageIn &msg) = 0; -#ifdef TMWSERV_SUPPORT -#else +#ifdef EATHENA_SUPPORT void setNetwork(Network *network); protected: |