diff options
author | Mike Krus <mike.krus@kdab.com> | 2017-12-27 15:25:22 +0000 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2018-01-13 16:15:19 +0000 |
commit | c3b7cbd713c2434e91f0a2e306e6092037b5035f (patch) | |
tree | 135780c8b47cb3da7671749146b698b4a0925ca4 /src/input/frontend/qinputaspect.cpp | |
parent | 56f0e3328386ee7bb82fa85601186e7dd0e853a9 (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/input/frontend/qinputaspect.cpp')
-rw-r--r-- | src/input/frontend/qinputaspect.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp index a3bf58f08..fe0e29ee7 100644 --- a/src/input/frontend/qinputaspect.cpp +++ b/src/input/frontend/qinputaspect.cpp @@ -258,7 +258,7 @@ QVector<QAspectJobPtr> QInputAspect::jobsToExecute(qint64 time) const auto devHandles = d->m_inputHandler->logicalDeviceManager()->activeDevices(); QVector<QAspectJobPtr> axisActionJobs; axisActionJobs.reserve(devHandles.size()); - for (Input::HLogicalDevice devHandle : devHandles) { + for (const Input::HLogicalDevice &devHandle : devHandles) { const auto device = d->m_inputHandler->logicalDeviceManager()->data(devHandle); if (!device->isEnabled()) continue; |