diff options
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())); |