cube: Remove redundant memset
authorCharles Giessen <charles@lunarg.com>
Fri, 20 Mar 2020 21:28:51 +0000 (15:28 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Fri, 20 Mar 2020 22:54:30 +0000 (16:54 -0600)
The C++ Vulkan headers will default initialize objects, not need to memset it.

Change-Id: Icdc5cde13410bc7f0002c2d6d4075e79100fd86d

cube/cube.cpp

index 216440a..bc10ac7 100644 (file)
@@ -2064,7 +2064,6 @@ void Demo::prepare_texture_buffer(const char *filename, texture_object *tex_obj)
     VERIFY(result == vk::Result::eSuccess);
 
     vk::SubresourceLayout layout;
-    memset(&layout, 0, sizeof(layout));
     layout.rowPitch = tex_width * 4;
     auto data = device.mapMemory(tex_obj->mem, 0, tex_obj->mem_alloc.allocationSize);
     VERIFY(data.result == vk::Result::eSuccess);