summaryrefslogtreecommitdiff
path: root/src/resources/animation
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-30 21:18:24 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-30 21:18:24 +0300
commit9ff808fb20962884d56147d46c8e4de915a0735d (patch)
treeb09025e75c2e57a48e5be971953edbc14b466846 /src/resources/animation
parentaaa274245a584c633dcfdb5444bbc1dc21c0c28f (diff)
downloadplus-9ff808fb20962884d56147d46c8e4de915a0735d.tar.gz
plus-9ff808fb20962884d56147d46c8e4de915a0735d.tar.bz2
plus-9ff808fb20962884d56147d46c8e4de915a0735d.tar.xz
plus-9ff808fb20962884d56147d46c8e4de915a0735d.zip
Disable noexcept for clang and old gcc versions.
Diffstat (limited to 'src/resources/animation')
-rw-r--r--src/resources/animation/animation.cpp20
-rw-r--r--src/resources/animation/animation.h24
2 files changed, 22 insertions, 22 deletions
diff --git a/src/resources/animation/animation.cpp b/src/resources/animation/animation.cpp
index e505bc215..9c3361db5 100644
--- a/src/resources/animation/animation.cpp
+++ b/src/resources/animation/animation.cpp
@@ -24,14 +24,14 @@
#include "debug.h"
-Animation::Animation() noexcept :
+Animation::Animation() noexcept2 :
mFrames(),
mName("animation"),
mDuration(0)
{
}
-Animation::Animation(const std::string &name) noexcept :
+Animation::Animation(const std::string &name) noexcept2 :
mFrames(),
mName(name),
mDuration(0)
@@ -40,7 +40,7 @@ Animation::Animation(const std::string &name) noexcept :
void Animation::addFrame(Image *const image, const int delay,
const int offsetX, const int offsetY,
- const int rand) noexcept
+ const int rand) noexcept2
{
Frame frame
= { image, delay, offsetX, offsetY, rand, Frame::ANIMATION, "" };
@@ -48,41 +48,41 @@ void Animation::addFrame(Image *const image, const int delay,
mDuration += delay;
}
-void Animation::addTerminator(const int rand) noexcept
+void Animation::addTerminator(const int rand) noexcept2
{
addFrame(nullptr, 0, 0, 0, rand);
}
-bool Animation::isTerminator(const Frame &candidate) noexcept
+bool Animation::isTerminator(const Frame &candidate) noexcept2
{
return (!candidate.image && candidate.type == Frame::ANIMATION);
}
-void Animation::addJump(const std::string &name, const int rand) noexcept
+void Animation::addJump(const std::string &name, const int rand) noexcept2
{
Frame frame = { nullptr, 0, 0, 0, rand, Frame::JUMP, name };
mFrames.push_back(frame);
}
-void Animation::addLabel(const std::string &name) noexcept
+void Animation::addLabel(const std::string &name) noexcept2
{
Frame frame = { nullptr, 0, 0, 0, 100, Frame::LABEL, name };
mFrames.push_back(frame);
}
-void Animation::addGoto(const std::string &name, const int rand) noexcept
+void Animation::addGoto(const std::string &name, const int rand) noexcept2
{
Frame frame = { nullptr, 0, 0, 0, rand, Frame::GOTO, name };
mFrames.push_back(frame);
}
-void Animation::addPause(const int delay, const int rand) noexcept
+void Animation::addPause(const int delay, const int rand) noexcept2
{
Frame frame = { nullptr, delay, 0, 0, rand, Frame::PAUSE, "" };
mFrames.push_back(frame);
}
-void Animation::setLastFrameDelay(const int delay) noexcept
+void Animation::setLastFrameDelay(const int delay) noexcept2
{
for (FramesRevIter it = mFrames.rbegin(), it_end = mFrames.rend();
it != it_end; ++ it)
diff --git a/src/resources/animation/animation.h b/src/resources/animation/animation.h
index 55668f324..7a0ade3fa 100644
--- a/src/resources/animation/animation.h
+++ b/src/resources/animation/animation.h
@@ -43,38 +43,38 @@ class Animation final : public MemoryCounter
friend class SimpleAnimation;
public:
- Animation() noexcept;
+ Animation() noexcept2;
- explicit Animation(const std::string &name) noexcept;
+ explicit Animation(const std::string &name) noexcept2;
/**
* Appends a new animation at the end of the sequence.
*/
void addFrame(Image *const image, const int delay,
const int offsetX, const int offsetY,
- const int rand) noexcept;
+ const int rand) noexcept2;
/**
* Appends an animation terminator that states that the animation
* should not loop.
*/
- void addTerminator(const int rand) noexcept;
+ void addTerminator(const int rand) noexcept2;
/**
* Returns the length of this animation in frames.
*/
- size_t getLength() const noexcept A_WARN_UNUSED
+ size_t getLength() const noexcept2 A_WARN_UNUSED
{ return mFrames.size(); }
- void addJump(const std::string &name, const int rand) noexcept;
+ void addJump(const std::string &name, const int rand) noexcept2;
- void addLabel(const std::string &name) noexcept;
+ void addLabel(const std::string &name) noexcept2;
- void addGoto(const std::string &name, const int rand) noexcept;
+ void addGoto(const std::string &name, const int rand) noexcept2;
- void addPause(const int delay, const int rand) noexcept;
+ void addPause(const int delay, const int rand) noexcept2;
- void setLastFrameDelay(const int delay) noexcept;
+ void setLastFrameDelay(const int delay) noexcept2;
typedef std::vector<Frame> Frames;
typedef Frames::iterator FramesIter;
@@ -82,7 +82,7 @@ class Animation final : public MemoryCounter
typedef Frames::reverse_iterator FramesRevIter;
#ifdef UNITTESTS
- Frames &getFrames() noexcept
+ Frames &getFrames() noexcept2
{ return mFrames; }
#endif
@@ -94,7 +94,7 @@ class Animation final : public MemoryCounter
/**
* Determines whether the given animation frame is a terminator.
*/
- static bool isTerminator(const Frame &phase) noexcept A_WARN_UNUSED;
+ static bool isTerminator(const Frame &phase) noexcept2 A_WARN_UNUSED;
protected:
Frames mFrames;