From e6f2965e420da97d989ea4650e2dfc66a0decb3a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 6 Jan 2016 20:16:35 +0300 Subject: Add noexcept into graphics. --- src/render/graphics.h | 32 ++++++++++++++++---------------- src/render/openglgraphicsdef.hpp | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/render') diff --git a/src/render/graphics.h b/src/render/graphics.h index 13070e90c..e72f8d1d6 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -135,7 +135,7 @@ class Graphics notfinal mRect.h = static_cast(height); } - SDL_Window *getWindow() const restrict2 + SDL_Window *getWindow() const restrict2 noexcept { return mWindow; } /** @@ -144,7 +144,7 @@ class Graphics notfinal */ void setSync(const bool sync) restrict2; - bool getSync() const restrict2 A_WARN_UNUSED + bool getSync() const restrict2 noexcept A_WARN_UNUSED { return mSync; } /** @@ -271,37 +271,37 @@ class Graphics notfinal ClipRect &getTopClip() restrict2 A_WARN_UNUSED { return mClipStack.top(); } - void setRedraw(const bool n) restrict2 + void setRedraw(const bool n) restrict2 noexcept { mRedraw = n; } - bool getRedraw() const restrict2 A_WARN_UNUSED + bool getRedraw() const restrict2 noexcept A_WARN_UNUSED { return mRedraw; } - void setSecure(const bool n) restrict2 + void setSecure(const bool n) restrict2 noexcept { mSecure = n; } - bool getSecure() const restrict2 A_WARN_UNUSED + bool getSecure() const restrict2 noexcept A_WARN_UNUSED { return mSecure; } - int getBpp() const restrict2 A_WARN_UNUSED + int getBpp() const restrict2 noexcept A_WARN_UNUSED { return mBpp; } - bool getFullScreen() const restrict2 A_WARN_UNUSED + bool getFullScreen() const restrict2 noexcept A_WARN_UNUSED { return mFullscreen; } - bool getHWAccel() const restrict2 A_WARN_UNUSED + bool getHWAccel() const restrict2 noexcept A_WARN_UNUSED { return mHWAccel; } - bool getDoubleBuffer() const restrict2 A_WARN_UNUSED + bool getDoubleBuffer() const restrict2 noexcept A_WARN_UNUSED { return mDoubleBuffer; } - RenderType getOpenGL() const restrict2 A_WARN_UNUSED + RenderType getOpenGL() const restrict2 noexcept A_WARN_UNUSED { return mOpenGL; } - void setNoFrame(const bool n) restrict2 + void setNoFrame(const bool n) restrict2 noexcept { mNoFrame = n; } - const std::string &getName() const restrict2 A_WARN_UNUSED + const std::string &getName() const restrict2 noexcept A_WARN_UNUSED { return mName; } virtual void initArrays(const int vertCount A_UNUSED) restrict2 @@ -313,7 +313,7 @@ class Graphics notfinal mAlpha = (color.a != 255); } - const Color &getColor() const restrict2 + const Color &getColor() const restrict2 noexcept { return mColor; } #ifdef DEBUG_DRAW_CALLS @@ -353,10 +353,10 @@ class Graphics notfinal virtual void completeCache() restrict2 = 0; - int getScale() const restrict2 + int getScale() const restrict2 noexcept { return mScale; } - virtual bool isAllowScale() const restrict2 + virtual bool isAllowScale() const restrict2 noexcept { return false; } void setScale(int scale) restrict2; diff --git a/src/render/openglgraphicsdef.hpp b/src/render/openglgraphicsdef.hpp index 31974bb52..4b32c6442 100644 --- a/src/render/openglgraphicsdef.hpp +++ b/src/render/openglgraphicsdef.hpp @@ -34,7 +34,7 @@ public: void updateTextureFormat() restrict2; - bool isAllowScale() const restrict2 override final + bool isAllowScale() const restrict2 noexcept override final { return true; } void clearScreen() const restrict2 override final; -- cgit v1.2.3-70-g09d2