diff options
author | Sergio Martins <sergio.martins@kdab.com> | 2017-05-26 14:42:08 +0100 |
---|---|---|
committer | Mike Krus <mike.krus@kdab.com> | 2017-05-26 14:26:03 +0000 |
commit | 1e5c704bf01780302607500144b475e4018f7bc5 (patch) | |
tree | 1e562a4976621ce134ceb25a3ce5793ba76b1b13 /src/animation/frontend | |
parent | 76c2f63c2c288774e35fd7257ba2d23df6031276 (diff) |
Fix container detachments detected by clazy
Change-Id: I551073c386247215f1c51dce92e5f05b5d335cc0
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'src/animation/frontend')
-rw-r--r-- | src/animation/frontend/qanimationgroup.cpp | 2 | ||||
-rw-r--r-- | src/animation/frontend/qmorphtarget.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/animation/frontend/qanimationgroup.cpp b/src/animation/frontend/qanimationgroup.cpp index 365745662..49193834d 100644 --- a/src/animation/frontend/qanimationgroup.cpp +++ b/src/animation/frontend/qanimationgroup.cpp @@ -192,7 +192,7 @@ void QAnimationGroup::removeAnimation(Qt3DAnimation::QAbstractAnimation *animati d->m_animations.removeAll(animation); if (qFuzzyCompare(d->m_duration, animation->duration())) { d->m_duration = 0.0f; - for (const Qt3DAnimation::QAbstractAnimation *a : d->m_animations) + for (const Qt3DAnimation::QAbstractAnimation *a : qAsConst(d->m_animations)) d->m_duration = qMax(d->m_duration, a->duration()); } } diff --git a/src/animation/frontend/qmorphtarget.cpp b/src/animation/frontend/qmorphtarget.cpp index 9dc30b8ba..3abb3df74 100644 --- a/src/animation/frontend/qmorphtarget.cpp +++ b/src/animation/frontend/qmorphtarget.cpp @@ -176,7 +176,8 @@ void QMorphTarget::removeAttribute(Qt3DRender::QAttribute *attribute) QMorphTarget *QMorphTarget::fromGeometry(Qt3DRender::QGeometry *geometry, const QStringList &attributes) { QMorphTarget *target = new QMorphTarget(); - for (Qt3DRender::QAttribute *attr : geometry->attributes()) { + const auto geometryAttributes = geometry->attributes(); + for (Qt3DRender::QAttribute *attr : geometryAttributes) { if (attributes.contains(attr->name())) target->addAttribute(attr); } |