Use std::equal to compare array of null-terminated strings in structs.
This commit is contained in:
@@ -23531,25 +23531,16 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( queueCreateInfoCount == rhs.queueCreateInfoCount ) &&
|
||||
( pQueueCreateInfos == rhs.pQueueCreateInfos ) && ( enabledLayerCount == rhs.enabledLayerCount ) &&
|
||||
[this, rhs]
|
||||
{
|
||||
bool equal = true;
|
||||
for ( size_t i = 0; equal && ( i < enabledLayerCount ); ++i )
|
||||
{
|
||||
equal = ( ( ppEnabledLayerNames[i] == rhs.ppEnabledLayerNames[i] ) || ( strcmp( ppEnabledLayerNames[i], rhs.ppEnabledLayerNames[i] ) == 0 ) );
|
||||
}
|
||||
return equal;
|
||||
}() && ( enabledExtensionCount == rhs.enabledExtensionCount ) &&
|
||||
[this, rhs]
|
||||
{
|
||||
bool equal = true;
|
||||
for ( size_t i = 0; equal && ( i < enabledExtensionCount ); ++i )
|
||||
{
|
||||
equal = ( ( ppEnabledExtensionNames[i] == rhs.ppEnabledExtensionNames[i] ) ||
|
||||
( strcmp( ppEnabledExtensionNames[i], rhs.ppEnabledExtensionNames[i] ) == 0 ) );
|
||||
}
|
||||
return equal;
|
||||
}() && ( pEnabledFeatures == rhs.pEnabledFeatures );
|
||||
std::equal( ppEnabledLayerNames,
|
||||
ppEnabledLayerNames + enabledLayerCount,
|
||||
rhs.ppEnabledLayerNames,
|
||||
[]( char const * left, char const * right ) { return ( left == right ) || ( strcmp( left, right ) == 0 ); } ) &&
|
||||
( enabledExtensionCount == rhs.enabledExtensionCount ) &&
|
||||
std::equal( ppEnabledExtensionNames,
|
||||
ppEnabledExtensionNames + enabledExtensionCount,
|
||||
rhs.ppEnabledExtensionNames,
|
||||
[]( char const * left, char const * right ) { return ( left == right ) || ( strcmp( left, right ) == 0 ); } ) &&
|
||||
( pEnabledFeatures == rhs.pEnabledFeatures );
|
||||
}
|
||||
|
||||
bool operator!=( DeviceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT
|
||||
@@ -43092,25 +43083,15 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
return ( sType == rhs.sType ) && ( pNext == rhs.pNext ) && ( flags == rhs.flags ) && ( pApplicationInfo == rhs.pApplicationInfo ) &&
|
||||
( enabledLayerCount == rhs.enabledLayerCount ) &&
|
||||
[this, rhs]
|
||||
{
|
||||
bool equal = true;
|
||||
for ( size_t i = 0; equal && ( i < enabledLayerCount ); ++i )
|
||||
{
|
||||
equal = ( ( ppEnabledLayerNames[i] == rhs.ppEnabledLayerNames[i] ) || ( strcmp( ppEnabledLayerNames[i], rhs.ppEnabledLayerNames[i] ) == 0 ) );
|
||||
}
|
||||
return equal;
|
||||
}() && ( enabledExtensionCount == rhs.enabledExtensionCount ) &&
|
||||
[this, rhs]
|
||||
{
|
||||
bool equal = true;
|
||||
for ( size_t i = 0; equal && ( i < enabledExtensionCount ); ++i )
|
||||
{
|
||||
equal = ( ( ppEnabledExtensionNames[i] == rhs.ppEnabledExtensionNames[i] ) ||
|
||||
( strcmp( ppEnabledExtensionNames[i], rhs.ppEnabledExtensionNames[i] ) == 0 ) );
|
||||
}
|
||||
return equal;
|
||||
}();
|
||||
std::equal( ppEnabledLayerNames,
|
||||
ppEnabledLayerNames + enabledLayerCount,
|
||||
rhs.ppEnabledLayerNames,
|
||||
[]( char const * left, char const * right ) { return ( left == right ) || ( strcmp( left, right ) == 0 ); } ) &&
|
||||
( enabledExtensionCount == rhs.enabledExtensionCount ) &&
|
||||
std::equal( ppEnabledExtensionNames,
|
||||
ppEnabledExtensionNames + enabledExtensionCount,
|
||||
rhs.ppEnabledExtensionNames,
|
||||
[]( char const * left, char const * right ) { return ( left == right ) || ( strcmp( left, right ) == 0 ); } );
|
||||
}
|
||||
|
||||
bool operator!=( InstanceCreateInfo const & rhs ) const VULKAN_HPP_NOEXCEPT
|
||||
|
||||
Reference in New Issue
Block a user