diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 13:47:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 13:47:36 +0300 |
commit | c1ba61eb566a0a1a2532690ba3bf7e6498bee06b (patch) | |
tree | ade4210a9028e8688ee2794af4bef59e1716e9f4 /src | |
parent | 3aaebb5b7f1faf46d9f437ba00e7650147453952 (diff) | |
download | plus-c1ba61eb566a0a1a2532690ba3bf7e6498bee06b.tar.gz plus-c1ba61eb566a0a1a2532690ba3bf7e6498bee06b.tar.bz2 plus-c1ba61eb566a0a1a2532690ba3bf7e6498bee06b.tar.xz plus-c1ba61eb566a0a1a2532690ba3bf7e6498bee06b.zip |
Remove auto pointers from network code.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 52 | ||||
-rw-r--r-- | src/net/eathena/messagehandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 52 | ||||
-rw-r--r-- | src/net/tmwa/messagehandler.h | 2 |
4 files changed, 54 insertions, 54 deletions
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index b5206afcc..9ea481f2c 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -185,28 +185,28 @@ void GeneralHandler::load() if (!mNetwork) return; - mNetwork->registerHandler(mAdminHandler.get()); - mNetwork->registerHandler(mBeingHandler.get()); - mNetwork->registerHandler(mBuySellHandler.get()); - mNetwork->registerHandler(mChatHandler.get()); - mNetwork->registerHandler(mCharServerHandler.get()); - mNetwork->registerHandler(mGameHandler.get()); - mNetwork->registerHandler(mGuildHandler.get()); - mNetwork->registerHandler(mInventoryHandler.get()); - mNetwork->registerHandler(mItemHandler.get()); - mNetwork->registerHandler(mLoginHandler.get()); - mNetwork->registerHandler(mNpcHandler.get()); - mNetwork->registerHandler(mPlayerHandler.get()); - mNetwork->registerHandler(mSkillHandler.get()); - mNetwork->registerHandler(mTradeHandler.get()); - mNetwork->registerHandler(mPartyHandler.get()); - mNetwork->registerHandler(mPetHandler.get()); - mNetwork->registerHandler(mQuestHandler.get()); - mNetwork->registerHandler(mMailHandler.get()); - mNetwork->registerHandler(mAuctionHandler.get()); - mNetwork->registerHandler(mCashShopHandler.get()); - mNetwork->registerHandler(mFamilyHandler.get()); - mNetwork->registerHandler(mBankHandler.get()); + mNetwork->registerHandler(mAdminHandler); + mNetwork->registerHandler(mBeingHandler); + mNetwork->registerHandler(mBuySellHandler); + mNetwork->registerHandler(mChatHandler); + mNetwork->registerHandler(mCharServerHandler); + mNetwork->registerHandler(mGameHandler); + mNetwork->registerHandler(mGuildHandler); + mNetwork->registerHandler(mInventoryHandler); + mNetwork->registerHandler(mItemHandler); + mNetwork->registerHandler(mLoginHandler); + mNetwork->registerHandler(mNpcHandler); + mNetwork->registerHandler(mPlayerHandler); + mNetwork->registerHandler(mSkillHandler); + mNetwork->registerHandler(mTradeHandler); + mNetwork->registerHandler(mPartyHandler); + mNetwork->registerHandler(mPetHandler); + mNetwork->registerHandler(mQuestHandler); + mNetwork->registerHandler(mMailHandler); + mNetwork->registerHandler(mAuctionHandler); + mNetwork->registerHandler(mCashShopHandler); + mNetwork->registerHandler(mFamilyHandler); + mNetwork->registerHandler(mBankHandler); } void GeneralHandler::reload() @@ -214,17 +214,17 @@ void GeneralHandler::reload() if (mNetwork) mNetwork->disconnect(); - static_cast<LoginHandler*>(mLoginHandler.get())->clearWorlds(); + static_cast<LoginHandler*>(mLoginHandler)->clearWorlds(); CharServerHandler *const charHandler = static_cast<CharServerHandler*>( - mCharServerHandler.get()); + mCharServerHandler); charHandler->setCharCreateDialog(nullptr); charHandler->setCharSelectDialog(nullptr); - static_cast<PartyHandler*>(mPartyHandler.get())->reload(); + static_cast<PartyHandler*>(mPartyHandler)->reload(); } void GeneralHandler::reloadPartially() const { - static_cast<PartyHandler*>(mPartyHandler.get())->reload(); + static_cast<PartyHandler*>(mPartyHandler)->reload(); } void GeneralHandler::unload() diff --git a/src/net/eathena/messagehandler.h b/src/net/eathena/messagehandler.h index 5cbf7e1d9..841c10db9 100644 --- a/src/net/eathena/messagehandler.h +++ b/src/net/eathena/messagehandler.h @@ -50,7 +50,7 @@ class MessageHandler notfinal : public Net::MessageHandler Network *mNetwork; }; -typedef const std::auto_ptr<MessageHandler> MessageHandlerPtr; +typedef MessageHandler* MessageHandlerPtr; } // namespace EAthena diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index fbf7ec863..90fd3ad79 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -201,28 +201,28 @@ void GeneralHandler::load() if (!mNetwork) return; - mNetwork->registerHandler(mAdminHandler.get()); - mNetwork->registerHandler(mBeingHandler.get()); - mNetwork->registerHandler(mBuySellHandler.get()); - mNetwork->registerHandler(mChatHandler.get()); - mNetwork->registerHandler(mCharServerHandler.get()); - mNetwork->registerHandler(mGameHandler.get()); - mNetwork->registerHandler(mGuildHandler.get()); - mNetwork->registerHandler(mInventoryHandler.get()); - mNetwork->registerHandler(mItemHandler.get()); - mNetwork->registerHandler(mLoginHandler.get()); - mNetwork->registerHandler(mNpcHandler.get()); - mNetwork->registerHandler(mPlayerHandler.get()); - mNetwork->registerHandler(mSkillHandler.get()); - mNetwork->registerHandler(mTradeHandler.get()); - mNetwork->registerHandler(mPartyHandler.get()); - mNetwork->registerHandler(mPetHandler.get()); - mNetwork->registerHandler(mQuestHandler.get()); - mNetwork->registerHandler(mMailHandler.get()); - mNetwork->registerHandler(mAuctionHandler.get()); - mNetwork->registerHandler(mCashShopHandler.get()); - mNetwork->registerHandler(mFamilyHandler.get()); - mNetwork->registerHandler(mBankHandler.get()); + mNetwork->registerHandler(mAdminHandler); + mNetwork->registerHandler(mBeingHandler); + mNetwork->registerHandler(mBuySellHandler); + mNetwork->registerHandler(mChatHandler); + mNetwork->registerHandler(mCharServerHandler); + mNetwork->registerHandler(mGameHandler); + mNetwork->registerHandler(mGuildHandler); + mNetwork->registerHandler(mInventoryHandler); + mNetwork->registerHandler(mItemHandler); + mNetwork->registerHandler(mLoginHandler); + mNetwork->registerHandler(mNpcHandler); + mNetwork->registerHandler(mPlayerHandler); + mNetwork->registerHandler(mSkillHandler); + mNetwork->registerHandler(mTradeHandler); + mNetwork->registerHandler(mPartyHandler); + mNetwork->registerHandler(mPetHandler); + mNetwork->registerHandler(mQuestHandler); + mNetwork->registerHandler(mMailHandler); + mNetwork->registerHandler(mAuctionHandler); + mNetwork->registerHandler(mCashShopHandler); + mNetwork->registerHandler(mFamilyHandler); + mNetwork->registerHandler(mBankHandler); } void GeneralHandler::reload() @@ -230,17 +230,17 @@ void GeneralHandler::reload() if (mNetwork) mNetwork->disconnect(); - static_cast<LoginHandler*>(mLoginHandler.get())->clearWorlds(); + static_cast<LoginHandler*>(mLoginHandler)->clearWorlds(); CharServerHandler *const charHandler = static_cast<CharServerHandler*>( - mCharServerHandler.get()); + mCharServerHandler); charHandler->setCharCreateDialog(nullptr); charHandler->setCharSelectDialog(nullptr); - static_cast<PartyHandler*>(mPartyHandler.get())->reload(); + static_cast<PartyHandler*>(mPartyHandler)->reload(); } void GeneralHandler::reloadPartially() const { - static_cast<PartyHandler*>(mPartyHandler.get())->reload(); + static_cast<PartyHandler*>(mPartyHandler)->reload(); } void GeneralHandler::unload() diff --git a/src/net/tmwa/messagehandler.h b/src/net/tmwa/messagehandler.h index 9f87fd6b6..f276ad08b 100644 --- a/src/net/tmwa/messagehandler.h +++ b/src/net/tmwa/messagehandler.h @@ -50,7 +50,7 @@ class MessageHandler notfinal : public Net::MessageHandler Network *mNetwork; }; -typedef const std::auto_ptr<MessageHandler> MessageHandlerPtr; +typedef MessageHandler* MessageHandlerPtr; } // namespace TmwAthena |