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/being/being.h | |
parent | f1518dd8476c968a43fa57cfb06198e290a4f77a (diff) | |
download | mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2 mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip |
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/being/being.h')
-rw-r--r-- | src/being/being.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/being/being.h b/src/being/being.h index 79f9a4d83..55ebd386e 100644 --- a/src/being/being.h +++ b/src/being/being.h @@ -312,7 +312,7 @@ class Being notfinal : public ActorSprite, { return CAST_S16(mGuilds.size()); } bool isInParty() const restrict2 noexcept2 A_WARN_UNUSED - { return mParty; } + { return mParty != nullptr; } void setParty(Party *restrict const party) restrict2; @@ -407,14 +407,14 @@ class Being notfinal : public ActorSprite, int getTargetOffsetX() const restrict2 override A_WARN_UNUSED { - if (!mInfo) + if (mInfo == nullptr) return 0; return mInfo->getTargetOffsetX(); } int getTargetOffsetY() const restrict2 override A_WARN_UNUSED { - if (!mInfo) + if (mInfo == nullptr) return 0; return mInfo->getTargetOffsetY(); } @@ -424,7 +424,7 @@ class Being notfinal : public ActorSprite, */ virtual unsigned char getBlockWalkMask() const restrict2 A_WARN_UNUSED { - if (!mInfo) + if (mInfo == nullptr) return 0; return mInfo->getBlockWalkMask(); } @@ -434,7 +434,7 @@ class Being notfinal : public ActorSprite, */ BlockTypeT getBlockType() const restrict2 override A_WARN_UNUSED { - if (!mInfo) + if (mInfo == nullptr) return BlockType::NONE; return mInfo->getBlockType(); } @@ -879,7 +879,10 @@ class Being notfinal : public ActorSprite, const int level) const restrict2 A_WARN_UNUSED; CursorT getHoverCursor() const restrict2 A_WARN_UNUSED - { return mInfo ? mInfo->getHoverCursor() : Cursor::CURSOR_POINTER; } + { + return mInfo != nullptr ? + mInfo->getHoverCursor() : Cursor::CURSOR_POINTER; + } void addAfkEffect() restrict2; |