mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
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.
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user