diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-29 21:55:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-29 21:55:55 +0300 |
commit | cc57dcd0e05a9c37fa4281c0190776a36b277e20 (patch) | |
tree | b39bd665a52337ec4c05d909567c7be30e67fcbc | |
parent | 2223d15c84a660dd10dc131455416e2f49368409 (diff) | |
download | plus-cc57dcd0e05a9c37fa4281c0190776a36b277e20.tar.gz plus-cc57dcd0e05a9c37fa4281c0190776a36b277e20.tar.bz2 plus-cc57dcd0e05a9c37fa4281c0190776a36b277e20.tar.xz plus-cc57dcd0e05a9c37fa4281c0190776a36b277e20.zip |
fix code style.
-rw-r--r-- | src/gui/charselectdialog.cpp | 3 | ||||
-rw-r--r-- | src/net/ea/beinghandler.cpp | 29 | ||||
-rw-r--r-- | src/net/ea/beinghandler.h | 30 | ||||
-rw-r--r-- | src/net/ea/chathandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/chathandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.h | 2 | ||||
-rw-r--r-- | src/net/generalhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/chathandler.h | 3 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.h | 2 |
12 files changed, 44 insertions, 41 deletions
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index 712870ad8..da5e7394f 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -558,7 +558,8 @@ void CharSelectDialog::attemptCharacterDelete(const int index) if (mLocked) return; - mCharServerHandler->deleteCharacter(mCharacterEntries[index]->getCharacter()); + mCharServerHandler->deleteCharacter( + mCharacterEntries[index]->getCharacter()); lock(); } diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 9d8d760f9..2f982a425 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -60,7 +60,7 @@ namespace Ea { const int EMOTION_TIME = 500; /**< Duration of emotion icon */ -BeingHandler::BeingHandler(bool enableSync) : +BeingHandler::BeingHandler(const bool enableSync) : mSync(enableSync), mSpawnId(0), mHideShield(config.getBoolValue("hideShield")) @@ -552,7 +552,7 @@ void BeingHandler::processBeingAction(Net::MessageIn &msg) const } } -void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) +void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) const { if (!effectManager || !actorSpriteManager) return; @@ -575,7 +575,7 @@ void BeingHandler::processBeingSelfEffect(Net::MessageIn &msg) } } -void BeingHandler::processBeingEmotion(Net::MessageIn &msg) +void BeingHandler::processBeingEmotion(Net::MessageIn &msg) const { if (!player_node || !actorSpriteManager) return; @@ -597,7 +597,7 @@ void BeingHandler::processBeingEmotion(Net::MessageIn &msg) dstBeing->setOtherTime(); } -void BeingHandler::processNameResponse(Net::MessageIn &msg) +void BeingHandler::processNameResponse(Net::MessageIn &msg) const { if (!player_node || !actorSpriteManager) return; @@ -637,7 +637,7 @@ void BeingHandler::processNameResponse(Net::MessageIn &msg) } } -void BeingHandler::processIpResponse(Net::MessageIn &msg) +void BeingHandler::processIpResponse(Net::MessageIn &msg) const { if (!actorSpriteManager) return; @@ -647,7 +647,7 @@ void BeingHandler::processIpResponse(Net::MessageIn &msg) dstBeing->setIp(ipToString(msg.readInt32())); } -void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) +void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) const { if (!actorSpriteManager) return; @@ -671,7 +671,7 @@ void BeingHandler::processPlayerGuilPartyInfo(Net::MessageIn &msg) } } -void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg) +void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg) const { if (!actorSpriteManager) return; @@ -689,7 +689,7 @@ void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg) player_node->imitateDirection(dstBeing, dir); } -void BeingHandler::processPlayerStop(Net::MessageIn &msg) +void BeingHandler::processPlayerStop(Net::MessageIn &msg) const { if (!actorSpriteManager || !player_node) return; @@ -723,6 +723,7 @@ void BeingHandler::processPlayerStop(Net::MessageIn &msg) } void BeingHandler::processPlayerMoveToAttack(Net::MessageIn &msg A_UNUSED) + const { /* * This is an *advisory* message, telling the client that @@ -734,7 +735,7 @@ void BeingHandler::processPlayerMoveToAttack(Net::MessageIn &msg A_UNUSED) player_node->fixAttackTarget(); } -void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) +void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const { if (!actorSpriteManager) return; @@ -758,7 +759,7 @@ void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) statusEffects & 0xffff)); } -void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) +void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) const { if (!actorSpriteManager) return; @@ -773,7 +774,7 @@ void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) dstBeing->setStatusEffect(status, flag); } -void BeingHandler::processSkilCasting(Net::MessageIn &msg) +void BeingHandler::processSkilCasting(Net::MessageIn &msg) const { msg.readInt32(); // src id msg.readInt32(); // dst id @@ -784,7 +785,7 @@ void BeingHandler::processSkilCasting(Net::MessageIn &msg) msg.readInt32(); // cast time } -void BeingHandler::processSkillNoDamage(Net::MessageIn &msg) +void BeingHandler::processSkillNoDamage(Net::MessageIn &msg) const { msg.readInt16(); // skill id msg.readInt16(); // heal @@ -793,7 +794,7 @@ void BeingHandler::processSkillNoDamage(Net::MessageIn &msg) msg.readInt8(); // fail } -void BeingHandler::processPvpMapMode(Net::MessageIn &msg) +void BeingHandler::processPvpMapMode(Net::MessageIn &msg) const { const Game *const game = Game::instance(); if (!game) @@ -804,7 +805,7 @@ void BeingHandler::processPvpMapMode(Net::MessageIn &msg) map->setPvpMode(msg.readInt16()); } -void BeingHandler::processPvpSet(Net::MessageIn &msg) +void BeingHandler::processPvpSet(Net::MessageIn &msg) const { const int id = msg.readInt32(); // id const int rank = msg.readInt32(); // rank diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h index 7af57af18..9f8fd7842 100644 --- a/src/net/ea/beinghandler.h +++ b/src/net/ea/beinghandler.h @@ -32,7 +32,7 @@ namespace Ea class BeingHandler : public Net::BeingHandler { public: - BeingHandler(bool enableSync); + BeingHandler(const bool enableSync); A_DELETE_COPY(BeingHandler) @@ -61,39 +61,39 @@ class BeingHandler : public Net::BeingHandler virtual void processBeingAction(Net::MessageIn &msg) const; - virtual void processBeingSelfEffect(Net::MessageIn &msg); + virtual void processBeingSelfEffect(Net::MessageIn &msg) const; - virtual void processBeingEmotion(Net::MessageIn &msg); + virtual void processBeingEmotion(Net::MessageIn &msg) const; virtual void processBeingChangeLook(Net::MessageIn &msg, const bool look2) const = 0; - virtual void processNameResponse(Net::MessageIn &msg); + virtual void processNameResponse(Net::MessageIn &msg) const; - virtual void processIpResponse(Net::MessageIn &msg); + virtual void processIpResponse(Net::MessageIn &msg) const; - virtual void processPlayerGuilPartyInfo(Net::MessageIn &msg); + virtual void processPlayerGuilPartyInfo(Net::MessageIn &msg) const; - virtual void processBeingChangeDirection(Net::MessageIn &msg); + virtual void processBeingChangeDirection(Net::MessageIn &msg) const; virtual void processPlayerMoveUpdate(Net::MessageIn &msg, const int type) const = 0; - virtual void processPlayerStop(Net::MessageIn &msg); + virtual void processPlayerStop(Net::MessageIn &msg) const; - virtual void processPlayerMoveToAttack(Net::MessageIn &msg); + virtual void processPlayerMoveToAttack(Net::MessageIn &msg) const; - virtual void processPlaterStatusChange(Net::MessageIn &msg); + virtual void processPlaterStatusChange(Net::MessageIn &msg) const; - virtual void processBeingStatusChange(Net::MessageIn &msg); + virtual void processBeingStatusChange(Net::MessageIn &msg) const; - virtual void processSkilCasting(Net::MessageIn &msg); + virtual void processSkilCasting(Net::MessageIn &msg) const; - virtual void processSkillNoDamage(Net::MessageIn &msg); + virtual void processSkillNoDamage(Net::MessageIn &msg) const; - virtual void processPvpMapMode(Net::MessageIn &msg); + virtual void processPvpMapMode(Net::MessageIn &msg) const; - virtual void processPvpSet(Net::MessageIn &msg); + virtual void processPvpSet(Net::MessageIn &msg) const; protected: // Should we honor server "Stop Walking" packets diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index 6eb913d50..20c108229 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -100,7 +100,7 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg) } } -void ChatHandler::processWhisper(Net::MessageIn &msg) +void ChatHandler::processWhisper(Net::MessageIn &msg) const { const int chatMsgLength = msg.readInt16() - 28; std::string nick = msg.readString(24); diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h index 824baba58..869d52153 100644 --- a/src/net/ea/chathandler.h +++ b/src/net/ea/chathandler.h @@ -45,7 +45,7 @@ class ChatHandler : public Net::ChatHandler virtual void processWhisperResponse(Net::MessageIn &msg); - virtual void processWhisper(Net::MessageIn &msg); + virtual void processWhisper(Net::MessageIn &msg) const; virtual void processBeingChat(Net::MessageIn &msg, const bool channels) const; diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 98c24559a..b026b5e71 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -727,7 +727,7 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg, const uint16_t headTop = msg.readInt16(); const uint16_t headMid = msg.readInt16(); const int hairColor = msg.readInt16(); - const uint16_t shoes = msg.readInt16(); // clothes color - "abused" as shoes + const uint16_t shoes = msg.readInt16(); //clothes color - "abused" as shoes uint16_t gloves; if (dstBeing->getType() == ActorSprite::MONSTER) diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index ad59ce664..637bd7369 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -192,14 +192,14 @@ void GeneralHandler::reload() mNetwork->disconnect(); static_cast<LoginHandler*>(mLoginHandler.get())->clearWorlds(); - CharServerHandler *charHandler = static_cast<CharServerHandler*>( + CharServerHandler *const charHandler = static_cast<CharServerHandler*>( mCharServerHandler.get()); charHandler->setCharCreateDialog(nullptr); charHandler->setCharSelectDialog(nullptr); static_cast<PartyHandler*>(mPartyHandler.get())->reload(); } -void GeneralHandler::reloadPartially() +void GeneralHandler::reloadPartially() const { static_cast<PartyHandler*>(mPartyHandler.get())->reload(); } diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h index d2fba855d..a0b65b842 100644 --- a/src/net/eathena/generalhandler.h +++ b/src/net/eathena/generalhandler.h @@ -55,7 +55,7 @@ class GeneralHandler final : public MessageHandler, void clearHandlers() override; - void reloadPartially() override; + void reloadPartially() const override; void gameStarted() const override; diff --git a/src/net/generalhandler.h b/src/net/generalhandler.h index aeb8d8e09..a243d2c9b 100644 --- a/src/net/generalhandler.h +++ b/src/net/generalhandler.h @@ -42,7 +42,7 @@ class GeneralHandler virtual void clearHandlers() = 0; - virtual void reloadPartially() = 0; + virtual void reloadPartially() const = 0; virtual void gameStarted() const = 0; diff --git a/src/net/tmwa/chathandler.h b/src/net/tmwa/chathandler.h index 1cee20774..eae168e59 100644 --- a/src/net/tmwa/chathandler.h +++ b/src/net/tmwa/chathandler.h @@ -42,7 +42,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler void handleMessage(Net::MessageIn &msg) override; - void talk(const std::string &text, const std::string &channel) const override; + void talk(const std::string &text, + const std::string &channel) const override; void talkRaw(const std::string &text) const override; diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index b1a555d4f..1d4d5274f 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -199,14 +199,14 @@ void GeneralHandler::reload() mNetwork->disconnect(); static_cast<LoginHandler*>(mLoginHandler.get())->clearWorlds(); - CharServerHandler *charHandler = static_cast<CharServerHandler*>( + CharServerHandler *const charHandler = static_cast<CharServerHandler*>( mCharServerHandler.get()); charHandler->setCharCreateDialog(nullptr); charHandler->setCharSelectDialog(nullptr); static_cast<PartyHandler*>(mPartyHandler.get())->reload(); } -void GeneralHandler::reloadPartially() +void GeneralHandler::reloadPartially() const { static_cast<PartyHandler*>(mPartyHandler.get())->reload(); } diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h index c25b7e7a3..57f704074 100644 --- a/src/net/tmwa/generalhandler.h +++ b/src/net/tmwa/generalhandler.h @@ -55,7 +55,7 @@ class GeneralHandler final : public MessageHandler, void clearHandlers() override; - void reloadPartially() override; + void reloadPartially() const override; void gameStarted() const override; |