summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-06 20:25:51 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-06 20:25:51 +0300
commitb98795bfc07a3bad493f0abac35f0b607447f582 (patch)
tree45424335744a256e89dac200f8d6e2fd1900963e /src
parente6f2965e420da97d989ea4650e2dfc66a0decb3a (diff)
downloadmanaplus-b98795bfc07a3bad493f0abac35f0b607447f582.tar.gz
manaplus-b98795bfc07a3bad493f0abac35f0b607447f582.tar.bz2
manaplus-b98795bfc07a3bad493f0abac35f0b607447f582.tar.xz
manaplus-b98795bfc07a3bad493f0abac35f0b607447f582.zip
Add noexcept into other renderers.
Diffstat (limited to 'src')
-rw-r--r--src/render/imagegraphics.h4
-rw-r--r--src/render/normalopenglgraphics.h2
-rw-r--r--src/render/openglgraphicsdefadvanced.hpp2
-rw-r--r--src/render/renderers.cpp6
-rw-r--r--src/render/renderers.h2
-rw-r--r--src/render/sdl2graphics.h2
-rw-r--r--src/render/sdl2softwaregraphics.h3
-rw-r--r--src/render/surfacegraphics.h8
8 files changed, 16 insertions, 13 deletions
diff --git a/src/render/imagegraphics.h b/src/render/imagegraphics.h
index 29cfbea18..5e74b766a 100644
--- a/src/render/imagegraphics.h
+++ b/src/render/imagegraphics.h
@@ -45,10 +45,10 @@ class ImegeGraphics final : public Graphics
~ImegeGraphics();
- void setTarget(Image *const target) restrict2
+ void setTarget(Image *const target) restrict2 noexcept
{ mTarget = target; }
- Image *getTarget() const restrict2
+ Image *getTarget() const restrict2 noexcept
{ return mTarget; }
void beginDraw() restrict2 override final
diff --git a/src/render/normalopenglgraphics.h b/src/render/normalopenglgraphics.h
index b07b466ad..4262b5aab 100644
--- a/src/render/normalopenglgraphics.h
+++ b/src/render/normalopenglgraphics.h
@@ -87,7 +87,7 @@ class NormalOpenGLGraphics final : public Graphics
#include "render/openglgraphicsdefadvanced.hpp"
#ifdef DEBUG_BIND_TEXTURE
- unsigned int getBinds() const restrict2
+ unsigned int getBinds() const restrict2 noexcept
{ return mLastBinds; }
#endif
diff --git a/src/render/openglgraphicsdefadvanced.hpp b/src/render/openglgraphicsdefadvanced.hpp
index 4a3f63609..7e1017c23 100644
--- a/src/render/openglgraphicsdefadvanced.hpp
+++ b/src/render/openglgraphicsdefadvanced.hpp
@@ -27,7 +27,7 @@ public:
void initArrays(const int vertCount) restrict2 override final;
#ifdef DEBUG_DRAW_CALLS
- unsigned int getDrawCalls() restrict2 const
+ unsigned int getDrawCalls() restrict2 const noexcept
{ return mLastDrawCalls; }
static unsigned int mDrawCalls;
diff --git a/src/render/renderers.cpp b/src/render/renderers.cpp
index 60aeda1a1..6d385d294 100644
--- a/src/render/renderers.cpp
+++ b/src/render/renderers.cpp
@@ -22,7 +22,9 @@
#include "debug.h"
-static RenderType getDefault()
+static RenderType getDefault() noexcept A_CONST;
+
+static RenderType getDefault() noexcept
{
#ifdef USE_OPENGL
#ifdef ANDROID
@@ -35,7 +37,7 @@ static RenderType getDefault()
#endif
}
-RenderType intToRenderType(const int mode)
+RenderType intToRenderType(const int mode) noexcept
{
if (mode < 0 || mode >= RENDER_LAST)
return getDefault();
diff --git a/src/render/renderers.h b/src/render/renderers.h
index a51277029..92aade7e9 100644
--- a/src/render/renderers.h
+++ b/src/render/renderers.h
@@ -25,7 +25,7 @@
#include "localconsts.h"
-RenderType intToRenderType(const int mode) A_CONST;
+RenderType intToRenderType(const int mode) noexcept A_CONST;
#define isBatchDrawRenders(val) ((val) != RENDER_SAFE_OPENGL)
diff --git a/src/render/sdl2graphics.h b/src/render/sdl2graphics.h
index 65a71d189..fe9cf841f 100644
--- a/src/render/sdl2graphics.h
+++ b/src/render/sdl2graphics.h
@@ -97,7 +97,7 @@ class SDLGraphics final : public Graphics
*/
~SDLGraphics();
- void setRendererFlags(const uint32_t flags) restrict
+ void setRendererFlags(const uint32_t flags) restrict noexcept
{ mRendererFlags = flags; }
#include "render/graphicsdef.hpp"
diff --git a/src/render/sdl2softwaregraphics.h b/src/render/sdl2softwaregraphics.h
index d6bb91bab..ac6970cb1 100644
--- a/src/render/sdl2softwaregraphics.h
+++ b/src/render/sdl2softwaregraphics.h
@@ -56,7 +56,8 @@ class SDL2SoftwareGraphics final : public Graphics
*/
~SDL2SoftwareGraphics();
- void setRendererFlags(const uint32_t flags) restrict2 override final
+ void setRendererFlags(const uint32_t flags)
+ restrict2 noexcept override final
{ mRendererFlags = flags; }
#include "render/graphicsdef.hpp"
diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h
index 5162a7874..8a9a61a3b 100644
--- a/src/render/surfacegraphics.h
+++ b/src/render/surfacegraphics.h
@@ -47,10 +47,10 @@ class SurfaceGraphics final : public Graphics
~SurfaceGraphics();
- void setTarget(SDL_Surface *restrict const target) restrict2
+ void setTarget(SDL_Surface *restrict const target) restrict2 noexcept
{ mTarget = target; }
- SDL_Surface *getTarget() const restrict2
+ SDL_Surface *getTarget() const restrict2 noexcept
{ return mTarget; }
void beginDraw() restrict2 override final
@@ -151,10 +151,10 @@ class SurfaceGraphics final : public Graphics
restrict2 override final
{ }
- void setBlitMode(const BlitModeT mode) restrict2
+ void setBlitMode(const BlitModeT mode) restrict2 noexcept
{ mBlitMode = mode; }
- BlitModeT getBlitMode() const restrict2 A_WARN_UNUSED
+ BlitModeT getBlitMode() const restrict2 noexcept A_WARN_UNUSED
{ return mBlitMode; }
void fillRectangle(const Rect &restrict rect A_UNUSED)