Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add extra braces when setting VkClearValue#247

Merged
Overv merged 1 commit intoOverv:masterfrom
TestingPlant:master
Jul 24, 2021
Merged

Add extra braces when setting VkClearValue#247
Overv merged 1 commit intoOverv:masterfrom
TestingPlant:master

Conversation

@TestingPlant
Copy link
Copy Markdown
Contributor

clang++ -Wall emits the warning "suggest braces around initialization of subobject [-Wmissing-braces]" with code like

VkClearValue clearColor = {0.0f, 0.0f, 0.0f, 1.0f};

Since this is trying to fill out clearColor.color.float32, 3 braces are needed like

VkClearValue clearColor = {{{0.0f, 0.0f, 0.0f, 1.0f}}};

to avoid the warning.

@Overv Overv merged commit 4b36689 into Overv:master Jul 24, 2021
Overv added a commit that referenced this pull request Mar 8, 2023
Add extra braces when setting VkClearValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants