From 7969f0590204ac48d74e98c3211bca27693bac44 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 30 May 2015 00:36:56 +0300 Subject: Convert TargetCursorType enum into strong typed enum. --- src/being/actorsprite.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/being/actorsprite.cpp') diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp index eb2268eb9..1f7ea4b95 100644 --- a/src/being/actorsprite.cpp +++ b/src/being/actorsprite.cpp @@ -52,7 +52,8 @@ #define end_foreach } -AnimatedSprite *ActorSprite::targetCursor[TargetCursorType::NUM_TCT] +AnimatedSprite *ActorSprite::targetCursor + [static_cast(TargetCursorType::NUM_TCT)] [static_cast(TargetCursorSize::NUM_TC)]; bool ActorSprite::loaded = false; @@ -145,7 +146,7 @@ void ActorSprite::controlParticle(Particle *const particle) mChildParticleEffects.addLocally(particle); } -void ActorSprite::setTargetType(const TargetCursorType::Type type) +void ActorSprite::setTargetType(const TargetCursorTypeT type) { if (type == TargetCursorType::NONE) { @@ -351,7 +352,7 @@ void ActorSprite::removeActorSpriteListener(ActorSpriteListener *const mActorSpriteListeners.remove(listener); } -static const char *cursorType(const int type) +static const char *cursorType(const TargetCursorTypeT type) { switch (type) { @@ -387,7 +388,7 @@ void ActorSprite::initTargetCursor() targetCursor[type][size] = AnimatedSprite::load( Theme::resolveThemePath(strprintf( targetCursorFile.c_str(), - cursorType(type), + cursorType(static_cast(type)), cursorSize(static_cast(size))))); } end_foreach -- cgit v1.2.3-60-g2f50