diff options
| author | Chris Forbes <chrisf@ijw.co.nz> | 2015-07-11 16:06:23 +1200 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2015-07-17 10:05:21 -0600 |
| commit | 2a2d6e12d0698a88d5d05a6311e1dbdf4a6dc95f (patch) | |
| tree | 8c80621c0a21414aba039e2e6ee5ab79d076c9ff | |
| parent | 4aaca57f1e3842458fe2b5e1c0dbf9e6870c8296 (diff) | |
| download | usermoji-2a2d6e12d0698a88d5d05a6311e1dbdf4a6dc95f.tar.xz | |
mem_tracker: Provide ctor for embedded union (and name it so we can)
VkSwapChainCreateInfoWSI has a nontrivial default constructor due to
having an embedded VkSwapChain handle.
From the C++11 standard, 9.5:
"If any non-static data member of a union has a non-trivial default
constructor (12.1), copy constructor (12.8), move constructor (12.8),
copy assignment operator (12.8), move assignment operator (12.8), or
destructor (12.4), the corresponding member function of the union must
be user-provided or it will be implicitly deleted (8.4.3) for the
union."
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
| -rw-r--r-- | layers/mem_tracker.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/layers/mem_tracker.h b/layers/mem_tracker.h index b8607ab2..48d4f143 100644 --- a/layers/mem_tracker.h +++ b/layers/mem_tracker.h @@ -100,10 +100,12 @@ struct MT_MEM_OBJ_INFO { // This only applies to Buffers and Images, which can have memory bound to them struct MT_OBJ_BINDING_INFO { VkDeviceMemory mem; - union { + union create_info { VkImageCreateInfo image; VkBufferCreateInfo buffer; VkSwapChainCreateInfoWSI swapchain; + + create_info() : image() {} } create_info; }; |
