CMemoryCardSys: Eliminate variable shadowing

Prevents names from clashing with variables from outside the loop scope.
This commit is contained in:
Lioncash 2020-04-23 07:13:18 -04:00
parent e0bb66f7f0
commit 9fa689a806
1 changed files with 2 additions and 2 deletions

View File

@ -123,10 +123,10 @@ bool CMemoryCardSys::InitializePump() {
x20_scanStates.reserve(x20_scanStates.size() + savw.GetScans().size());
for (const CSaveWorld::SScanState& scan : savw.GetScans()) {
auto existingSearch = std::find_if(x20_scanStates.begin(), x20_scanStates.end(), [&](const auto& test) {
const auto scanStateIter = std::find_if(x20_scanStates.cbegin(), x20_scanStates.cend(), [&](const auto& test) {
return test.first == scan.x0_id && test.second == scan.x4_category;
});
if (existingSearch == x20_scanStates.end()) {
if (scanStateIter == x20_scanStates.cend()) {
x20_scanStates.emplace_back(scan.x0_id, scan.x4_category);
++x30_scanCategoryCounts[int(scan.x4_category)];
}