change calls to std::find, std::find_if, and std::find_if_not to functionally identical calls to std::any_of, std::all_of, and std::none_of, when appropriate (#1621)

This commit is contained in:
Andreas Süßenbach
2023-07-13 11:26:01 +02:00
committed by GitHub
parent 069c3b875e
commit 207031caa4
11 changed files with 270 additions and 283 deletions

View File

@@ -109,10 +109,9 @@ bool checkLayers( std::vector<char const *> const & layers, std::vector<vk::Laye
layers.end(),
[&properties]( char const * name )
{
return std::find_if( properties.begin(),
properties.end(),
[&name]( vk::LayerProperties const & property )
{ return strcmp( property.layerName, name ) == 0; } ) != properties.end();
return std::any_of( properties.begin(),
properties.end(),
[&name]( vk::LayerProperties const & property ) { return strcmp( property.layerName, name ) == 0; } );
} );
}