summaryrefslogtreecommitdiff
path: root/src/gui/windows/botcheckerwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/botcheckerwindow.cpp')
-rw-r--r--src/gui/windows/botcheckerwindow.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/windows/botcheckerwindow.cpp b/src/gui/windows/botcheckerwindow.cpp
index 9f1973426..e79a852cb 100644
--- a/src/gui/windows/botcheckerwindow.cpp
+++ b/src/gui/windows/botcheckerwindow.cpp
@@ -190,12 +190,11 @@ void BotCheckerWindow::reset()
std::set<ActorSprite*> beings = actorManager->getAll();
FOR_EACH (ActorSprites::iterator, i, beings)
{
- Being *const being = dynamic_cast<Being*>(*i);
-
- if (being && being->getType() == ActorType::Player
- && being != localPlayer && being->getName() != "")
+ if ((*i)->getType() == ActorType::Player)
{
- being->resetCounters();
+ Being *const being = static_cast<Being*>(*i);
+ if (being != localPlayer && !being->getName().empty())
+ being->resetCounters();
}
}
}