1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

Remove unused variable

This commit is contained in:
fredzio 2023-04-05 22:19:18 +02:00
parent b04bcb9a9b
commit 6fb14841ab

View File

@ -44,15 +44,10 @@ namespace MWMechanics
if (creature)
allLevels = levItem->mFlags & ESM::CreatureLevList::AllLevels;
std::pair<int, const ESM::RefId*> highest = { -1, nullptr };
for (const auto& levelledItem : items)
{
if (playerLevel >= levelledItem.mLevel && (allLevels || levelledItem.mLevel == highestLevel))
{
candidates.push_back(&levelledItem.mId);
if (levelledItem.mLevel >= highest.first)
highest = std::make_pair(levelledItem.mLevel, &levelledItem.mId);
}
}
if (candidates.empty())
return ESM::RefId::sEmpty;