diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-07 21:47:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-07 21:47:14 +0300 |
commit | 24149e9e343dd5e507d2b4e879df55c692fbf9d1 (patch) | |
tree | 9caa75a85a3676acc02636c38f7d3e494bd10a4a /src/guild.cpp | |
parent | 28f62ac9504bc5e912cd94c302295d4dcc47e41c (diff) | |
download | mv-24149e9e343dd5e507d2b4e879df55c692fbf9d1.tar.gz mv-24149e9e343dd5e507d2b4e879df55c692fbf9d1.tar.bz2 mv-24149e9e343dd5e507d2b4e879df55c692fbf9d1.tar.xz mv-24149e9e343dd5e507d2b4e879df55c692fbf9d1.zip |
Remove static in anonimouse namespaces.
Diffstat (limited to 'src/guild.cpp')
-rw-r--r-- | src/guild.cpp | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/src/guild.cpp b/src/guild.cpp index 87c06ec2f..575220cde 100644 --- a/src/guild.cpp +++ b/src/guild.cpp @@ -30,40 +30,37 @@ #include "debug.h" -namespace +static class SortGuildFunctor final { - static class SortGuildFunctor final - { - public: - A_DEFAULT_COPY(SortGuildFunctor) + public: + A_DEFAULT_COPY(SortGuildFunctor) - bool operator() (const GuildMember *const m1, - const GuildMember *const m2) const - { - if ((m1 == nullptr) || (m2 == nullptr)) - return false; - - if (m1->getOnline() != m2->getOnline()) - { - return static_cast<int>(m1->getOnline()) > - static_cast<int>(m2->getOnline()); - } - - if (m1->getPos() != m2->getPos()) - return m1->getPos() > m2->getPos(); - - if (m1->getName() != m2->getName()) - { - std::string s1 = m1->getName(); - std::string s2 = m2->getName(); - toLower(s1); - toLower(s2); - return s1 < s2; - } + bool operator() (const GuildMember *const m1, + const GuildMember *const m2) const + { + if ((m1 == nullptr) || (m2 == nullptr)) return false; + + if (m1->getOnline() != m2->getOnline()) + { + return static_cast<int>(m1->getOnline()) > + static_cast<int>(m2->getOnline()); } - } guildSorter; -} // namespace + + if (m1->getPos() != m2->getPos()) + return m1->getPos() > m2->getPos(); + + if (m1->getName() != m2->getName()) + { + std::string s1 = m1->getName(); + std::string s2 = m2->getName(); + toLower(s1); + toLower(s2); + return s1 < s2; + } + return false; + } +} guildSorter; GuildMember::GuildMember(Guild *const guild, const BeingId accountId, |