diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-01-26 14:38:54 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-02-11 23:18:35 +0000 |
commit | d09cfe04b82c1bd0738bca24def1e9c3bfdaaa4b (patch) | |
tree | 3553f876e10d7a30e75c488ede82c4a09db8e03e /src/gui/opengl/qopenglframebufferobject.cpp | |
parent | 257cc69bedebf924bcabf0ff24e237b8705260ad (diff) |
QtGui: eradicate Q_FOREACH loops [already const]
(or trivially marked const) ... by replacing them
with C++11 range-for loops.
Change-Id: I3cce92b9d77a3ff96fad877d1d989145e530646f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/gui/opengl/qopenglframebufferobject.cpp')
-rw-r--r-- | src/gui/opengl/qopenglframebufferobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index e35db51e01..c1b2e10785 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -1156,7 +1156,7 @@ QVector<GLuint> QOpenGLFramebufferObject::textures() const if (d->format.samples() != 0) return ids; ids.reserve(d->colorAttachments.count()); - foreach (const QOpenGLFramebufferObjectPrivate::ColorAttachment &color, d->colorAttachments) + for (const auto &color : d->colorAttachments) ids.append(color.guard ? color.guard->id() : 0); return ids; } @@ -1240,7 +1240,7 @@ QVector<QSize> QOpenGLFramebufferObject::sizes() const Q_D(const QOpenGLFramebufferObject); QVector<QSize> sz; sz.reserve(d->colorAttachments.size()); - foreach (const QOpenGLFramebufferObjectPrivate::ColorAttachment &color, d->colorAttachments) + for (const auto &color : d->colorAttachments) sz.append(color.size); return sz; } |