diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-21 00:28:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-21 00:28:46 +0300 |
commit | c78423448941517eeae0a60e703a5dc2976aed0c (patch) | |
tree | bcbe6c9aa737daf61816d0be04bdd46e908462ca | |
parent | 5f5a1a74a4bc1711b5501dbc0f117153e4214bcd (diff) | |
download | manaplus-c78423448941517eeae0a60e703a5dc2976aed0c.tar.gz manaplus-c78423448941517eeae0a60e703a5dc2976aed0c.tar.bz2 manaplus-c78423448941517eeae0a60e703a5dc2976aed0c.tar.xz manaplus-c78423448941517eeae0a60e703a5dc2976aed0c.zip |
fix compilation without C++11 options.
-rw-r--r-- | src/net/ea/partyhandler.h | 10 | ||||
-rw-r--r-- | src/net/eathena/partyhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/eathena/partyhandler.h | 5 | ||||
-rw-r--r-- | src/net/partyhandler.h | 11 | ||||
-rw-r--r-- | src/net/partyshare.h | 15 | ||||
-rw-r--r-- | src/net/registrationoptions.h | 15 | ||||
-rw-r--r-- | src/net/tmwa/partyhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/partyhandler.h | 5 |
8 files changed, 41 insertions, 28 deletions
diff --git a/src/net/ea/partyhandler.h b/src/net/ea/partyhandler.h index 19f66a238..61aa49bfa 100644 --- a/src/net/ea/partyhandler.h +++ b/src/net/ea/partyhandler.h @@ -46,10 +46,12 @@ class PartyHandler : public Net::PartyHandler void join(const int partyId) const override final; - Net::PartyShare getShareExperience() const override final A_WARN_UNUSED + Net::PartyShare::Type getShareExperience() + const override final A_WARN_UNUSED { return mShareExp; } - Net::PartyShare getShareItems() const override final A_WARN_UNUSED + Net::PartyShare::Type getShareItems() + const override final A_WARN_UNUSED { return mShareItems; } static void reload(); @@ -79,8 +81,8 @@ class PartyHandler : public Net::PartyHandler virtual void processPartyMessage(Net::MessageIn &msg) const; protected: - Net::PartyShare mShareExp; - Net::PartyShare mShareItems; + Net::PartyShare::Type mShareExp; + Net::PartyShare::Type mShareItems; }; extern PartyTab *partyTab; diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index e1c385c4c..bfbe5c8f7 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -183,7 +183,7 @@ void PartyHandler::chat(const std::string &text) const outMsg.writeString(text, static_cast<int>(text.length())); } -void PartyHandler::setShareExperience(const Net::PartyShare share) const +void PartyHandler::setShareExperience(const Net::PartyShare::Type share) const { if (share == Net::PartyShare::NOT_POSSIBLE) return; @@ -193,7 +193,7 @@ void PartyHandler::setShareExperience(const Net::PartyShare share) const outMsg.writeInt16(static_cast<int16_t>(mShareItems)); } -void PartyHandler::setShareItems(const Net::PartyShare share) const +void PartyHandler::setShareItems(const Net::PartyShare::Type share) const { if (share == Net::PartyShare::NOT_POSSIBLE) return; diff --git a/src/net/eathena/partyhandler.h b/src/net/eathena/partyhandler.h index 87bd50543..dd98a6fce 100644 --- a/src/net/eathena/partyhandler.h +++ b/src/net/eathena/partyhandler.h @@ -59,10 +59,11 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler void chat(const std::string &text) const override final; - void setShareExperience(const Net::PartyShare share) + void setShareExperience(const Net::PartyShare::Type share) const override final; - void setShareItems(const Net::PartyShare share) const override final; + void setShareItems(const Net::PartyShare::Type share) + const override final; }; } // namespace EAthena diff --git a/src/net/partyhandler.h b/src/net/partyhandler.h index a582ba9d0..ef17f7ebd 100644 --- a/src/net/partyhandler.h +++ b/src/net/partyhandler.h @@ -61,13 +61,16 @@ class PartyHandler virtual void chat(const std::string &text) const = 0; - virtual Net::PartyShare getShareExperience() const A_WARN_UNUSED = 0; + virtual Net::PartyShare::Type getShareExperience() + const A_WARN_UNUSED = 0; - virtual void setShareExperience(const Net::PartyShare share) const = 0; + virtual void setShareExperience(const Net::PartyShare::Type + share) const = 0; - virtual Net::PartyShare getShareItems() const A_WARN_UNUSED = 0; + virtual Net::PartyShare::Type getShareItems() const A_WARN_UNUSED = 0; - virtual void setShareItems(const Net::PartyShare share) const = 0; + virtual void setShareItems(const Net::PartyShare::Type + share) const = 0; virtual void clear() const = 0; diff --git a/src/net/partyshare.h b/src/net/partyshare.h index e35ff6382..5fa55c4d9 100644 --- a/src/net/partyshare.h +++ b/src/net/partyshare.h @@ -25,13 +25,16 @@ namespace Net { - enum PartyShare + namespace PartyShare { - UNKNOWN = -1, - NO, - YES, - NOT_POSSIBLE = 2 - }; + enum Type + { + UNKNOWN = -1, + NO, + YES, + NOT_POSSIBLE = 2 + }; + } } // namespace Net #endif // NET_PARTYSHARE_H diff --git a/src/net/registrationoptions.h b/src/net/registrationoptions.h index 7ab4021bb..5406ece96 100644 --- a/src/net/registrationoptions.h +++ b/src/net/registrationoptions.h @@ -25,13 +25,16 @@ namespace Net { - enum RegistrationOptions + namespace RegistrationOptions { - Unregister = 0x1, - ChangeEmail = 0x2, - SetEmailOnRegister = 0x4, - SetGenderOnRegister = 0x8 - }; + enum + { + Unregister = 0x1, + ChangeEmail = 0x2, + SetEmailOnRegister = 0x4, + SetGenderOnRegister = 0x8 + }; + } } // namespace Net #endif // NET_REGISTRATIONOPTIONS_H diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp index 634ecbff5..ca11ccdf0 100644 --- a/src/net/tmwa/partyhandler.cpp +++ b/src/net/tmwa/partyhandler.cpp @@ -185,7 +185,7 @@ void PartyHandler::chat(const std::string &text) const outMsg.writeString(text, static_cast<int>(text.length())); } -void PartyHandler::setShareExperience(const Net::PartyShare share) const +void PartyHandler::setShareExperience(const Net::PartyShare::Type share) const { if (share == Net::PartyShare::NOT_POSSIBLE) return; @@ -195,7 +195,7 @@ void PartyHandler::setShareExperience(const Net::PartyShare share) const outMsg.writeInt16(static_cast<int16_t>(mShareItems)); } -void PartyHandler::setShareItems(const Net::PartyShare share) const +void PartyHandler::setShareItems(const Net::PartyShare::Type share) const { if (share == Net::PartyShare::NOT_POSSIBLE) return; diff --git a/src/net/tmwa/partyhandler.h b/src/net/tmwa/partyhandler.h index ae4249143..41e42097e 100644 --- a/src/net/tmwa/partyhandler.h +++ b/src/net/tmwa/partyhandler.h @@ -59,10 +59,11 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler void chat(const std::string &text) const override final; - void setShareExperience(const Net::PartyShare share) + void setShareExperience(const Net::PartyShare::Type share) const override final; - void setShareItems(const Net::PartyShare share) const override final; + void setShareItems(const Net::PartyShare::Type + share) const override final; }; } // namespace TmwAthena |