From 22eec6bb0f178fd5491d7934b79cf8f07f50e733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Thu, 27 May 2021 09:05:06 +0200 Subject: Fix MSVC warning C4065 qsgdefaultcontext.cpp(308): warning C4065: switch statement contains 'default' but no 'case' labels Change-Id: Ic050d21549cb3eeabade803a23e3e9eb202e3a74 Reviewed-by: Fabian Kosmale Reviewed-by: Laszlo Agocs (cherry picked from commit 0bdbfb9589ce912afbecc6fd3408f8320d78de10) Reviewed-by: Qt Cherry-pick Bot --- src/quick/scenegraph/qsgdefaultcontext.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/quick/scenegraph/qsgdefaultcontext.cpp b/src/quick/scenegraph/qsgdefaultcontext.cpp index 2df9c50898..fd448ee3a2 100644 --- a/src/quick/scenegraph/qsgdefaultcontext.cpp +++ b/src/quick/scenegraph/qsgdefaultcontext.cpp @@ -298,14 +298,11 @@ void *QSGDefaultContext::getResource(QQuickWindow *window, Resource resource) co QQuickWindowPrivate::get(window)->context); QSGRhiSupport *rhiSupport = QSGRhiSupport::instance(); - switch (resource) { #if QT_CONFIG(vulkan) - case VulkanInstanceResource: + if (resource == VulkanInstanceResource) return window->vulkanInstance(); #endif - default: - return const_cast(rhiSupport->rifResource(resource, rc, window)); - } + return const_cast(rhiSupport->rifResource(resource, rc, window)); } QSGRendererInterface::ShaderType QSGDefaultContext::shaderType() const -- cgit v1.2.3