mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-22 20:30:04 +00:00
Extend finding an enum value to also look for the aliases. (#1839)
This commit is contained in:
parent
268fb77fb5
commit
8c9901c072
@ -15496,13 +15496,17 @@ namespace
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
typename std::vector<std::pair<std::string, T>>::const_iterator find( std::vector<std::pair<std::string, T>> const & values, std::string const & name )
|
typename std::vector<std::pair<std::string, T>>::const_iterator find( std::vector<std::pair<std::string, T>> const & values, std::string const & name )
|
||||||
{
|
{
|
||||||
return std::find_if( values.begin(), values.end(), [&name]( std::pair<std::string, T> const & value ) { return value.first == name; } );
|
return std::find_if( values.begin(),
|
||||||
|
values.end(),
|
||||||
|
[&name]( std::pair<std::string, T> const & value ) { return ( value.first == name ) || value.second.aliases.contains( name ); } );
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
typename std::vector<std::pair<std::string, T>>::iterator find( std::vector<std::pair<std::string, T>> & values, std::string const & name )
|
typename std::vector<std::pair<std::string, T>>::iterator find( std::vector<std::pair<std::string, T>> & values, std::string const & name )
|
||||||
{
|
{
|
||||||
return std::find_if( values.begin(), values.end(), [&name]( std::pair<std::string, T> const & value ) { return value.first == name; } );
|
return std::find_if( values.begin(),
|
||||||
|
values.end(),
|
||||||
|
[&name]( std::pair<std::string, T> const & value ) { return ( value.first == name ) || value.second.aliases.contains( name ); } );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string generateCArraySizes( std::vector<std::string> const & sizes )
|
std::string generateCArraySizes( std::vector<std::string> const & sizes )
|
||||||
|
Loading…
Reference in New Issue
Block a user