summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-07 19:27:10 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-07 19:27:10 +0300
commit1708cce0de3c195b0ecaa8a5f8383712dc0d4c13 (patch)
tree7d10563a677bfce0a9ee2aa0bb1d578b1b0807d1 /src/render
parent3dbdda0d3070a093f8a341f897ce4310a8b52bd2 (diff)
downloadplus-1708cce0de3c195b0ecaa8a5f8383712dc0d4c13.tar.gz
plus-1708cce0de3c195b0ecaa8a5f8383712dc0d4c13.tar.bz2
plus-1708cce0de3c195b0ecaa8a5f8383712dc0d4c13.tar.xz
plus-1708cce0de3c195b0ecaa8a5f8383712dc0d4c13.zip
In renderers in function drawTileCollection add non null attributes.
Diffstat (limited to 'src/render')
-rw-r--r--src/render/graphics.h3
-rw-r--r--src/render/graphicsdef.hpp3
-rw-r--r--src/render/imagegraphics.h2
-rw-r--r--src/render/mobileopengl2graphics.cpp2
-rw-r--r--src/render/mobileopenglgraphics.cpp2
-rw-r--r--src/render/modernopenglgraphics.cpp2
-rw-r--r--src/render/normalopenglgraphics.cpp2
-rw-r--r--src/render/nullopenglgraphics.cpp2
-rw-r--r--src/render/sdl2graphics.cpp2
-rw-r--r--src/render/sdl2softwaregraphics.cpp2
-rw-r--r--src/render/sdlgraphics.cpp2
-rw-r--r--src/render/surfacegraphics.h2
12 files changed, 6 insertions, 20 deletions
diff --git a/src/render/graphics.h b/src/render/graphics.h
index 98cfa899e..012f423f3 100644
--- a/src/render/graphics.h
+++ b/src/render/graphics.h
@@ -223,7 +223,8 @@ class Graphics notfinal
restrict2 = 0;
virtual void drawTileCollection(const ImageCollection
- *restrict const vertCol) restrict2 = 0;
+ *restrict const vertCol) restrict2
+ A_NONNULL(2) = 0;
virtual void calcTileCollection(ImageCollection *restrict const
vertCol,
diff --git a/src/render/graphicsdef.hpp b/src/render/graphicsdef.hpp
index 0a4f66317..11aec9e1e 100644
--- a/src/render/graphicsdef.hpp
+++ b/src/render/graphicsdef.hpp
@@ -83,7 +83,8 @@ public:
restrict2 override final;
void drawTileCollection(const ImageCollection
- *restrict const vertCol) restrict2 override final;
+ *restrict const vertCol) restrict2 override final
+ A_NONNULL(2);
void updateScreen() restrict2 override final;
diff --git a/src/render/imagegraphics.h b/src/render/imagegraphics.h
index 53fc22f95..8db6cd8c6 100644
--- a/src/render/imagegraphics.h
+++ b/src/render/imagegraphics.h
@@ -128,7 +128,7 @@ class ImegeGraphics final : public Graphics
{ }
void drawTileCollection(const ImageCollection *const vertCol A_UNUSED)
- override final
+ override final A_NONNULL(2)
{ }
void updateScreen() override final
diff --git a/src/render/mobileopengl2graphics.cpp b/src/render/mobileopengl2graphics.cpp
index c1a7e43df..03810447a 100644
--- a/src/render/mobileopengl2graphics.cpp
+++ b/src/render/mobileopengl2graphics.cpp
@@ -704,8 +704,6 @@ void MobileOpenGL2Graphics::drawTileCollection(const ImageCollection
*restrict const vertCol)
restrict2
{
- if (!vertCol)
- return;
setTexturingAndBlending(true);
const ImageVertexesVector &draws = vertCol->draws;
const ImageCollectionCIter it_end = draws.end();
diff --git a/src/render/mobileopenglgraphics.cpp b/src/render/mobileopenglgraphics.cpp
index 54f9a408c..df52adfe0 100644
--- a/src/render/mobileopenglgraphics.cpp
+++ b/src/render/mobileopenglgraphics.cpp
@@ -745,8 +745,6 @@ void MobileOpenGLGraphics::drawTileCollection(const ImageCollection *
restrict const vertCol)
restrict2
{
- if (!vertCol)
- return;
const ImageVertexesVector &draws = vertCol->draws;
const ImageCollectionCIter it_end = draws.end();
for (ImageCollectionCIter it = draws.begin(); it != it_end; ++ it)
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index 8f3c76ea5..3a16c14a4 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -690,8 +690,6 @@ void ModernOpenGLGraphics::drawTileCollection(const ImageCollection
*restrict const vertCol)
restrict2
{
- if (!vertCol)
- return;
setTexturingAndBlending(true);
/*
if (!vertCol)
diff --git a/src/render/normalopenglgraphics.cpp b/src/render/normalopenglgraphics.cpp
index c11b4d352..fdfa4fece 100644
--- a/src/render/normalopenglgraphics.cpp
+++ b/src/render/normalopenglgraphics.cpp
@@ -1048,8 +1048,6 @@ void NormalOpenGLGraphics::drawTileCollection(const ImageCollection
*restrict const vertCol)
restrict2
{
- if (!vertCol)
- return;
const ImageVertexesVector &draws = vertCol->draws;
const ImageCollectionCIter it_end = draws.end();
for (ImageCollectionCIter it = draws.begin(); it != it_end; ++ it)
diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp
index 9785fb089..a2f93f588 100644
--- a/src/render/nullopenglgraphics.cpp
+++ b/src/render/nullopenglgraphics.cpp
@@ -738,8 +738,6 @@ void NullOpenGLGraphics::calcTileCollection(ImageCollection *
void NullOpenGLGraphics::drawTileCollection(const ImageCollection
*restrict const vertCol) restrict2
{
- if (!vertCol)
- return;
const ImageVertexesVector &draws = vertCol->draws;
const ImageCollectionCIter it_end = draws.end();
for (ImageCollectionCIter it = draws.begin(); it != it_end; ++ it)
diff --git a/src/render/sdl2graphics.cpp b/src/render/sdl2graphics.cpp
index 58e636a54..96ade5e4f 100644
--- a/src/render/sdl2graphics.cpp
+++ b/src/render/sdl2graphics.cpp
@@ -563,8 +563,6 @@ void SDLGraphics::calcTileCollection(ImageCollection *restrict const vertCol,
void SDLGraphics::drawTileCollection(const ImageCollection
*restrict const vertCol) restrict2
{
- if (!vertCol)
- return;
const ImageVertexesVector &draws = vertCol->draws;
const ImageCollectionCIter it_end = draws.end();
for (ImageCollectionCIter it = draws.begin(); it != it_end; ++ it)
diff --git a/src/render/sdl2softwaregraphics.cpp b/src/render/sdl2softwaregraphics.cpp
index 9a61f94ca..f59ee5f51 100644
--- a/src/render/sdl2softwaregraphics.cpp
+++ b/src/render/sdl2softwaregraphics.cpp
@@ -765,8 +765,6 @@ void SDL2SoftwareGraphics::drawTileCollection(const ImageCollection
*restrict const vertCol)
restrict2
{
- if (!vertCol)
- return;
const ImageVertexesVector &draws = vertCol->draws;
const ImageCollectionCIter it_end = draws.end();
for (ImageCollectionCIter it = draws.begin(); it != it_end; ++ it)
diff --git a/src/render/sdlgraphics.cpp b/src/render/sdlgraphics.cpp
index 01acb5f57..f8ed1a38d 100644
--- a/src/render/sdlgraphics.cpp
+++ b/src/render/sdlgraphics.cpp
@@ -735,8 +735,6 @@ void SDLGraphics::calcTileCollection(ImageCollection *restrict const vertCol,
void SDLGraphics::drawTileCollection(const ImageCollection
*restrict const vertCol) restrict2
{
- if (!vertCol)
- return;
const ImageVertexesVector &draws = vertCol->draws;
const ImageCollectionCIter it_end = draws.end();
for (ImageCollectionCIter it = draws.begin(); it != it_end; ++ it)
diff --git a/src/render/surfacegraphics.h b/src/render/surfacegraphics.h
index d80161a38..d57e1676a 100644
--- a/src/render/surfacegraphics.h
+++ b/src/render/surfacegraphics.h
@@ -131,7 +131,7 @@ class SurfaceGraphics final : public Graphics
void drawTileCollection(const ImageCollection *restrict const
vertCol A_UNUSED)
- restrict2 override final
+ restrict2 override final A_NONNULL(2)
{ }
void updateScreen() override final