summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-03 22:44:42 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-03 22:44:42 +0300
commitb94678289a5e671fc168ec58525b7aae2a56e6ec (patch)
tree475822a9d1acae55f2602facbbb14dba4347fb67 /src/gui/windows
parent602fd127d09c995bc5470218c862b2cebfc558d5 (diff)
downloadplus-b94678289a5e671fc168ec58525b7aae2a56e6ec.tar.gz
plus-b94678289a5e671fc168ec58525b7aae2a56e6ec.tar.bz2
plus-b94678289a5e671fc168ec58525b7aae2a56e6ec.tar.xz
plus-b94678289a5e671fc168ec58525b7aae2a56e6ec.zip
Remove useless dynamic_cast.
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/botcheckerwindow.cpp9
-rw-r--r--src/gui/windows/chatwindow.cpp3
2 files changed, 5 insertions, 7 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();
}
}
}
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index b423767c5..5db4b9bfd 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -605,8 +605,7 @@ void ChatWindow::ignoreAllWhispers()
iter != mWhispers.end();
++ iter)
{
- WhisperTab *const tab = dynamic_cast<WhisperTab* const>(
- iter->second);
+ WhisperTab *const tab = iter->second;
if (tab)
{
if (player_relations.getRelation(tab->getNick())