summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-07 17:57:21 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-07 17:57:21 +0300
commit3173688b7c1a1027257aa057039bd50738ac8bb5 (patch)
treeba415bfcc8e196a1e92eeed851778f957265dee6
parent852617a2ea3cfe83c1d0aec134d9369aa5c3af7b (diff)
downloadplus-3173688b7c1a1027257aa057039bd50738ac8bb5.tar.gz
plus-3173688b7c1a1027257aa057039bd50738ac8bb5.tar.bz2
plus-3173688b7c1a1027257aa057039bd50738ac8bb5.tar.xz
plus-3173688b7c1a1027257aa057039bd50738ac8bb5.zip
In renderers in function calcTileVertexes add non null attributes.
-rw-r--r--src/render/graphics.h3
-rw-r--r--src/render/graphicsdef.hpp6
-rw-r--r--src/render/imagegraphics.h1
-rw-r--r--src/render/mobileopengl2graphics.cpp3
-rw-r--r--src/render/mobileopenglgraphics.cpp3
-rw-r--r--src/render/modernopenglgraphics.cpp3
-rw-r--r--src/render/normalopenglgraphics.cpp3
-rw-r--r--src/render/nullopenglgraphics.cpp3
-rw-r--r--src/render/sdlgraphics.cpp4
-rw-r--r--src/render/surfacegraphics.h1
10 files changed, 8 insertions, 22 deletions
diff --git a/src/render/graphics.h b/src/render/graphics.h
index e72f8d1d6..98cfa899e 100644
--- a/src/render/graphics.h
+++ b/src/render/graphics.h
@@ -210,7 +210,8 @@ class Graphics notfinal
virtual void calcTileVertexes(ImageVertexes *restrict const vert,
const Image *restrict const image,
- int x, int y) const restrict2 = 0;
+ int x,
+ int y) const restrict2 A_NONNULL(2, 3) = 0;
virtual void calcTileSDL(ImageVertexes *restrict const vert A_UNUSED,
int x A_UNUSED,
diff --git a/src/render/graphicsdef.hpp b/src/render/graphicsdef.hpp
index e7b775ff0..0a4f66317 100644
--- a/src/render/graphicsdef.hpp
+++ b/src/render/graphicsdef.hpp
@@ -72,7 +72,8 @@ public:
void calcTileVertexes(ImageVertexes *restrict const vert,
const Image *restrict const image,
- int x, int y) const restrict2 override final;
+ int x, int y) const restrict2 override final
+ A_NONNULL(2, 3);
void calcTileCollection(ImageCollection *restrict const vertCol,
const Image *restrict const image,
@@ -141,7 +142,8 @@ private:
void inline calcTileVertexesInline(ImageVertexes *restrict const vert,
const Image *restrict const image,
int x,
- int y) const restrict2 A_INLINE;
+ int y) const restrict2
+ A_INLINE A_NONNULL(2, 3);
void inline drawImageInline(const Image *restrict const image,
int dstX,
diff --git a/src/render/imagegraphics.h b/src/render/imagegraphics.h
index 5e74b766a..53fc22f95 100644
--- a/src/render/imagegraphics.h
+++ b/src/render/imagegraphics.h
@@ -108,6 +108,7 @@ class ImegeGraphics final : public Graphics
const Image *restrict const image A_UNUSED,
int x A_UNUSED,
int y A_UNUSED) const restrict2 override final
+ A_NONNULL(2, 3)
{ }
void calcTileSDL(ImageVertexes *restrict const vert A_UNUSED,
diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp
index a1bcd00b0..c1a7e43df 100644
--- a/src/render/mobileopengl2graphics.cpp
+++ b/src/render/mobileopengl2graphics.cpp
@@ -766,9 +766,6 @@ void MobileOpenGL2Graphics::calcTileVertexesInline(ImageVertexes *
int dstX,
int dstY) const restrict2
{
- if (!vert || !image)
- return;
-
const SDL_Rect &imageRect = image->mBounds;
const int w = imageRect.w;
const int h = imageRect.h;
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index fb4651409..54f9a408c 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -804,9 +804,6 @@ void MobileOpenGLGraphics::calcTileVertexesInline(ImageVertexes *
int dstX,
int dstY) const restrict2
{
- if (!vert || !image)
- return;
-
const SDL_Rect &imageRect = image->mBounds;
const int srcX = imageRect.x;
const int srcY = imageRect.y;
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index 6f02f022c..8f3c76ea5 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -756,9 +756,6 @@ void ModernOpenGLGraphics::calcTileVertexesInline(ImageVertexes *
int dstX,
int dstY) const restrict2
{
- if (!vert || !image)
- return;
-
const SDL_Rect &imageRect = image->mBounds;
const int srcX = imageRect.x;
const int srcY = imageRect.y;
diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp
index 74ba1d403..c11b4d352 100644
--- a/src/render/normalopenglgraphics.cpp
+++ b/src/render/normalopenglgraphics.cpp
@@ -1107,9 +1107,6 @@ void NormalOpenGLGraphics::calcTileVertexesInline(ImageVertexes *
int dstX,
int dstY) const restrict2
{
- if (!vert || !image)
- return;
-
const SDL_Rect &imageRect = image->mBounds;
const int w = imageRect.w;
const int h = imageRect.h;
diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp
index 592a749a4..9785fb089 100644
--- a/src/render/nullopenglgraphics.cpp
+++ b/src/render/nullopenglgraphics.cpp
@@ -795,9 +795,6 @@ void NullOpenGLGraphics::calcTileVertexesInline(ImageVertexes *
int dstX,
int dstY) const restrict2
{
- if (!vert || !image)
- return;
-
const SDL_Rect &imageRect = image->mBounds;
const int w = imageRect.w;
const int h = imageRect.h;
diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp
index 0043d1ccc..01acb5f57 100644
--- a/src/render/sdlgraphics.cpp
+++ b/src/render/sdlgraphics.cpp
@@ -670,8 +670,6 @@ void SDLGraphics::calcTileVertexes(ImageVertexes *restrict const vert,
const Image *restrict const image,
int x, int y) const restrict2
{
- if (!vert || !image)
- return;
vert->image = image;
calcTileSDL(vert, x, y);
}
@@ -680,8 +678,6 @@ void SDLGraphics::calcTileVertexesInline(ImageVertexes *restrict const vert,
const Image *restrict const image,
int x, int y) const restrict2
{
- if (!vert || !image)
- return;
vert->image = image;
calcTileSDL(vert, x, y);
}
diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h
index 8a9a61a3b..d80161a38 100644
--- a/src/render/surfacegraphics.h
+++ b/src/render/surfacegraphics.h
@@ -110,6 +110,7 @@ class SurfaceGraphics final : public Graphics
const Image *restrict const image A_UNUSED,
int x A_UNUSED,
int y A_UNUSED) const restrict2 override final
+ A_NONNULL(2, 3)
{ }
void calcTileSDL(ImageVertexes *restrict const vert A_UNUSED,