From ea95c82a01c531358645dfd30b9e832425a32304 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 31 Jan 2024 19:41:50 -0500 Subject: [PATCH 1/2] VertexLoaderManager: Remove unused entry struct This isn't used anywhere, so it can be removed. --- Source/Core/VideoCommon/VertexLoaderManager.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp index fb24803f1c..d4e4f57cba 100644 --- a/Source/Core/VideoCommon/VertexLoaderManager.cpp +++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp @@ -118,16 +118,6 @@ void UpdateVertexArrayPointers() g_bases_dirty = false; } -namespace -{ -struct entry -{ - std::string text; - u64 num_verts; - bool operator<(const entry& other) const { return num_verts > other.num_verts; } -}; -} // namespace - void MarkAllDirty() { g_bases_dirty = true; From 4f40bdf501882e7a22cafcfffe62e6c5b4daf875 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 31 Jan 2024 19:46:24 -0500 Subject: [PATCH 2/2] VertexLoaderManager: Use fill() in Init() Same behavior, less code. --- Source/Core/VideoCommon/VertexLoaderManager.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp index d4e4f57cba..5da66c273d 100644 --- a/Source/Core/VideoCommon/VertexLoaderManager.cpp +++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp @@ -64,10 +64,8 @@ bool g_needs_cp_xf_consistency_check; void Init() { MarkAllDirty(); - for (auto& map_entry : g_main_vertex_loaders) - map_entry = nullptr; - for (auto& map_entry : g_preprocess_vertex_loaders) - map_entry = nullptr; + g_main_vertex_loaders.fill(nullptr); + g_preprocess_vertex_loaders.fill(nullptr); SETSTAT(g_stats.num_vertex_loaders, 0); }