summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexManagerBase.cpp
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-09-28 22:30:41 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-10-10 00:53:48 -0700
commit728663bdc03dfe20343c45ff36f5fb080b49ffec (patch)
treef923c81683810d230c594113c0b753fc29b54a80 /Source/Core/VideoCommon/VertexManagerBase.cpp
parent01d0bdf1bbb4ad3604a6d261b8648b870b1f0131 (diff)
Modernize `std::binary_search` with ranges
In VolumeVerifier.cpp, constructing a `std::string_view` of the volume's GameID is unnecessary, as `std::`(`ranges::`)`binary_search` supports heterogeneous lookup. The usage in GameFile.cpp is a perfect example.
Diffstat (limited to 'Source/Core/VideoCommon/VertexManagerBase.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexManagerBase.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp
index 02edb56d35..8a4f7f75bd 100644
--- a/Source/Core/VideoCommon/VertexManagerBase.cpp
+++ b/Source/Core/VideoCommon/VertexManagerBase.cpp
@@ -954,8 +954,7 @@ void VertexManagerBase::OnDraw()
// Check if this draw is scheduled to kick a command buffer.
// The draw counters will always be sorted so a binary search is possible here.
- if (std::binary_search(m_scheduled_command_buffer_kicks.begin(),
- m_scheduled_command_buffer_kicks.end(), m_draw_counter))
+ if (std::ranges::binary_search(m_scheduled_command_buffer_kicks, m_draw_counter))
{
// Kick a command buffer on the background thread.
g_gfx->Flush();