summaryrefslogtreecommitdiff
path: root/src/gui/socialwindow.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-03-25 23:45:27 -0600
committerJared Adams <jaxad0127@gmail.com>2010-03-26 06:53:05 -0600
commit3be9cace41bcef4b7bf55bffea5d3596bd588e7e (patch)
tree174cb77c11ddf755eaea52bba836b496d177ff91 /src/gui/socialwindow.cpp
parent48754058d7be3f433734cb1524e9e74cfd4fd55f (diff)
downloadmana-3be9cace41bcef4b7bf55bffea5d3596bd588e7e.tar.gz
mana-3be9cace41bcef4b7bf55bffea5d3596bd588e7e.tar.bz2
mana-3be9cace41bcef4b7bf55bffea5d3596bd588e7e.tar.xz
mana-3be9cace41bcef4b7bf55bffea5d3596bd588e7e.zip
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
Diffstat (limited to 'src/gui/socialwindow.cpp')
-rw-r--r--src/gui/socialwindow.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index 1396ab98..10ed680e 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -455,21 +455,11 @@ void SocialWindow::action(const gcn::ActionEvent &event)
}
else if (event.getId() == "invite")
{
- SocialTab *tab = dynamic_cast<SocialTab*>(mTabs->getSelectedTab());
-
- if (tab)
- {
- tab->invite();
- }
+ static_cast<SocialTab*>(mTabs->getSelectedTab())->invite();
}
else if (event.getId() == "leave")
{
- SocialTab *tab = dynamic_cast<SocialTab*>(mTabs->getSelectedTab());
-
- if (tab)
- {
- tab->leave();
- }
+ static_cast<SocialTab*>(mTabs->getSelectedTab())->leave();
}
else if (event.getId() == "create guild")
{