summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-24 18:29:30 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-24 18:30:16 +0300
commita316d537dce50f4b4e1e10f5c26a7851baddbd8b (patch)
tree078de355216db6dab67df9575402cdba7d537dbd /src/being.cpp
parentcb00b6fe126afe5fff8fc7ff491fda6003ea68f2 (diff)
downloadmanaplus-a316d537dce50f4b4e1e10f5c26a7851baddbd8b.tar.gz
manaplus-a316d537dce50f4b4e1e10f5c26a7851baddbd8b.tar.bz2
manaplus-a316d537dce50f4b4e1e10f5c26a7851baddbd8b.tar.xz
manaplus-a316d537dce50f4b4e1e10f5c26a7851baddbd8b.zip
Small style changes.
Also fix overloaded methods visibility.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp14
1 files changed, 7 insertions, 7 deletions
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);