From 15949a86a41c8c2d21aede36ffb6a9462a25b7cb Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:41:25 -0700 Subject: [PATCH] Simplify `std::search` with `Common::ContainsSubrange` --- Source/Core/DiscIO/VolumeVerifier.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 80dc5c9f9b..00fdd8f85e 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -144,11 +144,8 @@ RedumpVerifier::DownloadStatus RedumpVerifier::DownloadDatfile(const std::string if (File::Exists(output_path)) return DownloadStatus::FailButOldCacheAvailable; - const std::string system_not_available_message = "System \"" + system + "\" doesn't exist."; const bool system_not_available_match = - result->end() != std::search(result->begin(), result->end(), - system_not_available_message.begin(), - system_not_available_message.end()); + Common::ContainsSubrange(*result, "System \"" + system + "\" doesn't exist."); return system_not_available_match ? DownloadStatus::SystemNotAvailable : DownloadStatus::Fail; }