diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-02-29 01:01:50 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-03-04 20:03:50 +0000 |
commit | b630aa54c3dc8b9783596d2a04c253ecf6ca6436 (patch) | |
tree | 3cfeb5d60e06862050e0afb07a8c5f89b739a870 /src/render/framegraph/framegraphnode.cpp | |
parent | 27d42a9894cdf31af5bf7c82343da9ea4ef3b64c (diff) |
render/framegraph: eradicate Q_FOREACH loops [low-risk]
... by replacing them with C++11 range-for loops. To
avoid detaches of these mutable Qt containers, wrap
the container in qAsConst(), where needed.
This is the batch with low-risk changes. They operate
on local containers or the loop body clearly does not
cause the container to change.
Saves 900B in text size on optimized GCC 5.3 Linux
AMD64 builds.
Change-Id: I186b2aaf0662bbbc802d103794df608bb7b940a4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/framegraph/framegraphnode.cpp')
-rw-r--r-- | src/render/framegraph/framegraphnode.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/framegraph/framegraphnode.cpp b/src/render/framegraph/framegraphnode.cpp index e6553c4a5..445966f29 100644 --- a/src/render/framegraph/framegraphnode.cpp +++ b/src/render/framegraph/framegraphnode.cpp @@ -129,7 +129,7 @@ QList<FrameGraphNode *> FrameGraphNode::children() const QList<FrameGraphNode *> children; children.reserve(m_childrenIds.size()); - Q_FOREACH (Qt3DCore::QNodeId id, m_childrenIds) { + for (Qt3DCore::QNodeId id : m_childrenIds) { FrameGraphNode *child = m_manager->lookupNode(id); if (child != Q_NULLPTR) children << child; |