diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-30 22:51:23 +0300 |
commit | ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch) | |
tree | c3d7c79fca18ac387d0c90512ef3201c92da5890 /src/gui/windows/skilldialog.cpp | |
parent | 22b64d16b613c1e5b26632237879b167024788ab (diff) | |
download | mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2 mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip |
Move some variables to better scope.
Diffstat (limited to 'src/gui/windows/skilldialog.cpp')
-rw-r--r-- | src/gui/windows/skilldialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp index b5a49b0ca..20d95a055 100644 --- a/src/gui/windows/skilldialog.cpp +++ b/src/gui/windows/skilldialog.cpp @@ -474,13 +474,13 @@ SkillInfo *SkillDialog::loadSkill(XmlNodeConstPtr node, id += SKILL_VAR_MIN_ID; } - std::string name = XML::langProperty(node, "name", - // TRANSLATORS: skills dialog. skill id - strprintf(_("Skill %d"), id)); - SkillInfo *skill = getSkill(id); if (skill == nullptr) { + std::string name = XML::langProperty(node, "name", + // TRANSLATORS: skills dialog. skill id + strprintf(_("Skill %d"), id)); + skill = new SkillInfo; skill->id = CAST_U32(id); skill->modifiable = Modifiable_false; |