RetroAchievements: Skip LoadApprovedList if there are no patches

There being no active patches is by far the most common case, so let's
optimize for this case.
This commit is contained in:
JosJuice 2024-07-08 18:15:23 +02:00
parent f59678842b
commit e6b9091ffc

View File

@ -361,6 +361,12 @@ bool AchievementManager::IsHardcoreModeActive() const
void AchievementManager::FilterApprovedPatches(std::vector<PatchEngine::Patch>& patches,
const std::string& game_ini_id) const
{
if (patches.empty())
{
// There's nothing to verify, so let's save ourselves some work
return;
}
std::lock_guard lg{m_lock};
if (!IsHardcoreModeActive())