mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 09:59:32 -06:00
Simplify std::find_if
with std::ranges::find
and projections
In LabelMap.cpp, the code is currently unused so I was unable to test it. In WiiUtils.cpp, the magic value `1u` was replaced by the constant value `DiscIO::PARTITION_UPDATE`.
This commit is contained in:
@ -278,9 +278,7 @@ void VideoBackendBase::ActivateBackend(const std::string& name)
|
||||
g_video_backend = GetDefaultVideoBackend();
|
||||
|
||||
const auto& backends = GetAvailableBackends();
|
||||
const auto iter = std::find_if(backends.begin(), backends.end(), [&name](const auto& backend) {
|
||||
return name == backend->GetName();
|
||||
});
|
||||
const auto iter = std::ranges::find(backends, name, &VideoBackendBase::GetName);
|
||||
|
||||
if (iter == backends.end())
|
||||
return;
|
||||
|
Reference in New Issue
Block a user