yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

Merge pull request #4340 from lioncash/remove

shader_cache: Make use of std::erase_if
This commit is contained in:
LC 2020-07-17 05:19:20 -04:00 committed by GitHub
commit 9d3cbf6a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -209,11 +209,11 @@ private:
} }
// Remove them from the cache // Remove them from the cache
const auto is_removed = [&removed_shaders](std::unique_ptr<T>& shader) { const auto is_removed = [&removed_shaders](const std::unique_ptr<T>& shader) {
return std::find(removed_shaders.begin(), removed_shaders.end(), shader.get()) != return std::find(removed_shaders.begin(), removed_shaders.end(), shader.get()) !=
removed_shaders.end(); removed_shaders.end();
}; };
storage.erase(std::remove_if(storage.begin(), storage.end(), is_removed), storage.end()); std::erase_if(storage, is_removed);
} }
/// @brief Creates a new entry in the lookup cache and returns its pointer /// @brief Creates a new entry in the lookup cache and returns its pointer