From 0f9ec2061c4ad6157c3186f1cab9c4d8558980b5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 29 May 2015 14:30:20 +0300 Subject: Add strong typed int type BeingId. --- src/party.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/party.h') 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; -- cgit v1.2.3-60-g2f50