From 24149e9e343dd5e507d2b4e879df55c692fbf9d1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 7 Jun 2017 21:47:14 +0300 Subject: Remove static in anonimouse namespaces. --- src/guild.cpp | 57 +++++++++++++++++++++++++++------------------------------ 1 file changed, 27 insertions(+), 30 deletions(-) (limited to 'src/guild.cpp') 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(m1->getOnline()) > - static_cast(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(m1->getOnline()) > + static_cast(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, -- cgit v1.2.3-60-g2f50