mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-01 06:39:41 +00:00
Simplify loop in the addSkills()
This commit is contained in:
parent
80c62a4fe1
commit
dc6ef15571
1 changed files with 2 additions and 4 deletions
|
@ -327,11 +327,9 @@ namespace MWGui
|
||||||
|
|
||||||
addGroup(MWBase::Environment::get().getWindowManager()->getGameSettingString(titleId, titleDefault), coord1, coord2);
|
addGroup(MWBase::Environment::get().getWindowManager()->getGameSettingString(titleId, titleDefault), coord1, coord2);
|
||||||
|
|
||||||
SkillList::const_iterator end = skills.end();
|
for (const int& skillId : skills)
|
||||||
for (SkillList::const_iterator it = skills.begin(); it != end; ++it)
|
|
||||||
{
|
{
|
||||||
int skillId = *it;
|
if (skillId < 0 || skillId >= ESM::Skill::Length) // Skip unknown skill indexes
|
||||||
if (skillId < 0 || skillId > ESM::Skill::Length) // Skip unknown skill indexes
|
|
||||||
continue;
|
continue;
|
||||||
assert(skillId >= 0 && skillId < ESM::Skill::Length);
|
assert(skillId >= 0 && skillId < ESM::Skill::Length);
|
||||||
const std::string &skillNameId = ESM::Skill::sSkillNameIds[skillId];
|
const std::string &skillNameId = ESM::Skill::sSkillNameIds[skillId];
|
||||||
|
|
Loading…
Reference in a new issue