File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Graphics/GraphicsEngineVulkan/src/VulkanUtilities Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -680,6 +680,11 @@ VkPhysicalDevice VulkanInstance::SelectPhysicalDevice(uint32_t AdapterId) const
680680 return SelectedPhysicalDevice;
681681}
682682
683+ #ifdef _MSC_VER
684+ # pragma warning(push)
685+ # pragma warning(disable : 4702) // unreachable code
686+ #endif
687+
683688VkPhysicalDevice VulkanInstance::SelectPhysicalDeviceForOpenXR (const CreateInfo::OpenXRInfo& XRInfo) const noexcept (false )
684689{
685690#if DILIGENT_USE_OPENXR
@@ -708,8 +713,12 @@ VkPhysicalDevice VulkanInstance::SelectPhysicalDeviceForOpenXR(const CreateInfo:
708713 return vkDevice;
709714#else
710715 LOG_ERROR_AND_THROW (" OpenXR is not supported. Use DILIGENT_USE_OPENXR CMake option to enable it." );
711- return VK_NULL_HANDLE;
716+ return VK_NULL_HANDLE; // Triggers unreachable code warning on MSVC
712717#endif
713718}
714719
720+ #ifdef _MSC_VER
721+ # pragma warning(pop)
722+ #endif
723+
715724} // namespace VulkanUtilities
You can’t perform that action at this time.
0 commit comments