aboutsummaryrefslogtreecommitdiffstats
path: root/examples/sybok.hpp
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/sybok.hpp
parent416478739315ca41ad236197b25f87b83ab7f312 (diff)
downloadpugl-59296974c71dfc7db7d003b40af84fa36a5e93c6.tar.gz
pugl-59296974c71dfc7db7d003b40af84fa36a5e93c6.tar.bz2
pugl-59296974c71dfc7db7d003b40af84fa36a5e93c6.zip
Avoid "else" after "return"
Diffstat (limited to 'examples/sybok.hpp')
-rw-r--r--examples/sybok.hpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/examples/sybok.hpp b/examples/sybok.hpp
index ed82afb..7740824 100644
--- a/examples/sybok.hpp
+++ b/examples/sybok.hpp
@@ -782,7 +782,9 @@ public:
VkInstance h = {};
if (const VkResult r = vkCreateInstance(&createInfo, nullptr, &h)) {
return r;
- } else if (!h) {
+ }
+
+ if (!h) {
// Shouldn't actually happen, but this lets the compiler know that
return VK_ERROR_INITIALIZATION_FAILED;
}
@@ -1392,7 +1394,9 @@ public:
VkDeviceMemory h = {};
if (const VkResult r = vkAllocateMemory(device, &info, nullptr, &h)) {
return r;
- } else if (!h) {
+ }
+
+ if (!h) {
return VK_ERROR_OUT_OF_DEVICE_MEMORY;
}
@@ -1484,7 +1488,9 @@ public:
if (const VkResult r =
vkCreateDebugReportCallbackEXT(instance, &createInfo, nullptr, &h)) {
return r;
- } else if (!h) {
+ }
+
+ if (!h) {
return VK_ERROR_FEATURE_NOT_PRESENT;
}
@@ -1577,7 +1583,9 @@ public:
if (r) {
return r;
- } else if (!h) {
+ }
+
+ if (!h) {
return VK_ERROR_INCOMPATIBLE_DRIVER;
}
@@ -1763,7 +1771,9 @@ private:
{
if (r) {
return r;
- } else if (!handle) {
+ }
+
+ if (!handle) {
return VK_ERROR_INITIALIZATION_FAILED;
}