summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-08 23:02:06 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-08 23:02:06 +0300
commit7e66a4606bb15d98197f71245fe191d03152ee5f (patch)
tree825022571cfb55d70f1ca3c142f79db3758fb72b /src/being
parenta61ac4664d55cddb18d2d861e76629bd07676129 (diff)
downloadmv-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.gz
mv-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.bz2
mv-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.xz
mv-7e66a4606bb15d98197f71245fe191d03152ee5f.zip
Improve some empty string checks.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/being.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 6aedf790e..3edd7c70f 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -792,7 +792,9 @@ void Being::takeDamage(Being *restrict const attacker,
updatePercentHP();
updateName();
}
- else if (mType == ActorType::Player && socialWindow && getName() != "")
+ else if (mType == ActorType::Player &&
+ socialWindow &&
+ !getName().empty())
{
socialWindow->updateAvatar(getName());
}