summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-11 17:18:44 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-11 17:18:44 +0300
commit55679ae1ac8fad893a5f40fe034474423d96d21d (patch)
tree6c651afe1f17ea1e2c855d5ea3e456eb3b8c63d1 /src
parent2f2b3da534ad7d19afd96cdc92d04052aa63f567 (diff)
downloadplus-55679ae1ac8fad893a5f40fe034474423d96d21d.tar.gz
plus-55679ae1ac8fad893a5f40fe034474423d96d21d.tar.bz2
plus-55679ae1ac8fad893a5f40fe034474423d96d21d.tar.xz
plus-55679ae1ac8fad893a5f40fe034474423d96d21d.zip
Add anonumous namespace into party.
Diffstat (limited to 'src')
-rw-r--r--src/party.cpp45
1 files changed, 24 insertions, 21 deletions
diff --git a/src/party.cpp b/src/party.cpp
index 2e3bf6fac..8b004883f 100644
--- a/src/party.cpp
+++ b/src/party.cpp
@@ -27,30 +27,33 @@
#include "debug.h"
-static class SortPartyFunctor final
+namespace
{
- public:
- bool operator() (const PartyMember *const p1,
- const PartyMember *const p2) const
- {
- if (!p1 || !p2)
- return false;
- if (p1->getLeader())
- return true;
- if (p2->getLeader())
- return false;
-
- if (p1->getName() != p2->getName())
+ static class SortPartyFunctor final
+ {
+ public:
+ bool operator() (const PartyMember *const p1,
+ const PartyMember *const p2) const
{
- std::string s1 = p1->getName();
- std::string s2 = p2->getName();
- toLower(s1);
- toLower(s2);
- return s1 < s2;
+ if (!p1 || !p2)
+ return false;
+ if (p1->getLeader())
+ return true;
+ if (p2->getLeader())
+ return false;
+
+ if (p1->getName() != p2->getName())
+ {
+ std::string s1 = p1->getName();
+ std::string s2 = p2->getName();
+ toLower(s1);
+ toLower(s2);
+ return s1 < s2;
+ }
+ return false;
}
- return false;
- }
-} partySorter;
+ } partySorter;
+} // namespace
PartyMember::PartyMember(Party *const party, const int id,
const std::string &name) :