From b50eee3c4571c4a4657bc14c2935067d833bb801 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 23 Dec 2015 01:48:19 +0300 Subject: Add const attribute to net classes. --- src/net/eathena/buysellhandler.h | 8 +++--- src/net/eathena/cashshophandler.h | 3 ++- src/net/eathena/charserverhandler.h | 4 +-- src/net/eathena/gamehandler.h | 2 +- src/net/eathena/pethandler.h | 4 +-- src/net/eathena/serverfeatures.h | 50 ++++++++++++++++++------------------- 6 files changed, 36 insertions(+), 35 deletions(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/buysellhandler.h b/src/net/eathena/buysellhandler.h index 6327bfbff..a0a9ba205 100644 --- a/src/net/eathena/buysellhandler.h +++ b/src/net/eathena/buysellhandler.h @@ -36,18 +36,18 @@ class BuySellHandler final : public Ea::BuySellHandler A_DELETE_COPY(BuySellHandler) void requestSellList(const std::string &nick) - const override final; + const override final A_CONST; void requestBuyList(const std::string &nick) - const override final; + const override final A_CONST; void sendBuyRequest(const std::string &nick, const ShopItem *const item, - const int amount) const override final; + const int amount) const override final A_CONST; void sendSellRequest(const std::string &nick, const ShopItem *const item, - const int amount) const override final; + const int amount) const override final A_CONST; void close() const override final; }; diff --git a/src/net/eathena/cashshophandler.h b/src/net/eathena/cashshophandler.h index 132d019b8..71ac1b501 100644 --- a/src/net/eathena/cashshophandler.h +++ b/src/net/eathena/cashshophandler.h @@ -39,7 +39,8 @@ class CashShopHandler final : public Net::CashShopHandler const ItemColor color, const int amount) const override final; - void buyItems(std::vector &items) const override final; + void buyItems(std::vector &items) const override final + A_CONST; void close() const override final; diff --git a/src/net/eathena/charserverhandler.h b/src/net/eathena/charserverhandler.h index e08a73584..60f3855d7 100644 --- a/src/net/eathena/charserverhandler.h +++ b/src/net/eathena/charserverhandler.h @@ -61,7 +61,7 @@ class CharServerHandler final : public Ea::CharServerHandler bool isNeedCreatePin() const override final A_WARN_UNUSED; - void setNewPincode(const std::string &pin) override final; + void setNewPincode(const std::string &pin) override final A_CONST; /** * Sets the character create dialog. The handler will clean up this @@ -75,7 +75,7 @@ class CharServerHandler final : public Ea::CharServerHandler void ping() const override final; - unsigned int hatSprite() const override final A_WARN_UNUSED; + unsigned int hatSprite() const override final A_CONST A_WARN_UNUSED; }; } // namespace EAthena diff --git a/src/net/eathena/gamehandler.h b/src/net/eathena/gamehandler.h index ddbe43c07..c5b20f8e9 100644 --- a/src/net/eathena/gamehandler.h +++ b/src/net/eathena/gamehandler.h @@ -45,7 +45,7 @@ class GameHandler final : public Ea::GameHandler void ping(const int tick) const override final; - void disconnect2() const override final; + void disconnect2() const override final A_CONST; void mapLoadedEvent() const override final; diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h index 2e8dddb05..bc03e3dbd 100644 --- a/src/net/eathena/pethandler.h +++ b/src/net/eathena/pethandler.h @@ -38,7 +38,7 @@ class PetHandler final : public Net::PetHandler void spawn(const Being *const being, const int petId, - const int x, const int y) const override final; + const int x, const int y) const override final A_CONST; void emote(const uint8_t emoteId, const int petId) override final; @@ -61,7 +61,7 @@ class PetHandler final : public Net::PetHandler void setDirection(const unsigned char type) const override final; - void startAi(const bool start) const override final; + void startAi(const bool start) const override final A_CONST; }; } // namespace EAthena diff --git a/src/net/eathena/serverfeatures.h b/src/net/eathena/serverfeatures.h index 980d6fa9a..3d0eeb9d4 100644 --- a/src/net/eathena/serverfeatures.h +++ b/src/net/eathena/serverfeatures.h @@ -36,51 +36,51 @@ class ServerFeatures final : public Net::ServerFeatures bool haveServerOnlineList() const override final; - bool haveOnlineList() const override final; + bool haveOnlineList() const override final A_CONST; - bool havePartyNickInvite() const override final; + bool havePartyNickInvite() const override final A_CONST; - bool haveChangePartyLeader() const override final; + bool haveChangePartyLeader() const override final A_CONST; - bool haveServerHp() const override final; + bool haveServerHp() const override final A_CONST; bool havePlayerStatusUpdate() const override final; - bool haveBrokenPlayerAttackDistance() const override final; + bool haveBrokenPlayerAttackDistance() const override final A_CONST; - bool haveNativeGuilds() const override final; + bool haveNativeGuilds() const override final A_CONST; - bool haveIncompleteChatMessages() const override final; + bool haveIncompleteChatMessages() const override final A_CONST; bool haveRaceSelection() const override final; bool haveLookSelection() const override final; - bool haveChatChannels() const override final; + bool haveChatChannels() const override final A_CONST; - bool haveServerIgnore() const override final; + bool haveServerIgnore() const override final A_CONST; bool haveMove3() const override final; - bool haveItemColors() const override final; + bool haveItemColors() const override final A_CONST; - bool haveAccountOtherGender() const override final; + bool haveAccountOtherGender() const override final A_CONST; bool haveCharOtherGender() const override final; - bool haveMonsterAttackRange() const override final; + bool haveMonsterAttackRange() const override final A_CONST; - bool haveMonsterName() const override final; + bool haveMonsterName() const override final A_CONST; bool haveEmailOnRegister() const override final; bool haveEmailOnDelete() const override final; - bool haveEightDirections() const override final; + bool haveEightDirections() const override final A_CONST; - bool haveCharRename() const override final; + bool haveCharRename() const override final A_CONST; - bool haveBankApi() const override final; + bool haveBankApi() const override final A_CONST; bool haveServerVersion() const override final; @@ -90,15 +90,15 @@ class ServerFeatures final : public Net::ServerFeatures bool haveJoinChannel() const override final; - bool haveNpcWhispers() const override final; + bool haveNpcWhispers() const override final A_CONST; bool haveCreateCharGender() const override final; - bool haveAttackDirections() const override final; + bool haveAttackDirections() const override final A_CONST; - bool haveVending() const override final; + bool haveVending() const override final A_CONST; - bool haveCart() const override final; + bool haveCart() const override final A_CONST; bool haveTalkPet() const override final; @@ -106,21 +106,21 @@ class ServerFeatures final : public Net::ServerFeatures bool haveServerWarpNames() const override final; - bool haveExpPacket() const override final; + bool haveExpPacket() const override final A_CONST; - bool haveMute() const override final; + bool haveMute() const override final A_CONST; bool haveChangePassword() const override final; - bool haveTeamId() const override final; + bool haveTeamId() const override final A_CONST; - bool haveNewGuild() const override final; + bool haveNewGuild() const override final A_CONST; bool haveAdvancedSprites() const override final; bool haveExtendedRiding() const override final; - bool haveAdvancedBuySell() const override final; + bool haveAdvancedBuySell() const override final A_CONST; bool haveSlide() const override final; }; -- cgit v1.2.3-70-g09d2