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/qrenderpassfilter.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/qrenderpassfilter.cpp')
-rw-r--r-- | src/render/framegraph/qrenderpassfilter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/framegraph/qrenderpassfilter.cpp b/src/render/framegraph/qrenderpassfilter.cpp index 1b58eee71..45b293057 100644 --- a/src/render/framegraph/qrenderpassfilter.cpp +++ b/src/render/framegraph/qrenderpassfilter.cpp @@ -110,9 +110,9 @@ void QRenderPassFilter::copy(const QNode *ref) { QFrameGraphNode::copy(ref); const QRenderPassFilter *other = static_cast<const QRenderPassFilter*>(ref); - Q_FOREACH (QAnnotation *c, other->d_func()->m_includeList) + for (QAnnotation *c : other->d_func()->m_includeList) addInclude(qobject_cast<QAnnotation *>(QNode::clone(c))); - Q_FOREACH (QParameter *p, other->d_func()->m_parameters) + for (QParameter *p : other->d_func()->m_parameters) addParameter(qobject_cast<QParameter *>(QNode::clone(p))); } |