aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Köhne <kai.koehne@qt.io>2021-05-27 09:05:06 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-05-27 12:26:35 +0000
commit22eec6bb0f178fd5491d7934b79cf8f07f50e733 (patch)
tree1b701ad38a11018d7abd14902b824315831d94a2
parent42ae5a32eb384cb7042eeace193aa42637970387 (diff)
Fix MSVC warning C4065
qsgdefaultcontext.cpp(308): warning C4065: switch statement contains 'default' but no 'case' labels Change-Id: Ic050d21549cb3eeabade803a23e3e9eb202e3a74 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 0bdbfb9589ce912afbecc6fd3408f8320d78de10) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quick/scenegraph/qsgdefaultcontext.cpp7
1 files 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<void *>(rhiSupport->rifResource(resource, rc, window));
- }
+ return const_cast<void *>(rhiSupport->rifResource(resource, rc, window));
}
QSGRendererInterface::ShaderType QSGDefaultContext::shaderType() const