From aebdef361a5ad7ee5332d2e9b648ba059c659a7b Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 16 Dec 2024 00:19:08 -0800 Subject: [PATCH] Fixed MSVC compiler warning --- .../src/VulkanUtilities/VulkanInstance.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp index 98ccb57e9..4812e0d55 100644 --- a/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp +++ b/Graphics/GraphicsEngineVulkan/src/VulkanUtilities/VulkanInstance.cpp @@ -707,8 +707,17 @@ VkPhysicalDevice VulkanInstance::SelectPhysicalDeviceForOpenXR(const CreateInfo: return vkDevice; #else +# ifdef _MSC_VER +# pragma warning(push) +# pragma warning(disable : 4702) // unreachable code +# endif + LOG_ERROR_AND_THROW("OpenXR is not supported. Use DILIGENT_USE_OPENXR CMake option to enable it."); return VK_NULL_HANDLE; + +# ifdef _MSC_VER +# pragma warning(pop) +# endif #endif }