summaryrefslogtreecommitdiff
path: root/src/gui/windows/skilldialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/gui/windows/skilldialog.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r--src/gui/windows/skilldialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index b80f6d5fe..d8ae3ef2d 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -135,7 +135,7 @@ void SkillDialog::action(const ActionEvent &event)
if (tab)
{
if (const SkillInfo *const info = tab->getSelectedInfo())
- playerHandler->increaseSkill(static_cast<uint16_t>(info->id));
+ playerHandler->increaseSkill(CAST_U16(info->id));
}
}
else if (eventId == "sel")
@@ -150,7 +150,7 @@ void SkillDialog::action(const ActionEvent &event)
mUseButton->setCaption(info->useButton);
mIncreaseButton->setEnabled(info->id < SKILL_VAR_MIN_ID);
const int num = itemShortcutWindow->getTabIndex();
- if (num >= 0 && num < static_cast<int>(SHORTCUT_TABS)
+ if (num >= 0 && num < CAST_S32(SHORTCUT_TABS)
&& itemShortcut[num])
{
itemShortcut[num]->setItemSelected(
@@ -329,7 +329,7 @@ void SkillDialog::loadXmlFile(const std::string &fileName)
if (!skill)
{
skill = new SkillInfo;
- skill->id = static_cast<unsigned int>(id);
+ skill->id = CAST_U32(id);
skill->modifiable = Modifiable_false;
skill->model = model;
skill->update();
@@ -482,7 +482,7 @@ void SkillDialog::addSkill(const SkillOwner::Type owner,
if (mDefaultModel)
{
SkillInfo *const skill = new SkillInfo;
- skill->id = static_cast<unsigned int>(id);
+ skill->id = CAST_U32(id);
skill->type = type;
skill->owner = owner;
SkillData *const data = skill->data;