Improve operator==() of structs (#472)
When a struct holds a fixed size array of stuff, and the member variable right before that array is the count (determined by its specific name) for that array, we now only compare that number of stuff. Resolves #456
This commit is contained in:
committed by
Markus Tavenrath
parent
0b3af1ee76
commit
4ee2d61ef6
@@ -44202,7 +44202,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
return ( sType == rhs.sType )
|
||||
&& ( pNext == rhs.pNext )
|
||||
&& ( physicalDeviceCount == rhs.physicalDeviceCount )
|
||||
&& ( memcmp( physicalDevices, rhs.physicalDevices, VK_MAX_DEVICE_GROUP_SIZE * sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice ) ) == 0 )
|
||||
&& ( memcmp( physicalDevices, rhs.physicalDevices, std::min<uint32_t>( VK_MAX_DEVICE_GROUP_SIZE, physicalDeviceCount ) * sizeof( VULKAN_HPP_NAMESPACE::PhysicalDevice ) ) == 0 )
|
||||
&& ( subsetAllocation == rhs.subsetAllocation );
|
||||
}
|
||||
|
||||
@@ -45757,9 +45757,9 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
bool operator==( PhysicalDeviceMemoryProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return ( memoryTypeCount == rhs.memoryTypeCount )
|
||||
&& ( memcmp( memoryTypes, rhs.memoryTypes, VK_MAX_MEMORY_TYPES * sizeof( VULKAN_HPP_NAMESPACE::MemoryType ) ) == 0 )
|
||||
&& ( memcmp( memoryTypes, rhs.memoryTypes, std::min<uint32_t>( VK_MAX_MEMORY_TYPES, memoryTypeCount ) * sizeof( VULKAN_HPP_NAMESPACE::MemoryType ) ) == 0 )
|
||||
&& ( memoryHeapCount == rhs.memoryHeapCount )
|
||||
&& ( memcmp( memoryHeaps, rhs.memoryHeaps, VK_MAX_MEMORY_HEAPS * sizeof( VULKAN_HPP_NAMESPACE::MemoryHeap ) ) == 0 );
|
||||
&& ( memcmp( memoryHeaps, rhs.memoryHeaps, std::min<uint32_t>( VK_MAX_MEMORY_HEAPS, memoryHeapCount ) * sizeof( VULKAN_HPP_NAMESPACE::MemoryHeap ) ) == 0 );
|
||||
}
|
||||
|
||||
bool operator!=( PhysicalDeviceMemoryProperties const& rhs ) const VULKAN_HPP_NOEXCEPT
|
||||
|
||||
Reference in New Issue
Block a user