From 1307b14ff24f3935fa58aef405ffb246c0741336 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 17 Sep 2014 00:49:45 +0300 Subject: Remove getter for charServerHandler. --- src/net/charserverhandler.h | 2 ++ src/net/eathena/charserverhandler.cpp | 2 +- src/net/net.cpp | 6 +----- src/net/net.h | 2 -- src/net/tmwa/charserverhandler.cpp | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) (limited to 'src/net') diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h index df3d806a0..2ad06901d 100644 --- a/src/net/charserverhandler.h +++ b/src/net/charserverhandler.h @@ -100,4 +100,6 @@ class CharServerHandler notfinal } // namespace Net +extern Net::CharServerHandler *charServerHandler; + #endif // NET_CHARSERVERHANDLER_H diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index f94ae5838..e1d6c5373 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -376,7 +376,7 @@ void CharServerHandler::processCharMapInfo(Net::MessageIn &restrict msg) mSelectedCharacter->dummy = nullptr; - Net::getCharServerHandler()->clear(); + charServerHandler->clear(); updateCharSelectDialog(); if (network) diff --git a/src/net/net.cpp b/src/net/net.cpp index 2330e8d5f..f4736a01c 100644 --- a/src/net/net.cpp +++ b/src/net/net.cpp @@ -44,6 +44,7 @@ namespace Net class BeingHandler; class BuySellHandler; class CashShopHandler; + class CharServerHandler; } Net::AdminHandler *adminHandler = nullptr; @@ -69,11 +70,6 @@ Net::CashShopHandler *cashShopHandler = nullptr; Net::FamilyHandler *familyHandler = nullptr; Net::BankHandler *bankHandler = nullptr; -Net::CharServerHandler *Net::getCharServerHandler() -{ - return charServerHandler; -} - Net::ChatHandler *Net::getChatHandler() { return chatHandler; diff --git a/src/net/net.h b/src/net/net.h index f6029211c..56c091924 100644 --- a/src/net/net.h +++ b/src/net/net.h @@ -36,7 +36,6 @@ namespace Net { -class CharServerHandler; class ChatHandler; class FamilyHandler; class GameHandler; @@ -53,7 +52,6 @@ class SkillHandler; class TradeHandler; class ServerFeatures; -CharServerHandler *getCharServerHandler() A_WARN_UNUSED; ChatHandler *getChatHandler() A_WARN_UNUSED; GameHandler *getGameHandler() A_WARN_UNUSED; GeneralHandler *getGeneralHandler() A_WARN_UNUSED; diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 132fd0cea..e23b6f08c 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -439,7 +439,7 @@ void CharServerHandler::processCharMapInfo(Net::MessageIn &restrict msg) mSelectedCharacter->dummy = nullptr; - Net::getCharServerHandler()->clear(); + charServerHandler->clear(); updateCharSelectDialog(); if (network) -- cgit v1.2.3-70-g09d2