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/windows/emotewindow.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2 manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz manaplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip |
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/windows/emotewindow.cpp')
-rw-r--r-- | src/gui/windows/emotewindow.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/windows/emotewindow.cpp b/src/gui/windows/emotewindow.cpp index 796e3f342..0125177b1 100644 --- a/src/gui/windows/emotewindow.cpp +++ b/src/gui/windows/emotewindow.cpp @@ -77,7 +77,7 @@ EmoteWindow::EmoteWindow() : setShowTitle(false); setResizable(true); - if (setupWindow) + if (setupWindow != nullptr) setupWindow->registerWindowForReset(this); addMouseListener(this); @@ -110,12 +110,12 @@ void EmoteWindow::postInit() mFontPage->setCenter(true); mTextPage->setCenter(true); - if (mImageSet && mImageSet->size() >= 3) + if ((mImageSet != nullptr) && mImageSet->size() >= 3) { for (int f = 0; f < 3; f ++) { Image *const image = mImageSet->get(f); - if (image) + if (image != nullptr) image->incRef(); } @@ -155,7 +155,7 @@ EmoteWindow::~EmoteWindow() delete2(mTextPage); delete2(mTextModel); delete2(mScrollTextPage); - if (mImageSet) + if (mImageSet != nullptr) { mImageSet->decRef(); mImageSet = nullptr; @@ -230,7 +230,7 @@ std::string EmoteWindow::getSelectedFont() const if (index < 0) return std::string(); - if (!index) + if (index == 0) return "##b"; else return "##B"; |