From 066545478ee1a69857e960e02f7716be3a81c82b Mon Sep 17 00:00:00 2001 From: ASpoonPlaysGames <66967891+ASpoonPlaysGames@users.noreply.github.com> Date: Tue, 27 Aug 2024 22:46:06 +0100 Subject: [PATCH] rename predicate --- primedev/core/filesystem/rpakfilesystem.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/primedev/core/filesystem/rpakfilesystem.cpp b/primedev/core/filesystem/rpakfilesystem.cpp index d0c355db1..ee3821101 100644 --- a/primedev/core/filesystem/rpakfilesystem.cpp +++ b/primedev/core/filesystem/rpakfilesystem.cpp @@ -97,9 +97,9 @@ void PakLoadManager::TrackModPaks(Mod& mod) // Untracks all paks that aren't currently loaded and are marked for unload. void PakLoadManager::CleanUpUnloadedPaks() { - auto predicate = [](ModPak_t& pak) -> bool { return pak.m_markedForDelete && pak.m_handle == PakHandle::INVALID; }; + auto fnPredicate = [](ModPak_t& pak) -> bool { return pak.m_markedForDelete && pak.m_handle == PakHandle::INVALID; }; - m_modPaks.erase(std::remove_if(m_modPaks.begin(), m_modPaks.end(), predicate), m_modPaks.end()); + m_modPaks.erase(std::remove_if(m_modPaks.begin(), m_modPaks.end(), fnPredicate), m_modPaks.end()); } // Unloads all paks that are marked for unload. @@ -189,9 +189,9 @@ void PakLoadManager::OnPakUnloading(PakHandle handle) if (IsVanillaCall()) { // remove entry from loaded vanilla rpaks - auto predicate = [handle](std::pair& pair) -> bool { return pair.second == handle; }; + auto fnPredicate = [handle](std::pair& pair) -> bool { return pair.second == handle; }; - m_vanillaPaks.erase(std::remove_if(m_vanillaPaks.begin(), m_vanillaPaks.end(), predicate), m_vanillaPaks.end()); + m_vanillaPaks.erase(std::remove_if(m_vanillaPaks.begin(), m_vanillaPaks.end(), fnPredicate), m_vanillaPaks.end()); // no need to handle aliasing here, if vanilla wants it gone, it's gone } @@ -305,7 +305,7 @@ void PakLoadManager::UnloadDependentPaks(PakHandle handle) ++m_reentranceCounter; const ScopeGuard guard([&]() { --m_reentranceCounter; }); - auto predicate = [&](std::pair& pair) -> bool + auto fnPredicate = [&](std::pair& pair) -> bool { if (pair.first != handle) return false; @@ -322,7 +322,7 @@ void PakLoadManager::UnloadDependentPaks(PakHandle handle) return true; }; - m_dependentPaks.erase(std::remove_if(m_dependentPaks.begin(), m_dependentPaks.end(), predicate), m_dependentPaks.end()); + m_dependentPaks.erase(std::remove_if(m_dependentPaks.begin(), m_dependentPaks.end(), fnPredicate), m_dependentPaks.end()); } // Handles aliases for rpaks defined in rpak.json, effectively redirecting an rpak load to a different path.