summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/socialplayerstab.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/gui/widgets/tabs/socialplayerstab.h
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadplus-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/tabs/socialplayerstab.h')
-rw-r--r--src/gui/widgets/tabs/socialplayerstab.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/widgets/tabs/socialplayerstab.h b/src/gui/widgets/tabs/socialplayerstab.h
index 2a80b3005..447e0791e 100644
--- a/src/gui/widgets/tabs/socialplayerstab.h
+++ b/src/gui/widgets/tabs/socialplayerstab.h
@@ -71,18 +71,18 @@ class SocialPlayersTab final : public SocialTab
void updateAvatar(const std::string &name) override final
{
- if (!actorManager)
+ if (actorManager == nullptr)
return;
BLOCK_START("SocialPlayersTab::updateAvatar")
Avatar *const avatar = findAvatarbyName(name);
- if (!avatar)
+ if (avatar == nullptr)
return;
- if (Party::getParty(1))
+ if (Party::getParty(1) != nullptr)
{
const PartyMember *const
pm = Party::getParty(1)->getMember(name);
- if (pm && pm->getMaxHp() > 0)
+ if ((pm != nullptr) && pm->getMaxHp() > 0)
{
avatar->setMaxHp(pm->getMaxHp());
avatar->setHp(pm->getHp());
@@ -90,7 +90,7 @@ class SocialPlayersTab final : public SocialTab
}
const Being *const being = actorManager->findBeingByName(
name, ActorType::Player);
- if (being)
+ if (being != nullptr)
{
avatar->setDamageHp(being->getDamageTaken());
avatar->setLevel(being->getLevel());
@@ -103,17 +103,17 @@ class SocialPlayersTab final : public SocialTab
void resetDamage(const std::string &name) override final
{
- if (!actorManager)
+ if (actorManager == nullptr)
return;
Avatar *const avatar = findAvatarbyName(name);
- if (!avatar)
+ if (avatar == nullptr)
return;
avatar->setDamageHp(0);
Being *const being = actorManager->findBeingByName(
name, ActorType::Player);
- if (being)
+ if (being != nullptr)
being->setDamageTaken(0);
}
@@ -126,7 +126,7 @@ class SocialPlayersTab final : public SocialTab
while (i != i_end)
{
ava = (*i);
- if (ava && ava->getName() == name)
+ if ((ava != nullptr) && ava->getName() == name)
return ava;
++i;
}
@@ -139,7 +139,7 @@ class SocialPlayersTab final : public SocialTab
void getPlayersAvatars()
{
std::vector<Avatar*> *const avatars = mBeings->getMembers();
- if (actorManager)
+ if (actorManager != nullptr)
{
StringVect names;
actorManager->getPlayerNames(names, NpcNames_false);
@@ -149,7 +149,7 @@ class SocialPlayersTab final : public SocialTab
{
bool finded = false;
const Avatar *const ava = (*ai);
- if (!ava)
+ if (ava == nullptr)
break;
StringVectCIter i = names.begin();