Simplify std::search with Common::ContainsSubrange

This commit is contained in:
mitaclaw 2024-10-01 11:41:25 -07:00
parent ba706f7b7b
commit 15949a86a4

View File

@ -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;
}