summaryrefslogtreecommitdiff
path: root/src/render/nullopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/render/nullopenglgraphics.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/render/nullopenglgraphics.cpp')
-rw-r--r--src/render/nullopenglgraphics.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/render/nullopenglgraphics.cpp b/src/render/nullopenglgraphics.cpp
index 2526c9feb..dac86b519 100644
--- a/src/render/nullopenglgraphics.cpp
+++ b/src/render/nullopenglgraphics.cpp
@@ -81,11 +81,11 @@ void NullOpenGLGraphics::initArrays(const int vertCount) restrict2
// need alocate small size, after if limit reached reallocate to double size
vertexBufSize = mMaxVertices;
const size_t sz = mMaxVertices * 4 + 30;
- if (!mFloatTexArray)
+ if (mFloatTexArray == nullptr)
mFloatTexArray = new GLfloat[sz];
- if (!mIntTexArray)
+ if (mIntTexArray == nullptr)
mIntTexArray = new GLint[sz];
- if (!mIntVertArray)
+ if (mIntVertArray == nullptr)
mIntVertArray = new GLint[sz];
}
@@ -172,7 +172,7 @@ void NullOpenGLGraphics::drawImageInline(const Image *restrict const image,
int dstX, int dstY) restrict2
{
FUNC_BLOCK("Graphics::drawImage", 1)
- if (!image)
+ if (image == nullptr)
return;
setColorAlpha(image->mAlpha);
@@ -214,7 +214,7 @@ void NullOpenGLGraphics::drawRescaledImage(const Image *restrict const image,
const int desiredHeight) restrict2
{
FUNC_BLOCK("Graphics::drawRescaledImage", 1)
- if (!image)
+ if (image == nullptr)
return;
const SDL_Rect &imageRect = image->mBounds;
@@ -251,7 +251,7 @@ void NullOpenGLGraphics::drawPatternInline(const Image *restrict const image,
const int w, const int h) restrict2
{
FUNC_BLOCK("Graphics::drawPattern", 1)
- if (!image)
+ if (image == nullptr)
return;
const SDL_Rect &imageRect = image->mBounds;
@@ -385,7 +385,7 @@ void NullOpenGLGraphics::drawRescaledPattern(const Image *restrict const image,
const int scaledWidth,
const int scaledHeight) restrict2
{
- if (!image)
+ if (image == nullptr)
return;
if (scaledWidth == 0 || scaledHeight == 0)
@@ -590,7 +590,7 @@ void NullOpenGLGraphics::calcPatternInline(ImageVertexes *restrict const vert,
const int w,
const int h) const restrict2
{
- if (!image || !vert)
+ if (image == nullptr || vert == nullptr)
return;
const SDL_Rect &imageRect = image->mBounds;
@@ -722,7 +722,7 @@ void NullOpenGLGraphics::calcTileCollection(ImageCollection *
const Image *restrict const image,
int x, int y) restrict2
{
- if (!vertCol || !image)
+ if (vertCol == nullptr || image == nullptr)
return;
if (vertCol->currentGLImage != image->mGLImage)
{
@@ -765,7 +765,7 @@ void NullOpenGLGraphics::calcPattern(ImageCollection *restrict const vertCol,
const int x, const int y,
const int w, const int h) const restrict2
{
- if (!vertCol || !image)
+ if (vertCol == nullptr || image == nullptr)
return;
ImageVertexes *vert = nullptr;
if (vertCol->currentGLImage != image->mGLImage)
@@ -907,7 +907,7 @@ void NullOpenGLGraphics::calcTileVertexesInline(ImageVertexes *
void NullOpenGLGraphics::drawTileVertexes(const ImageVertexes *
restrict const vert) restrict2
{
- if (!vert)
+ if (vert == nullptr)
return;
const Image *const image = vert->image;
@@ -929,7 +929,7 @@ void NullOpenGLGraphics::calcWindow(ImageCollection *restrict const vertCol,
{
ImageVertexes *vert = nullptr;
Image *const image = imgRect.grid[4];
- if (!image)
+ if (image == nullptr)
return;
if (vertCol->currentGLImage != image->mGLImage)
{