mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-16 12:58:33 +02:00
Modernize std::all_of
with ranges
In DITSpecification.cpp, MaterialAsset.cpp, and ShaderAsset.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those. In NetPlayClient.cpp, the non-trivial `NetPlay::Player` elements were being passed by value in `NetPlayClient::DoAllPlayersHaveGame()`. This has been fixed. In WIABlob.cpp, the second example's predicate was returning the `std::optional` by value instead of implicitly converting it to a bool. This has been fixed.
This commit is contained in:
@ -136,8 +136,7 @@ bool ProcessSpecificationV1(picojson::value& root, std::vector<Data>& input_text
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!std::all_of(region_offsets.begin(), region_offsets.end(),
|
||||
[](picojson::value val) { return val.is<double>(); }))
|
||||
if (!std::ranges::all_of(region_offsets, &picojson::value::is<double>))
|
||||
{
|
||||
ERROR_LOG_FMT(
|
||||
VIDEO,
|
||||
|
Reference in New Issue
Block a user