mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Modernize std::any_of
with ranges
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
This commit is contained in:
@ -428,8 +428,7 @@ void AudioPane::OnVolumeChanged(int volume)
|
||||
void AudioPane::CheckNeedForLatencyControl()
|
||||
{
|
||||
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
||||
m_latency_control_supported =
|
||||
std::any_of(backends.cbegin(), backends.cend(), AudioCommon::SupportsLatencyControl);
|
||||
m_latency_control_supported = std::ranges::any_of(backends, AudioCommon::SupportsLatencyControl);
|
||||
}
|
||||
|
||||
QString AudioPane::GetDPL2QualityLabel(AudioCommon::DPL2Quality value) const
|
||||
|
Reference in New Issue
Block a user