diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-06 23:34:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-07 19:23:40 +0300 |
commit | 36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch) | |
tree | 190156cb88b13a38a6d13c69ee0742cc078065a1 /src/gui/fonts/textchunk.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2 manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz manaverse-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip |
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/fonts/textchunk.cpp')
-rw-r--r-- | src/gui/fonts/textchunk.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/fonts/textchunk.cpp b/src/gui/fonts/textchunk.cpp index de2c58084..694790881 100644 --- a/src/gui/fonts/textchunk.cpp +++ b/src/gui/fonts/textchunk.cpp @@ -113,7 +113,7 @@ void TextChunk::generate(TTF_Font *restrict const font, SDL_Surface *surface = MTTF_RenderUTF8_Blended( font, strBuf, sdlCol); - if (!surface) + if (surface == nullptr) { img = nullptr; BLOCK_END("TextChunk::generate") @@ -129,7 +129,7 @@ void TextChunk::generate(TTF_Font *restrict const font, SDL_Color sdlCol2; SDL_Surface *const background = imageHelper->create32BitSurface( width, height); - if (!background) + if (background == nullptr) { img = nullptr; MSDL_FreeSurface(surface); @@ -148,7 +148,7 @@ void TextChunk::generate(TTF_Font *restrict const font, SDL_Surface *const surface2 = MTTF_RenderUTF8_Blended( font, strBuf, sdlCol2); - if (!surface2) + if (surface2 == nullptr) { img = nullptr; MSDL_FreeSurface(surface); @@ -191,7 +191,7 @@ void TextChunk::generate(TTF_Font *restrict const font, void TextChunk::deleteImage() { - if (textFont) + if (textFont != nullptr) { textFont->insertChunk(this); img = nullptr; |