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/popups/beingpopup.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/popups/beingpopup.cpp')
-rw-r--r-- | src/gui/popups/beingpopup.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp index 5a800871b..c18ac3871 100644 --- a/src/gui/popups/beingpopup.cpp +++ b/src/gui/popups/beingpopup.cpp @@ -84,7 +84,7 @@ void BeingPopup::addLabels(const int fontHeight) void BeingPopup::show(const int x, const int y, Being *const b) { - if (!b) + if (b == nullptr) { setVisible(Visible_false); return; @@ -101,7 +101,7 @@ void BeingPopup::show(const int x, const int y, Being *const b) } mBeingName->setCaption(b->getName() + b->getGenderSignWithSpace()); - if (gui) + if (gui != nullptr) { if (player_relations.isGoodName(b)) mBeingName->setFont(boldFont); @@ -130,7 +130,7 @@ void BeingPopup::show(const int x, const int y, Being *const b) if (type == ActorType::Pet) { const PetInfo *const info = PlayerInfo::getPet(); - if (info && info->id == b->getId()) + if ((info != nullptr) && info->id == b->getId()) { ptr = mLabels[num]; // TRANSLATORS: being popup label @@ -149,7 +149,7 @@ void BeingPopup::show(const int x, const int y, Being *const b) else if (type == ActorType::Homunculus) { const HomunculusInfo *const info = PlayerInfo::getHomunculus(); - if (info && info->id == b->getId()) + if ((info != nullptr) && info->id == b->getId()) { ptr = mLabels[num]; // TRANSLATORS: being popup label @@ -239,7 +239,7 @@ void BeingPopup::show(const int x, const int y, Being *const b) } const ChatObject *const chat = b->getChat(); - if (chat) + if (chat != nullptr) { ptr = mLabels[num]; // TRANSLATORS: being popup label @@ -298,7 +298,7 @@ void BeingPopup::show(const int x, const int y, Being *const b) FOR_EACH (std::vector<Label*>::iterator, it, mLabels) { const Label *const label = *it; - if (label) + if (label != nullptr) { if (label->getWidth() > minWidth) minWidth = label->getWidth(); |