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/widgets/statspagebasic.cpp | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2 plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip |
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/gui/widgets/statspagebasic.cpp')
-rw-r--r-- | src/gui/widgets/statspagebasic.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/widgets/statspagebasic.cpp b/src/gui/widgets/statspagebasic.cpp index 23fd22243..bdf90e14f 100644 --- a/src/gui/widgets/statspagebasic.cpp +++ b/src/gui/widgets/statspagebasic.cpp @@ -83,7 +83,7 @@ void StatsPageBasic::statChanged(const AttributesT id, const int oldVal2 A_UNUSED) { const Attrs::const_iterator it = mAttrs.find(id); - if (it != mAttrs.end() && it->second) + if (it != mAttrs.end() && (it->second != nullptr)) it->second->update(); } @@ -105,7 +105,7 @@ void StatsPageBasic::attributeChanged(const AttributesT id, for (Attrs::const_iterator it = mAttrs.begin(); it != mAttrs.end(); ++it) { - if (it->second) + if (it->second != nullptr) it->second->update(); } return; @@ -115,7 +115,7 @@ void StatsPageBasic::attributeChanged(const AttributesT id, for (Attrs::const_iterator it = mAttrs.begin(); it != mAttrs.end(); ++it) { - if (it->second) + if (it->second != nullptr) it->second->update(); } return; @@ -125,7 +125,7 @@ void StatsPageBasic::attributeChanged(const AttributesT id, } PRAGMA45(GCC diagnostic pop) const Attrs::const_iterator it = mAttrs.find(id); - if (it != mAttrs.end() && it->second) + if (it != mAttrs.end() && (it->second != nullptr)) it->second->update(); } @@ -137,7 +137,7 @@ void StatsPageBasic::setPointsNeeded(const AttributesT id, if (it != mAttrs.end()) { AttrDisplay *const disp = it->second; - if (disp && disp->getType() == AttrDisplay::CHANGEABLE) + if ((disp != nullptr) && disp->getType() == AttrDisplay::CHANGEABLE) static_cast<ChangeDisplay*>(disp)->setPointsNeeded(needed); } } @@ -151,7 +151,7 @@ std::string StatsPageBasic::getStatsStr() const { const ChangeDisplay *const attr = dynamic_cast<ChangeDisplay*>( (*it).second); - if (attr) + if (attr != nullptr) { str.append(strprintf("%s:%s ", attr->getShortName().c_str(), attr->getValue().c_str())); |