QVulkanWindow: fix fatal warning on Clang 4
qtbase/src/gui/vulkan/qvulkanwindow.cpp:1882:42: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
VkClearColorValue clearColor = { 0.0f, 0.0f, 0.0f, 1.0f };
^~~~~~~~~~~~~~~~~~~~~~
{ }
1 error generated.
VkClearColorValue is a union, so it wants to be clear that we are
initializing only one of the union's members, apparently.
(Even though initing more than one wouldn't make sense.)
Change-Id: Id4afa3ddc1b4ce7e24e681fb93c0ee9083c41e08
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
bb10
parent
226a20dff8
commit
64967461ee
|
|
@ -1879,7 +1879,7 @@ void QVulkanWindowPrivate::beginFrame()
|
|||
renderer->startNextFrame();
|
||||
// done for now - endFrame() will get invoked when frameReady() is called back
|
||||
} else {
|
||||
VkClearColorValue clearColor = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
VkClearColorValue clearColor = { { 0.0f, 0.0f, 0.0f, 1.0f } };
|
||||
VkClearDepthStencilValue clearDS = { 1.0f, 0 };
|
||||
VkClearValue clearValues[3];
|
||||
memset(clearValues, 0, sizeof(clearValues));
|
||||
|
|
|
|||
Loading…
Reference in New Issue