aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycache.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-02-23 13:44:12 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-02-26 15:13:34 +0000
commit5163c11952a39458dd6d7ba10391c2b39ccdf86a (patch)
tree98c03a10d5c9e51a5aa6f950d642ee6a7b93031f /src/qml/qml/qqmlpropertycache.cpp
parenta7c0e62b9122a8d210149570be8834401b9b36d3 (diff)
QtQml: Micro-optimize iterator loops.
Avoid repeated instantiation of end() in loops, use variable instead. Change-Id: I3bb1c6918cfd16a5dcefbcc03c442e99fe9bf76b Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlpropertycache.cpp')
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index bf38fc79a6..dd1f93ec00 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -1053,7 +1053,7 @@ void QQmlPropertyData::markAsOverrideOf(QQmlPropertyData *predecessor)
QStringList QQmlPropertyCache::propertyNames() const
{
QStringList keys;
- for (StringCache::ConstIterator iter = stringCache.begin(); iter != stringCache.end(); ++iter)
+ for (StringCache::ConstIterator iter = stringCache.begin(), cend = stringCache.end(); iter != cend; ++iter)
keys.append(iter.key());
return keys;
}
@@ -1374,7 +1374,7 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder)
QList<QPair<QString, QQmlPropertyData *> > properties;
QList<QPair<QString, QQmlPropertyData *> > methods;
- for (StringCache::ConstIterator iter = stringCache.begin(); iter != stringCache.end(); ++iter)
+ for (StringCache::ConstIterator iter = stringCache.begin(), cend = stringCache.end(); iter != cend; ++iter)
Insert::in(this, properties, methods, iter, iter.value().second);
Q_ASSERT(properties.count() == propertyIndexCache.count());