mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-21 09:41:39 +00:00
Modernize std::any_of
with ranges
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
This commit is contained in:
parent
063d9894b7
commit
b9ded45f3c
34 changed files with 69 additions and 82 deletions
|
@ -309,7 +309,7 @@ void ConvertDialog::Convert()
|
|||
}
|
||||
|
||||
if (!scrub && format == DiscIO::BlobType::GCZ &&
|
||||
std::any_of(m_files.begin(), m_files.end(), [](const auto& file) {
|
||||
std::ranges::any_of(m_files, [](const auto& file) {
|
||||
return file->GetPlatform() == DiscIO::Platform::WiiDisc && !file->IsDatelDisc();
|
||||
}))
|
||||
{
|
||||
|
@ -321,7 +321,7 @@ void ConvertDialog::Convert()
|
|||
}
|
||||
}
|
||||
|
||||
if (std::any_of(m_files.begin(), m_files.end(), std::mem_fn(&UICommon::GameFile::IsNKit)))
|
||||
if (std::ranges::any_of(m_files, &UICommon::GameFile::IsNKit))
|
||||
{
|
||||
if (!ShowAreYouSureDialog(
|
||||
tr("Dolphin can't convert NKit files to non-NKit files. Converting an NKit file in "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue