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/actorsprite.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/being/actorsprite.h') diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h index bc7aca3ee..9e676193e 100644 --- a/src/being/actorsprite.h +++ b/src/being/actorsprite.h @@ -32,6 +32,7 @@ #include "enums/being/targetcursorsize.h" #include "enums/being/targetcursortype.h" +#include "enums/simpletypes/beingid.h" #include "enums/simpletypes/enable.h" #include "enums/simpletypes/forcedisplay.h" @@ -49,16 +50,16 @@ struct SpriteDisplay; class ActorSprite notfinal : public CompoundSprite, public Actor { public: - explicit ActorSprite(const int id); + explicit ActorSprite(const BeingId id); A_DELETE_COPY(ActorSprite) virtual ~ActorSprite(); - 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; } /** @@ -224,7 +225,7 @@ class ActorSprite notfinal : public CompoundSprite, public Actor ParticleList mStunParticleEffects; ParticleVector mStatusParticleEffects; ParticleList mChildParticleEffects; - int mId; + BeingId mId; uint16_t mStunMode; /**< Stun mode; zero if not stunned */ /** Target cursor being used */ -- cgit v1.2.3-70-g09d2