From 3be9cace41bcef4b7bf55bffea5d3596bd588e7e Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 25 Mar 2010 23:45:27 -0600 Subject: Replace most dynamic_casts with static_casts The remaining instances can't easily or safely be changed as the classes involved don't have type information like Being does. Reviewed-by: Freeyorp --- src/party.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/party.cpp') diff --git a/src/party.cpp b/src/party.cpp index e01aab50..b47c194a 100644 --- a/src/party.cpp +++ b/src/party.cpp @@ -172,11 +172,9 @@ void Party::removeFromMembers() itr_end = mMembers.end(); while(itr != itr_end) { - Player *p = dynamic_cast(beingManager->findBeing((*itr)->getID())); - if (p) - { - p->setParty(NULL); - } + Being *b = beingManager->findBeing((*itr)->getID()); + if (b->getType() == Being::PLAYER) + static_cast(b)->setParty(NULL); ++itr; } } -- cgit v1.2.3-60-g2f50