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/being/beingcacheentry.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/being/beingcacheentry.h') diff --git a/src/being/beingcacheentry.h b/src/being/beingcacheentry.h index 388e9a993..59b0054fe 100644 --- a/src/being/beingcacheentry.h +++ b/src/being/beingcacheentry.h @@ -21,6 +21,8 @@ #ifndef BEING_BEINGCACHEENTRY_H #define BEING_BEINGCACHEENTRY_H +#include "enums/simpletypes/beingid.h" + #include "localconsts.h" #include @@ -28,7 +30,7 @@ class BeingCacheEntry final { public: - explicit BeingCacheEntry(const int id) : + explicit BeingCacheEntry(const BeingId id) : mName(), mPartyName(), mGuildName(), @@ -44,7 +46,7 @@ class BeingCacheEntry final A_DELETE_COPY(BeingCacheEntry) - int getId() const + BeingId getId() const { return mId; } /** @@ -113,11 +115,11 @@ class BeingCacheEntry final { mFlags = flags; } protected: - std::string mName; /**< Name of character */ + std::string mName; /**< Name of character */ std::string mPartyName; std::string mGuildName; std::string mIp; - int mId; /**< Unique sprite id */ + BeingId mId; /**< Unique sprite id */ int mLevel; unsigned int mPvpRank; int mTime; -- cgit v1.2.3-70-g09d2