summaryrefslogtreecommitdiff
path: root/src/party.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-29 14:30:20 +0300
commit0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 (patch)
tree6259593b8436178ad8d981a96a8fd71eab9e04cc /src/party.cpp
parent01773c71a4698c6f01fe70d864f922bda65506cb (diff)
downloadmanaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz
manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2
manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz
manaverse-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip
Add strong typed int type BeingId.
Diffstat (limited to 'src/party.cpp')
-rw-r--r--src/party.cpp12
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();