Merge pull request #1706 from akortunov/refidfix

Fix compiler warning in getNestedData()
pull/1717/head
Bret Curtis 7 years ago committed by GitHub
commit e410c47660
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1368,13 +1368,15 @@ QVariant CSMWorld::CreatureAttackRefIdAdapter::getNestedData (const RefIdColumn
const ESM::Creature& creature = record.get();
if (subRowIndex < 0 || subRowIndex > 2 || subColIndex < 0 || subColIndex > 2)
if (subRowIndex < 0 || subRowIndex > 2)
throw std::runtime_error ("index out of range");
if (subColIndex == 0)
return subRowIndex + 1;
else if (subColIndex < 3) // 1 or 2
else if (subColIndex == 1 || subColIndex == 2)
return creature.mData.mAttack[(subRowIndex * 2) + (subColIndex - 1)];
else
throw std::runtime_error ("index out of range");
}
void CSMWorld::CreatureAttackRefIdAdapter::setNestedData (const RefIdColumn *column,

Loading…
Cancel
Save