From a316d537dce50f4b4e1e10f5c26a7851baddbd8b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 24 Aug 2012 18:29:30 +0300 Subject: Small style changes. Also fix overloaded methods visibility. --- src/being.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/being.cpp') diff --git a/src/being.cpp b/src/being.cpp index 14351aad9..8ec6f7927 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -1818,9 +1818,9 @@ bool Being::updateFromCache() if (entry->isAdvanced()) { int flags = entry->getFlags(); - mShop = (flags & FLAG_SHOP); - mAway = (flags & FLAG_AWAY); - mInactive = (flags & FLAG_INACTIVE); + mShop = ((flags & FLAG_SHOP) != 0); + mAway = ((flags & FLAG_AWAY) != 0); + mInactive = ((flags & FLAG_INACTIVE) != 0); if (mShop || mAway || mInactive) updateName(); } @@ -2027,7 +2027,7 @@ bool Being::drawSpriteAt(Graphics *graphics, int x, int y) const { // show hp bar here int maxHP = mMaxHP; - if (!maxHP && mInfo) + if (!maxHP) maxHP = mInfo->getMaxHP(); drawHpBar(graphics, maxHP, mHP, mDamageTaken, @@ -2517,9 +2517,9 @@ void Being::saveComment(const std::string &name, void Being::setState(uint8_t state) { - bool shop = (state & FLAG_SHOP); - bool away = (state & FLAG_AWAY); - bool inactive = (state & FLAG_INACTIVE); + bool shop = ((state & FLAG_SHOP) != 0); + bool away = ((state & FLAG_AWAY) != 0); + bool inactive = ((state & FLAG_INACTIVE) != 0); bool needUpdate = (shop != mShop || away != mAway || inactive != mInactive); -- cgit v1.2.3-60-g2f50