From 4bc6a951fe11d34c0e64af08d1802aef011f2215 Mon Sep 17 00:00:00 2001 From: Marcell Kiss Date: Sat, 20 Aug 2016 13:27:03 +0200 Subject: [PATCH] tabs to space, remove braces --- examples/vulkan_example/imgui_impl_glfw_vulkan.cpp | 4 ++-- examples/vulkan_example/main.cpp | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp b/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp index fa17959f..a9c18f33 100644 --- a/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp +++ b/examples/vulkan_example/imgui_impl_glfw_vulkan.cpp @@ -747,8 +747,8 @@ bool ImGui_ImplGlfwVulkan_CreateDeviceObjects() VkDynamicState dynamic_states[2] = { VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR }; VkPipelineDynamicStateCreateInfo dynamic_state = {}; - dynamic_state.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; - dynamic_state.dynamicStateCount = 2; + dynamic_state.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO; + dynamic_state.dynamicStateCount = 2; dynamic_state.pDynamicStates = dynamic_states; VkGraphicsPipelineCreateInfo info = {}; diff --git a/examples/vulkan_example/main.cpp b/examples/vulkan_example/main.cpp index 040ff241..f3318fed 100644 --- a/examples/vulkan_example/main.cpp +++ b/examples/vulkan_example/main.cpp @@ -88,14 +88,10 @@ static void resize_vulkan(GLFWwindow* /*window*/, int w, int h) VkSurfaceCapabilitiesKHR cap; err = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(g_Gpu, g_Surface, &cap); check_vk_result(err); - if (cap.maxImageCount > 0) - { - info.minImageCount = (cap.minImageCount + 2 < cap.maxImageCount) ? (cap.minImageCount + 2) : cap.maxImageCount; - } - else - { - info.minImageCount = cap.minImageCount + 2; - } + if (cap.maxImageCount > 0) + info.minImageCount = (cap.minImageCount + 2 < cap.maxImageCount) ? (cap.minImageCount + 2) : cap.maxImageCount; + else + info.minImageCount = cap.minImageCount + 2; if (cap.currentExtent.width == 0xffffffff) { fb_width = w;