mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Remove unused variable
This commit is contained in:
parent
b04bcb9a9b
commit
6fb14841ab
@ -44,15 +44,10 @@ namespace MWMechanics
|
|||||||
if (creature)
|
if (creature)
|
||||||
allLevels = levItem->mFlags & ESM::CreatureLevList::AllLevels;
|
allLevels = levItem->mFlags & ESM::CreatureLevList::AllLevels;
|
||||||
|
|
||||||
std::pair<int, const ESM::RefId*> highest = { -1, nullptr };
|
|
||||||
for (const auto& levelledItem : items)
|
for (const auto& levelledItem : items)
|
||||||
{
|
{
|
||||||
if (playerLevel >= levelledItem.mLevel && (allLevels || levelledItem.mLevel == highestLevel))
|
if (playerLevel >= levelledItem.mLevel && (allLevels || levelledItem.mLevel == highestLevel))
|
||||||
{
|
|
||||||
candidates.push_back(&levelledItem.mId);
|
candidates.push_back(&levelledItem.mId);
|
||||||
if (levelledItem.mLevel >= highest.first)
|
|
||||||
highest = std::make_pair(levelledItem.mLevel, &levelledItem.mId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (candidates.empty())
|
if (candidates.empty())
|
||||||
return ESM::RefId::sEmpty;
|
return ESM::RefId::sEmpty;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user