From 40730c4fa73d403cf7284a76d9b26f7ec662afa4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 2 Sep 2015 03:12:14 +0300 Subject: Remove mNetwork field from MessageHandlers --- src/net/tmwa/messagehandler.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/net/tmwa/messagehandler.cpp') diff --git a/src/net/tmwa/messagehandler.cpp b/src/net/tmwa/messagehandler.cpp index 0537606b0..bc5e2fae7 100644 --- a/src/net/tmwa/messagehandler.cpp +++ b/src/net/tmwa/messagehandler.cpp @@ -32,21 +32,19 @@ namespace TmwAthena { MessageHandler::MessageHandler() : - Net::MessageHandler(), - mNetwork(nullptr) + Net::MessageHandler() { } MessageHandler::~MessageHandler() { - if (mNetwork) - mNetwork->unregisterHandler(this); + if (Network::mInstance) + Network::mInstance->unregisterHandler(this); } void MessageHandler::setNetwork(Network *const network) { - assert(!(network && mNetwork)); - mNetwork = network; + assert(!(network && Network::mInstance)); } } // namespace TmwAthena -- cgit v1.2.3-70-g09d2