From 0c43995e9427979fc046fe11366b44dc64ea6612 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 15 Jul 2016 11:36:57 +0200 Subject: D3D12: Fix unused var warnings in release builds Change-Id: I83c3582ca7cb9523fb0e90627f2575992e84694c Reviewed-by: Andy Nichols --- src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp | 2 ++ src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp | 1 + src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp | 3 +-- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/plugins/scenegraph') diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp index 3ff8ce6e53..fc3ea4e22e 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12builtinmaterials.cpp @@ -102,6 +102,7 @@ QSGMaterialType *QSGD3D12VertexColorMaterial::type() const int QSGD3D12VertexColorMaterial::compare(const QSGMaterial *other) const { + Q_UNUSED(other); Q_ASSERT(other && type() == other->type()); // As the vertex color material has all its state in the vertex attributes // defined by the geometry, all such materials will be equal. @@ -229,6 +230,7 @@ QSGMaterialType *QSGD3D12SmoothColorMaterial::type() const int QSGD3D12SmoothColorMaterial::compare(const QSGMaterial *other) const { + Q_UNUSED(other); Q_ASSERT(other && type() == other->type()); return 0; } diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp index f17ed10c94..ec3427a9cc 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp @@ -290,6 +290,7 @@ void QSGD3D12RenderLoop::releaseResources(QQuickWindow *window) void QSGD3D12RenderLoop::postJob(QQuickWindow *window, QRunnable *job) { + Q_UNUSED(window); Q_ASSERT(job); Q_ASSERT(window); job->run(); diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp index d459ec29ab..c423206377 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12shadereffectnode.cpp @@ -136,8 +136,7 @@ void QSGD3D12ShaderLinker::feedSamplers(const QSGShaderEffectNode::ShaderData &s for (int i = 0; i < shader.shaderInfo.variables.count(); ++i) { const auto &var(shader.shaderInfo.variables.at(i)); if (var.type == QSGGuiThreadShaderEffectManager::ShaderInfo::Sampler) { - const auto &vd(shader.varData.at(i)); - Q_ASSERT(vd.specialType == QSGShaderEffectNode::VariableData::Unused); + Q_ASSERT(shader.varData.at(i).specialType == QSGShaderEffectNode::VariableData::Unused); samplers.insert(var.bindPoint); } } -- cgit v1.2.3