summaryrefslogtreecommitdiffstats
path: root/src/render/graphicshelpers/graphicscontext.cpp
diff options
context:
space:
mode:
authorVolker Krause <volker.krause@kdab.com>2016-03-05 13:12:16 +0100
committerVolker Krause <volker.krause@kdab.com>2016-03-05 15:33:27 +0000
commit972ea48c1b71cefd60284a3e129d67332e08c058 (patch)
tree441281c02ffe2717896368dcbb385868167bb5ee /src/render/graphicshelpers/graphicscontext.cpp
parenta8193a3d2469ac6b4dce47addbb6f52be0bfe91f (diff)
Use const references in foreach loops for non-trivial types.
Found by clazy. Change-Id: I3260b06e56f49a5e18a1b0e7f60e5b1856923c18 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/graphicshelpers/graphicscontext.cpp')
-rw-r--r--src/render/graphicshelpers/graphicscontext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/graphicshelpers/graphicscontext.cpp b/src/render/graphicshelpers/graphicscontext.cpp
index d1dce01b4..750f9400d 100644
--- a/src/render/graphicshelpers/graphicscontext.cpp
+++ b/src/render/graphicshelpers/graphicscontext.cpp
@@ -1014,7 +1014,7 @@ void GraphicsContext::setParameters(ShaderParameterPack &parameterPack)
// TO DO: Convert ShaderData to Buffer so that we can use that generic process
const QVector<BlockToUBO> blockToUBOs = parameterPack.uniformBuffers();
int uboIndex = 0;
- Q_FOREACH (const BlockToUBO b, blockToUBOs) {
+ Q_FOREACH (const BlockToUBO &b, blockToUBOs) {
Buffer *cpuBuffer = m_renderer->nodeManagers()->bufferManager()->lookupResource(b.m_bufferID);
GLBuffer *ubo = glBufferForRenderBuffer(cpuBuffer);
bindUniformBlock(shader->programId(), b.m_blockIndex, uboIndex);