diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-06 01:09:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-06 01:09:47 +0300 |
commit | 7fa78a35307227453ab55c7452e348a40cd41d65 (patch) | |
tree | 1d3e16a94bed043877306f1c47b3992add85b3be /src/gui/windows | |
parent | a87db81b6b7551a248e31e2850577aefda092538 (diff) | |
download | manaplus-7fa78a35307227453ab55c7452e348a40cd41d65.tar.gz manaplus-7fa78a35307227453ab55c7452e348a40cd41d65.tar.bz2 manaplus-7fa78a35307227453ab55c7452e348a40cd41d65.tar.xz manaplus-7fa78a35307227453ab55c7452e348a40cd41d65.zip |
Add strong typed bool type Modifiable.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 10 | ||||
-rw-r--r-- | src/gui/windows/skilldialog.h | 4 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.h | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index b9af88a06..a11ba562b 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -195,7 +195,7 @@ void SkillDialog::update() FOR_EACH (SkillMap::const_iterator, it, mSkills) { SkillInfo *const info = (*it).second; - if (info && info->modifiable) + if (info && info->modifiable == Modifiable_true) info->update(); } } @@ -314,7 +314,7 @@ void SkillDialog::loadXmlFile(const std::string &fileName) { skill = new SkillInfo; skill->id = static_cast<unsigned int>(id); - skill->modifiable = false; + skill->modifiable = Modifiable_false; skill->model = model; skill->update(); skill->useButton = XML::getProperty( @@ -421,7 +421,7 @@ void SkillDialog::removeSkill(const int id) bool SkillDialog::updateSkill(const int id, const int range, - const bool modifiable, + const Modifiable modifiable, const SkillType::SkillType type, const int sp) { @@ -448,7 +448,7 @@ void SkillDialog::addSkill(const SkillOwner::Type owner, const std::string &name, const int level, const int range, - const bool modifiable, + const Modifiable modifiable, const SkillType::SkillType type, const int sp) { @@ -515,7 +515,7 @@ void SkillDialog::setSkillDuration(const SkillOwner::Type owner, SkillInfo *info = nullptr; if (it == mSkills.end()) { - addSkill(owner, id, "", 0, 0, false, SkillType::Unknown, 0); + addSkill(owner, id, "", 0, 0, Modifiable_false, SkillType::Unknown, 0); it = mSkills.find(id); } if (it != mSkills.end()) diff --git a/src/gui/windows/skilldialog.h b/src/gui/windows/skilldialog.h index 7a55c691b..d067643f4 100644 --- a/src/gui/windows/skilldialog.h +++ b/src/gui/windows/skilldialog.h @@ -84,7 +84,7 @@ class SkillDialog final : public Window, bool updateSkill(const int id, const int range, - const bool modifiable, + const Modifiable modifiable, const SkillType::SkillType type, const int sp); @@ -93,7 +93,7 @@ class SkillDialog final : public Window, const std::string &name, const int level, const int range, - const bool modifiable, + const Modifiable modifiable, const SkillType::SkillType type, const int sp); diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index aa62aae4c..198df1508 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -401,11 +401,11 @@ void StatusWindow::setPointsNeeded(const int id, const int needed) void StatusWindow::addAttribute(const int id, const std::string &restrict name, const std::string &restrict shortName, - const bool modifiable) + const Modifiable modifiable) { AttrDisplay *disp; - if (modifiable) + if (modifiable == Modifiable_true) { disp = new ChangeDisplay(this, id, name, shortName); disp->update(); diff --git a/src/gui/windows/statuswindow.h b/src/gui/windows/statuswindow.h index bde444fe5..eea7f936e 100644 --- a/src/gui/windows/statuswindow.h +++ b/src/gui/windows/statuswindow.h @@ -58,7 +58,7 @@ class StatusWindow final : public Window, void addAttribute(const int id, const std::string &restrict name, const std::string &restrict shortName = "", - const bool modifiable = false); + const Modifiable modifiable = Modifiable_false); static void updateHPBar(ProgressBar *const bar, const bool showMax = false); |