diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-09-20 22:17:29 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2025-01-01 09:52:03 -0800 |
| commit | 110d32729ecbe5b19df9b2cc76de630334410589 (patch) | |
| tree | 0032af6f60d1b8575bc5bfcbefb8c3faa951d96f /Source/Core/VideoCommon/VertexManagerBase.cpp | |
| parent | 6f10acea3fee4d08c4e52e66f862da45ad06d1ed (diff) | |
Simplify `std::find` with `Common::Contains`
In NandPaths.cpp, the `std::initializer_list<char>` of illegal characters has been turned into a `char[]` (similar to the one in GameList.cpp).
The reverse iteration in ResourcePack.cpp seemed to provide no benefits, and doing without it it seemed to have no ill effects.
Diffstat (limited to 'Source/Core/VideoCommon/VertexManagerBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexManagerBase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp index b53cb3d2ed..21e5905d95 100644 --- a/Source/Core/VideoCommon/VertexManagerBase.cpp +++ b/Source/Core/VideoCommon/VertexManagerBase.cpp @@ -9,6 +9,7 @@ #include "Common/ChunkFile.h" #include "Common/CommonTypes.h" +#include "Common/Contains.h" #include "Common/EnumMap.h" #include "Common/Logging/Log.h" #include "Common/MathUtil.h" @@ -585,8 +586,7 @@ void VertexManagerBase::Flush() const auto cache_entry = g_texture_cache->Load(TextureInfo::FromStage(i)); if (cache_entry) { - if (std::find(texture_names.begin(), texture_names.end(), - cache_entry->texture_info_name) == texture_names.end()) + if (!Common::Contains(texture_names, cache_entry->texture_info_name)) { texture_names.push_back(cache_entry->texture_info_name); texture_units.push_back(i); |
