summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-19 22:31:44 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-19 22:31:44 +0300
commitb91ccaac17551591ffafadee4323ff76076f7b69 (patch)
tree8e89c80d6adb7ca29cfcbf7bc6319829ab78a6f6 /src
parent4ce68c50a49c0c9391b37a17505313d834f93c22 (diff)
downloadmv-b91ccaac17551591ffafadee4323ff76076f7b69.tar.gz
mv-b91ccaac17551591ffafadee4323ff76076f7b69.tar.bz2
mv-b91ccaac17551591ffafadee4323ff76076f7b69.tar.xz
mv-b91ccaac17551591ffafadee4323ff76076f7b69.zip
add noexcept into action.
Diffstat (limited to 'src')
-rw-r--r--src/resources/action.cpp9
-rw-r--r--src/resources/action.h14
2 files changed, 13 insertions, 10 deletions
diff --git a/src/resources/action.cpp b/src/resources/action.cpp
index 9b4d4b57a..d7bf44911 100644
--- a/src/resources/action.cpp
+++ b/src/resources/action.cpp
@@ -29,7 +29,7 @@
#include "debug.h"
-Action::Action() :
+Action::Action() noexcept :
mAnimations(),
mNumber(100)
{
@@ -40,7 +40,7 @@ Action::~Action()
delete_all(mAnimations);
}
-const Animation *Action::getAnimation(int direction) const
+const Animation *Action::getAnimation(int direction) const noexcept
{
Animations::const_iterator i = mAnimations.find(direction);
@@ -66,12 +66,13 @@ const Animation *Action::getAnimation(int direction) const
return (i == mAnimations.end()) ? nullptr : i->second;
}
-void Action::setAnimation(const int direction, Animation *const animation)
+void Action::setAnimation(const int direction,
+ Animation *const animation) noexcept
{
mAnimations[direction] = animation;
}
-void Action::setLastFrameDelay(const int delay)
+void Action::setLastFrameDelay(const int delay) noexcept
{
FOR_EACH (AnimationIter, it, mAnimations)
{
diff --git a/src/resources/action.h b/src/resources/action.h
index c3b4852b3..43259d5c6 100644
--- a/src/resources/action.h
+++ b/src/resources/action.h
@@ -35,23 +35,25 @@ class Animation;
class Action final
{
public:
- Action();
+ Action() noexcept;
A_DELETE_COPY(Action)
~Action();
- void setAnimation(const int direction, Animation *const animation);
+ void setAnimation(const int direction,
+ Animation *const animation) noexcept;
- const Animation *getAnimation(int direction) const A_WARN_UNUSED;
+ const Animation *getAnimation(int direction) const
+ noexcept A_WARN_UNUSED;
- unsigned getNumber() const A_WARN_UNUSED
+ unsigned getNumber() const noexcept A_WARN_UNUSED
{ return mNumber; }
- void setNumber(const unsigned n)
+ void setNumber(const unsigned n) noexcept
{ mNumber = n; }
- void setLastFrameDelay(const int delay);
+ void setLastFrameDelay(const int delay) noexcept;
protected:
typedef std::map<int, Animation*> Animations;