mirror of
https://github.com/KhronosGroup/Vulkan-Hpp.git
synced 2025-09-11 13:01:57 -04:00
replace memcpy in generated copy and assignment operators of VkStructures by reinterpreted assignments. (#348)
Fixes #342
This commit is contained in:
parent
837a5d6a23
commit
89a56017a8
@ -3765,12 +3765,12 @@ ${initializers} {${copyOps}}
|
|||||||
${subStructConstructor}
|
${subStructConstructor}
|
||||||
${name}( Vk${name} const & rhs )
|
${name}( Vk${name} const & rhs )
|
||||||
{
|
{
|
||||||
memcpy( this, &rhs, sizeof( ${name} ) );
|
*reinterpret_cast<Vk${name}*>(this) = rhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
${name}& operator=( Vk${name} const & rhs )
|
${name}& operator=( Vk${name} const & rhs )
|
||||||
{
|
{
|
||||||
memcpy( this, &rhs, sizeof( ${name} ) );
|
*reinterpret_cast<Vk${name}*>(this) = rhs;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
1348
vulkan/vulkan.hpp
1348
vulkan/vulkan.hpp
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user