summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-06 01:09:47 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-06 01:09:47 +0300
commit7fa78a35307227453ab55c7452e348a40cd41d65 (patch)
tree1d3e16a94bed043877306f1c47b3992add85b3be /src/gui/widgets
parenta87db81b6b7551a248e31e2850577aefda092538 (diff)
downloadmv-7fa78a35307227453ab55c7452e348a40cd41d65.tar.gz
mv-7fa78a35307227453ab55c7452e348a40cd41d65.tar.bz2
mv-7fa78a35307227453ab55c7452e348a40cd41d65.tar.xz
mv-7fa78a35307227453ab55c7452e348a40cd41d65.zip
Add strong typed bool type Modifiable.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/skillinfo.cpp4
-rw-r--r--src/gui/widgets/skillinfo.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp
index 864d973ea..80783a4b2 100644
--- a/src/gui/widgets/skillinfo.cpp
+++ b/src/gui/widgets/skillinfo.cpp
@@ -58,7 +58,7 @@ SkillInfo::SkillInfo() :
castingDstEffectId(-1),
type(SkillType::Unknown),
owner(SkillOwner::Player),
- modifiable(false),
+ modifiable(Modifiable_false),
visible(false),
alwaysVisible(false)
{
@@ -78,7 +78,7 @@ void SkillInfo::update()
const int baseLevel = PlayerInfo::getSkillLevel(id);
const std::pair<int, int> exp = PlayerInfo::getStatExperience(id);
- if (!modifiable && baseLevel == 0 && exp.second == 0)
+ if (modifiable == Modifiable_false && baseLevel == 0 && exp.second == 0)
{
if (visible)
{
diff --git a/src/gui/widgets/skillinfo.h b/src/gui/widgets/skillinfo.h
index 3e4d99820..9cec3aa49 100644
--- a/src/gui/widgets/skillinfo.h
+++ b/src/gui/widgets/skillinfo.h
@@ -23,6 +23,8 @@
#ifndef GUI_WIDGETS_SKILLINFO_H
#define GUI_WIDGETS_SKILLINFO_H
+#include "enums/simpletypes.h"
+
#include "gui/color.h"
#include "resources/skillowner.h"
@@ -66,7 +68,7 @@ struct SkillInfo final
int castingDstEffectId;
SkillType::SkillType type;
SkillOwner::Type owner;
- bool modifiable;
+ Modifiable modifiable;
bool visible;
bool alwaysVisible;