diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-29 14:30:20 +0300 |
commit | 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch) | |
tree | 6259593b8436178ad8d981a96a8fd71eab9e04cc /src/party.cpp | |
parent | 01773c71a4698c6f01fe70d864f922bda65506cb (diff) | |
download | manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2 manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz manaplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip |
Add strong typed int type BeingId.
Diffstat (limited to 'src/party.cpp')
-rw-r--r-- | src/party.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/party.cpp b/src/party.cpp index 33722044f..6ca3ae1db 100644 --- a/src/party.cpp +++ b/src/party.cpp @@ -57,7 +57,8 @@ namespace } partySorter; } // namespace -PartyMember::PartyMember(Party *const party, const int id, +PartyMember::PartyMember(Party *const party, + const BeingId id, const std::string &name) : Avatar(name), mParty(party), @@ -82,7 +83,8 @@ Party::~Party() clearMembers(); } -PartyMember *Party::addMember(const int id, const std::string &name) +PartyMember *Party::addMember(const BeingId id, + const std::string &name) { PartyMember *m = getMember(id); if (m) @@ -95,7 +97,7 @@ PartyMember *Party::addMember(const int id, const std::string &name) return m; } -PartyMember *Party::getMember(const int id) const +PartyMember *Party::getMember(const BeingId id) const { MemberList::const_iterator itr = mMembers.begin(); const MemberList::const_iterator itr_end = mMembers.end(); @@ -151,7 +153,7 @@ void Party::removeMember(const PartyMember *const member) } } -void Party::removeMember(const int id) +void Party::removeMember(const BeingId id) { bool deleted = true; while (deleted) @@ -247,7 +249,7 @@ bool Party::isMember(const PartyMember *const member) const return false; } -bool Party::isMember(const int id) const +bool Party::isMember(const BeingId id) const { MemberList::const_iterator itr = mMembers.begin(); const MemberList::const_iterator itr_end = mMembers.end(); |