summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/resources/sprite/animatedsprite.cpp2
-rw-r--r--src/resources/sprite/animatedsprite.h19
2 files changed, 11 insertions, 10 deletions
diff --git a/src/resources/sprite/animatedsprite.cpp b/src/resources/sprite/animatedsprite.cpp
index 27b221bd8..216d94106 100644
--- a/src/resources/sprite/animatedsprite.cpp
+++ b/src/resources/sprite/animatedsprite.cpp
@@ -388,7 +388,7 @@ std::string AnimatedSprite::getIdPath() const restrict2
return mSprite->getIdPath();
}
-const Image* AnimatedSprite::getImage() const restrict2
+const Image* AnimatedSprite::getImage() const restrict2 noexcept
{
return mFrame ? mFrame->image : nullptr;
}
diff --git a/src/resources/sprite/animatedsprite.h b/src/resources/sprite/animatedsprite.h
index 82372e61f..53423b77a 100644
--- a/src/resources/sprite/animatedsprite.h
+++ b/src/resources/sprite/animatedsprite.h
@@ -77,18 +77,19 @@ class AnimatedSprite final : public Sprite
int getHeight() const restrict2 override final A_WARN_UNUSED;
- const Image* getImage() const restrict2 override final A_WARN_UNUSED;
+ const Image* getImage() const restrict2 noexcept override final
+ A_WARN_UNUSED;
bool setSpriteDirection(const SpriteDirection::Type direction)
restrict2 override final;
- int getNumberOfLayers() const restrict2 A_WARN_UNUSED
+ int getNumberOfLayers() const restrict2 noexcept A_WARN_UNUSED
{ return 1; }
std::string getIdPath() const restrict2 A_WARN_UNUSED;
- unsigned int getCurrentFrame() const
- restrict2 override final A_WARN_UNUSED
+ unsigned int getCurrentFrame() const restrict2 noexcept override final
+ A_WARN_UNUSED
{ return mFrameIndex; }
unsigned int getFrameCount() const
@@ -100,19 +101,19 @@ class AnimatedSprite final : public Sprite
bool updateNumber(const unsigned num) restrict2 override final;
- void clearDelayLoad() restrict2
+ void clearDelayLoad() restrict2 noexcept
{ mDelayLoad = nullptr; }
- void setSprite(SpriteDef *restrict const sprite) restrict2
+ void setSprite(SpriteDef *restrict const sprite) restrict2 noexcept
{ mSprite = sprite; }
- bool isTerminated() const restrict2
+ bool isTerminated() const restrict2 noexcept
{ return mTerminated; }
- static void setEnableCache(const bool b)
+ static void setEnableCache(const bool b) noexcept
{ mEnableCache = b; }
- void setLastTime(const int time)
+ void setLastTime(const int time) noexcept
{ mLastTime = time; }
#ifdef UNITTESTS