mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 06:09:42 +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);
|
||||
|
||||
SkillList::const_iterator end = skills.end();
|
||||
for (SkillList::const_iterator it = skills.begin(); it != end; ++it)
|
||||
for (const int& skillId : skills)
|
||||
{
|
||||
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;
|
||||
assert(skillId >= 0 && skillId < ESM::Skill::Length);
|
||||
const std::string &skillNameId = ESM::Skill::sSkillNameIds[skillId];
|
||||
|
|
Loading…
Reference in a new issue