From 750a37f6330377a0972f949f731a80d2df92aca5 Mon Sep 17 00:00:00 2001 From: Connor Haskins Date: Sun, 20 Dec 2020 01:17:40 -0800 Subject: [PATCH] Remove unnecessary comparison It is not possible for swapchainPresentMode to ever be VK_PRESENT_MODE_MAILBOX_KHR given the break in the above if block --- base/VulkanSwapChain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/VulkanSwapChain.cpp b/base/VulkanSwapChain.cpp index 64bb0d49..368f0e90 100644 --- a/base/VulkanSwapChain.cpp +++ b/base/VulkanSwapChain.cpp @@ -272,7 +272,7 @@ void VulkanSwapChain::create(uint32_t *width, uint32_t *height, bool vsync) swapchainPresentMode = VK_PRESENT_MODE_MAILBOX_KHR; break; } - if ((swapchainPresentMode != VK_PRESENT_MODE_MAILBOX_KHR) && (presentModes[i] == VK_PRESENT_MODE_IMMEDIATE_KHR)) + if (presentModes[i] == VK_PRESENT_MODE_IMMEDIATE_KHR) { swapchainPresentMode = VK_PRESENT_MODE_IMMEDIATE_KHR; } @@ -594,4 +594,4 @@ void VulkanSwapChain::createDirect2DisplaySurface(uint32_t width, uint32_t heigh delete[] pDisplayProperties; delete[] pPlaneProperties; } -#endif \ No newline at end of file +#endif