summaryrefslogtreecommitdiff
path: root/src/gui/widgets/emotepage.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/gui/widgets/emotepage.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmanaverse-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/widgets/emotepage.cpp')
-rw-r--r--src/gui/widgets/emotepage.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/emotepage.cpp b/src/gui/widgets/emotepage.cpp
index 771813d1b..459e386a4 100644
--- a/src/gui/widgets/emotepage.cpp
+++ b/src/gui/widgets/emotepage.cpp
@@ -54,7 +54,7 @@ EmotePage::EmotePage(const Widget2 *const widget) :
EmotePage::~EmotePage()
{
- if (mEmotes)
+ if (mEmotes != nullptr)
{
mEmotes->decRef();
mEmotes = nullptr;
@@ -68,7 +68,7 @@ void EmotePage::draw(Graphics *const graphics)
if (mRedraw)
{
- if (!mEmotes)
+ if (mEmotes == nullptr)
return;
const std::vector<Image*> &images = mEmotes->getImages();
@@ -82,7 +82,7 @@ void EmotePage::draw(Graphics *const graphics)
FOR_EACH (std::vector<Image*>::const_iterator, it, images)
{
const Image *const image = *it;
- if (image)
+ if (image != nullptr)
{
graphics->calcTileCollection(mVertexes, image, x, y);
x += emoteWidth;
@@ -104,7 +104,7 @@ void EmotePage::safeDraw(Graphics *const graphics)
{
BLOCK_START("EmotePage::safeDraw")
- if (!mEmotes)
+ if (mEmotes == nullptr)
return;
const std::vector<Image*> &images = mEmotes->getImages();
@@ -116,7 +116,7 @@ void EmotePage::safeDraw(Graphics *const graphics)
FOR_EACH (std::vector<Image*>::const_iterator, it, images)
{
const Image *const image = *it;
- if (image)
+ if (image != nullptr)
{
graphics->drawImage(image, x, y);
x += emoteWidth;