diff options
author | Kai Köhne <kai.koehne@qt.io> | 2021-05-27 09:05:06 +0200 |
---|---|---|
committer | Kai Köhne <kai.koehne@qt.io> | 2021-05-27 11:30:12 +0200 |
commit | 0bdbfb9589ce912afbecc6fd3408f8320d78de10 (patch) | |
tree | 4eea96b9e3474e5af0e4ee21a65cc8e257e2c275 /src | |
parent | 73d51eed2f669ac91f139af3d6a5bcc621dec64a (diff) |
Fix MSVC warning C4065
qsgdefaultcontext.cpp(308): warning C4065: switch statement contains 'default' but no 'case' labels
Pick-to: 6.1
Change-Id: Ic050d21549cb3eeabade803a23e3e9eb202e3a74
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultcontext.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/quick/scenegraph/qsgdefaultcontext.cpp b/src/quick/scenegraph/qsgdefaultcontext.cpp index 17c7f0b34d..a25b34d22d 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<void *>(rhiSupport->rifResource(resource, rc, window)); - } + return const_cast<void *>(rhiSupport->rifResource(resource, rc, window)); } QSGRendererInterface::ShaderType QSGDefaultContext::shaderType() const |