diff options
| author | JMC47 <JMC4789@gmail.com> | 2024-12-26 16:51:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-26 16:51:53 -0500 |
| commit | 532a8621daa5c0d8a3a55f64ffba9cb20209d455 (patch) | |
| tree | 21837ec63b1fe4a45a162a1f1bf4167efcd4d177 /Source/Core/DiscIO/VolumeVerifier.cpp | |
| parent | f9ce2b9d764014ab59cf2c19e49c2c848604e6fc (diff) | |
| parent | 2b0cd16c8c266bc1e298e49d4009eab8c9c23f99 (diff) | |
Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-of
Ranges Algorithms Modernization - Of
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeVerifier.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index d510aa3266..552b20cfb4 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -729,16 +729,15 @@ bool VolumeVerifier::ShouldHaveInstallPartition() const static constexpr std::array<std::string_view, 4> dragon_quest_x = {"S4MJGD", "S4SJGD", "S6TJGD", "SDQJGD"}; const std::string& game_id = m_volume.GetGameID(); - return std::any_of(dragon_quest_x.cbegin(), dragon_quest_x.cend(), - [&game_id](std::string_view x) { return x == game_id; }); + return std::ranges::any_of(dragon_quest_x, + [&game_id](std::string_view x) { return x == game_id; }); } bool VolumeVerifier::ShouldHaveMasterpiecePartitions() const { static constexpr std::array<std::string_view, 4> ssbb = {"RSBE01", "RSBJ01", "RSBK01", "RSBP01"}; const std::string& game_id = m_volume.GetGameID(); - return std::any_of(ssbb.cbegin(), ssbb.cend(), - [&game_id](std::string_view x) { return x == game_id; }); + return std::ranges::any_of(ssbb, [&game_id](std::string_view x) { return x == game_id; }); } bool VolumeVerifier::ShouldBeDualLayer() const @@ -1039,7 +1038,7 @@ void VolumeVerifier::CheckSuperPaperMario() if (!m_volume.Read(offset, length, data.data(), partition)) return; - if (std::any_of(data.cbegin(), data.cend(), [](u8 x) { return x != 0; })) + if (std::ranges::any_of(data, [](u8 x) { return x != 0; })) { AddProblem(Severity::High, Common::GetStringT("Some padding data that should be zero is not zero. " |
