summaryrefslogtreecommitdiff
path: root/src/party.h
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.h
parent01773c71a4698c6f01fe70d864f922bda65506cb (diff)
downloadplus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.gz
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.bz2
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.tar.xz
plus-0f9ec2061c4ad6157c3186f1cab9c4d8558980b5.zip
Add strong typed int type BeingId.
Diffstat (limited to 'src/party.h')
-rw-r--r--src/party.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/party.h b/src/party.h
index 95b048787..47d84cf45 100644
--- a/src/party.h
+++ b/src/party.h
@@ -49,7 +49,9 @@ class PartyMember final : public Avatar
protected:
friend class Party;
- PartyMember(Party *const party, const int id, const std::string &name);
+ PartyMember(Party *const party,
+ const BeingId id,
+ const std::string &name);
Party *mParty;
bool mLeader;
@@ -69,14 +71,15 @@ class Party final : public AvatarListModel
/**
* Adds member to the list.
*/
- PartyMember *addMember(const int id, const std::string &name);
+ PartyMember *addMember(const BeingId id,
+ const std::string &name);
/**
* Find a member by ID.
*
* @return the member with the given ID, or NULL if they don't exist.
*/
- PartyMember *getMember(const int id) const A_WARN_UNUSED;
+ PartyMember *getMember(const BeingId id) const A_WARN_UNUSED;
/**
* Find a member by name.
@@ -107,7 +110,7 @@ class Party final : public AvatarListModel
/**
* Removes a member from the party.
*/
- void removeMember(const int id);
+ void removeMember(const BeingId id);
/**
* Removes a member from the party.
@@ -139,7 +142,7 @@ class Party final : public AvatarListModel
bool isMember(const PartyMember *const member) const A_WARN_UNUSED;
- bool isMember(const int id) const A_WARN_UNUSED;
+ bool isMember(const BeingId id) const A_WARN_UNUSED;
bool isMember(const std::string &name) const A_WARN_UNUSED;