summaryrefslogtreecommitdiff
path: root/src/gui/skilldialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/skilldialog.cpp')
-rw-r--r--src/gui/skilldialog.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/gui/skilldialog.cpp b/src/gui/skilldialog.cpp
index 943bda3a..0a5b8d71 100644
--- a/src/gui/skilldialog.cpp
+++ b/src/gui/skilldialog.cpp
@@ -138,11 +138,11 @@ public:
void draw(gcn::Graphics *gcnGraphics)
{
- SkillModel* model = dynamic_cast<SkillModel*>(mListModel);
-
- if (!model)
+ if (!mListModel)
return;
+ SkillModel* model = static_cast<SkillModel*>(mListModel);
+
updateAlpha();
Graphics *graphics = static_cast<Graphics*>(gcnGraphics);
@@ -226,13 +226,9 @@ void SkillDialog::action(const gcn::ActionEvent &event)
{
if (event.getId() == "inc")
{
- SkillTab *tab = dynamic_cast<SkillTab*>(mTabs->getSelectedTab());
-
- if (tab)
- {
- if (SkillInfo *info = tab->getSelectedInfo())
- Net::getPlayerHandler()->increaseSkill(info->id);
- }
+ SkillTab *tab = static_cast<SkillTab*>(mTabs->getSelectedTab());
+ if (SkillInfo *info = tab->getSelectedInfo())
+ Net::getPlayerHandler()->increaseSkill(info->id);
}
else if (event.getId() == "close")
{