aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pugl_vulkan_demo.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-02 21:52:20 +0100
committerDavid Robillard <d@drobilla.net>2021-01-02 21:52:20 +0100
commit59296974c71dfc7db7d003b40af84fa36a5e93c6 (patch)
treeda05c022c534e8bd1d2800310e9c80c4d98c6046 /examples/pugl_vulkan_demo.c
parent416478739315ca41ad236197b25f87b83ab7f312 (diff)
downloadpugl-59296974c71dfc7db7d003b40af84fa36a5e93c6.tar.gz
pugl-59296974c71dfc7db7d003b40af84fa36a5e93c6.tar.bz2
pugl-59296974c71dfc7db7d003b40af84fa36a5e93c6.zip
Avoid "else" after "return"
Diffstat (limited to 'examples/pugl_vulkan_demo.c')
-rw-r--r--examples/pugl_vulkan_demo.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/pugl_vulkan_demo.c b/examples/pugl_vulkan_demo.c
index 3af6d19..0dfbadd 100644
--- a/examples/pugl_vulkan_demo.c
+++ b/examples/pugl_vulkan_demo.c
@@ -312,7 +312,9 @@ getGraphicsQueueIndex(VkSurfaceKHR surface,
device, q, surface, &supported))) {
free(props);
return r;
- } else if (supported) {
+ }
+
+ if (supported) {
*graphicsIndex = q;
free(props);
return VK_SUCCESS;
@@ -1059,7 +1061,9 @@ main(int argc, char** argv)
// Create world and view
if (!(app.world = puglNewWorld(PUGL_PROGRAM, PUGL_WORLD_THREADS))) {
return logError("Failed to create world\n");
- } else if (!(app.view = puglNewView(app.world))) {
+ }
+
+ if (!(app.view = puglNewView(app.world))) {
puglFreeWorld(app.world);
return logError("Failed to create Pugl World and View\n");
}