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/avatar.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/avatar.h') diff --git a/src/avatar.h b/src/avatar.h index a8e690b29..f079e367f 100644 --- a/src/avatar.h +++ b/src/avatar.h @@ -25,6 +25,8 @@ #include "enums/being/gender.h" +#include "enums/simpletypes/beingid.h" + #include #include "localconsts.h" @@ -144,10 +146,10 @@ class Avatar notfinal void setExp(const int n) { mExp = n; } - int getID() const A_WARN_UNUSED + BeingId getID() const A_WARN_UNUSED { return mId; } - void setID(const int id) + void setID(const BeingId id) { mId = id; } int getCharId() const A_WARN_UNUSED @@ -181,7 +183,7 @@ class Avatar notfinal { mPoison = b; } protected: - int mId; + BeingId mId; int mCharId; std::string mName; std::string mOriginalName; -- cgit v1.2.3-60-g2f50