mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-11-08 13:40:08 +00:00
Fix issue with vk::StructureChain::assign: use auto, instead of void *, to also support structures with const void * as type for pNext. (#1799)
This commit is contained in:
parent
c74c22fb77
commit
7a048a0cc7
@ -122,7 +122,7 @@
|
||||
StructureChain & assign( const T & rhs ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
T & lhs = get<T, Which>();
|
||||
void * pNext = lhs.pNext;
|
||||
auto pNext = lhs.pNext;
|
||||
lhs = rhs;
|
||||
lhs.pNext = pNext;
|
||||
return *this;
|
||||
|
@ -77,6 +77,9 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
sc7.assign<vk::PhysicalDeviceIDProperties>( {} );
|
||||
assert( pNext == sc7.get<vk::PhysicalDeviceIDProperties>().pNext );
|
||||
|
||||
vk::StructureChain<vk::DeviceQueueCreateInfo, vk::DeviceQueueGlobalPriorityCreateInfoKHR> sc8;
|
||||
sc8.assign<vk::DeviceQueueGlobalPriorityCreateInfoKHR>( {} );
|
||||
|
||||
#if !defined( NDEBUG )
|
||||
void * pNext1 = sc7.get<vk::PhysicalDeviceMaintenance3Properties>().pNext;
|
||||
#endif
|
||||
|
@ -724,7 +724,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
StructureChain & assign( const T & rhs ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
T & lhs = get<T, Which>();
|
||||
void * pNext = lhs.pNext;
|
||||
auto pNext = lhs.pNext;
|
||||
lhs = rhs;
|
||||
lhs.pNext = pNext;
|
||||
return *this;
|
||||
|
@ -724,7 +724,7 @@ namespace VULKAN_HPP_NAMESPACE
|
||||
StructureChain & assign( const T & rhs ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
T & lhs = get<T, Which>();
|
||||
void * pNext = lhs.pNext;
|
||||
auto pNext = lhs.pNext;
|
||||
lhs = rhs;
|
||||
lhs.pNext = pNext;
|
||||
return *this;
|
||||
|
Loading…
Reference in New Issue
Block a user