summaryrefslogtreecommitdiffstats
path: root/src/render/jobs/lightgatherer.cpp
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2017-12-27 15:25:22 +0000
committerSean Harmer <sean.harmer@kdab.com>2018-01-13 16:15:19 +0000
commitc3b7cbd713c2434e91f0a2e306e6092037b5035f (patch)
tree135780c8b47cb3da7671749146b698b4a0925ca4 /src/render/jobs/lightgatherer.cpp
parent56f0e3328386ee7bb82fa85601186e7dd0e853a9 (diff)
Iterate by const reference on handles
When iterating on handles, use const references to avoid copy of non trivial type. Found by Clazy clazy-range-loop Change-Id: I33ec54b3958160da2517e196411bcf92cd7b3bff Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/jobs/lightgatherer.cpp')
-rw-r--r--src/render/jobs/lightgatherer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/jobs/lightgatherer.cpp b/src/render/jobs/lightgatherer.cpp
index e62544f15..b76cd4d73 100644
--- a/src/render/jobs/lightgatherer.cpp
+++ b/src/render/jobs/lightgatherer.cpp
@@ -61,7 +61,7 @@ void LightGatherer::run()
const QVector<HEntity> handles = m_manager->activeHandles();
int envLightCount = 0;
- for (const HEntity handle : handles) {
+ for (const HEntity &handle : handles) {
Entity *node = m_manager->data(handle);
const QVector<Light *> lights = node->renderComponents<Light>();
if (!lights.isEmpty())