summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-06 17:19:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-06 17:20:00 +0300
commit88697bc3503090194877b241b987ddc751034166 (patch)
tree6e515b6ca60d7866d352baa670558786a505bcdd /src/actormanager.cpp
parent21e0c15d56438f2d7f3e15736c00dd8b8ac6bd1c (diff)
downloadmv-88697bc3503090194877b241b987ddc751034166.tar.gz
mv-88697bc3503090194877b241b987ddc751034166.tar.bz2
mv-88697bc3503090194877b241b987ddc751034166.tar.xz
mv-88697bc3503090194877b241b987ddc751034166.zip
Add strong typed bool type NpcNames.
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index e32eda6f1..b9ff84adb 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -1410,7 +1410,7 @@ void ActorManager::printBeingsToChat(const std::vector<Being*> &beings,
}
void ActorManager::getPlayerNames(StringVect &names,
- const bool npcNames) const
+ const NpcNames npcNames) const
{
names.clear();
@@ -1426,9 +1426,10 @@ void ActorManager::getPlayerNames(StringVect &names,
}
const Being *const being = static_cast<const Being*>(*it);
- if ((being->getType() == ActorType::Player
- || (being->getType() == ActorType::Npc && npcNames))
- && being->getName() != "")
+ if ((being->getType() == ActorType::Player ||
+ (being->getType() == ActorType::Npc &&
+ npcNames == NpcNames_true)) &&
+ being->getName() != "")
{
names.push_back(being->getName());
}