summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VideoBackendBase.cpp
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-09-21 14:43:21 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2025-03-09 13:26:35 -0700
commit62b2b939b5825e48c89b8a3ebb97d9fc38cb59e5 (patch)
treeaf5356391662ec172ec15454d3f844fa2b67db19 /Source/Core/VideoCommon/VideoBackendBase.cpp
parent1e5e9219cd122761911bb426750af72c750c7efd (diff)
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`.
Diffstat (limited to 'Source/Core/VideoCommon/VideoBackendBase.cpp')
-rw-r--r--Source/Core/VideoCommon/VideoBackendBase.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VideoBackendBase.cpp b/Source/Core/VideoCommon/VideoBackendBase.cpp
index e8f9f91b41..0234496e3f 100644
--- a/Source/Core/VideoCommon/VideoBackendBase.cpp
+++ b/Source/Core/VideoCommon/VideoBackendBase.cpp
@@ -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;