From 6fb14841ab6cb99b4363c0a258e0c6777b27e1ff Mon Sep 17 00:00:00 2001 From: fredzio Date: Wed, 5 Apr 2023 22:19:18 +0200 Subject: [PATCH] Remove unused variable --- apps/openmw/mwmechanics/levelledlist.hpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/apps/openmw/mwmechanics/levelledlist.hpp b/apps/openmw/mwmechanics/levelledlist.hpp index 8dc474a0fd..80579ea09a 100644 --- a/apps/openmw/mwmechanics/levelledlist.hpp +++ b/apps/openmw/mwmechanics/levelledlist.hpp @@ -44,15 +44,10 @@ namespace MWMechanics if (creature) allLevels = levItem->mFlags & ESM::CreatureLevList::AllLevels; - std::pair 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;