diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-08 23:02:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-08 23:02:06 +0300 |
commit | 7e66a4606bb15d98197f71245fe191d03152ee5f (patch) | |
tree | 825022571cfb55d70f1ca3c142f79db3758fb72b /src/actormanager.cpp | |
parent | a61ac4664d55cddb18d2d861e76629bd07676129 (diff) | |
download | ManaVerse-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.gz ManaVerse-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.bz2 ManaVerse-7e66a4606bb15d98197f71245fe191d03152ee5f.tar.xz ManaVerse-7e66a4606bb15d98197f71245fe191d03152ee5f.zip |
Improve some empty string checks.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r-- | src/actormanager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp index c41f97c71..6b27e3205 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -1587,7 +1587,7 @@ void ActorManager::getPlayerNames(StringVect &names, if ((being->getType() == ActorType::Player || (being->getType() == ActorType::Npc && npcNames == NpcNames_true)) && - being->getName() != "") + !being->getName().empty()) { names.push_back(being->getName()); } @@ -1610,7 +1610,7 @@ void ActorManager::getMobNames(StringVect &names) const } const Being *const being = static_cast<const Being*>(*it); - if (being->getType() == ActorType::Monster && being->getName() != "") + if (being->getType() == ActorType::Monster && !being->getName().empty()) names.push_back(being->getName()); } } @@ -1630,7 +1630,7 @@ void ActorManager::updatePlayerNames() const Being *const being = static_cast<Being*>(*it); being->setGoodStatus(-1); - if (being->getType() == ActorType::Player && being->getName() != "") + if (being->getType() == ActorType::Player && !being->getName().empty()) being->updateName(); } } @@ -1649,7 +1649,7 @@ void ActorManager::updatePlayerColors() const } Being *const being = static_cast<Being*>(*it); - if (being->getType() == ActorType::Player && being->getName() != "") + if (being->getType() == ActorType::Player && !being->getName().empty()) being->updateColors(); } } @@ -1668,7 +1668,7 @@ void ActorManager::updatePlayerGuild() const } Being *const being = static_cast<Being*>(*it); - if (being->getType() == ActorType::Player && being->getName() != "") + if (being->getType() == ActorType::Player && !being->getName().empty()) being->updateGuild(); } } |