From 36ba43d6ea38062b17f7e63ef659962bfc51c64d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 6 Jun 2017 23:34:34 +0300 Subject: Fix clang-tidy check readability-implicit-bool-cast. --- src/resources/beinginfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/resources/beinginfo.cpp') diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index 466a5832d..e4fe5c851 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -148,7 +148,7 @@ void BeingInfo::addSound(const ItemSoundEvent::Type event, if (mSounds.find(event) == mSounds.end()) mSounds[event] = new SoundInfoVect; - if (mSounds[event]) + if (mSounds[event] != nullptr) mSounds[event]->push_back(SoundInfo("sfx/" + filename, delay)); } @@ -162,7 +162,7 @@ const SoundInfo &BeingInfo::getSound(const ItemSoundEvent::Type event) const return emptySound; const SoundInfoVect *const vect = i->second; - if (!vect || vect->empty()) + if ((vect == nullptr) || vect->empty()) return emptySound; else return vect->at(CAST_SIZE(rand()) % vect->size()); @@ -205,7 +205,7 @@ void BeingInfo::clear() void BeingInfo::init() { - if (empty) + if (empty != nullptr) { empty->mEffectId = paths.getIntValue("effectId"); empty->mHitEffectId = paths.getIntValue("hitEffectId"); @@ -224,7 +224,7 @@ void BeingInfo::setColorsList(const std::string &name) std::string BeingInfo::getColor(const ItemColor idx) const { - if (!mColors) + if (mColors == nullptr) return std::string(); const std::map ::const_iterator -- cgit v1.2.3-60-g2f50