diff options
author | Albert Astals Cid <albert.astals@canonical.com> | 2015-09-08 11:40:16 +0200 |
---|---|---|
committer | Albert Astals Cid <albert.astals@canonical.com> | 2015-09-21 10:39:06 +0000 |
commit | 53b0c5dd49cede94ab8c5cd8f2e023d1202b4862 (patch) | |
tree | 15a75e207f9173236e19cbd67c76842e78ba1fae /src/qml/util/qqmllistcompositor_p.h | |
parent | e6a4fdd519824d066d9d82ea6a1791ed7d13fde9 (diff) |
Add const & to a few iterators
Change-Id: I0ed3a592e9d6f1ac114af7a998517d9aa3b56828
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/util/qqmllistcompositor_p.h')
-rw-r--r-- | src/qml/util/qqmllistcompositor_p.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/util/qqmllistcompositor_p.h b/src/qml/util/qqmllistcompositor_p.h index 8e10cb1546..2ddbc5d5a1 100644 --- a/src/qml/util/qqmllistcompositor_p.h +++ b/src/qml/util/qqmllistcompositor_p.h @@ -166,7 +166,7 @@ public: struct Change { inline Change() {} - inline Change(iterator it, int count, uint flags, int moveId = -1); + inline Change(const iterator &it, int count, uint flags, int moveId = -1); int count; uint flags; int moveId; @@ -188,14 +188,14 @@ public: struct Insert : public Change { Insert() {} - Insert(iterator it, int count, uint flags, int moveId = -1) + Insert(const iterator &it, int count, uint flags, int moveId = -1) : Change(it, count, flags, moveId) {} }; struct Remove : public Change { Remove() {} - Remove(iterator it, int count, uint flags, int moveId = -1) + Remove(const iterator &it, int count, uint flags, int moveId = -1) : Change(it, count, flags, moveId) {} }; @@ -224,14 +224,14 @@ public: void setFlags(iterator from, int count, Group group, uint flags, QVector<Insert> *inserts = 0); void setFlags(Group fromGroup, int from, int count, uint flags, QVector<Insert> *inserts = 0) { setFlags(fromGroup, from, count, fromGroup, flags, inserts); } - void setFlags(iterator from, int count, uint flags, QVector<Insert> *inserts = 0) { + void setFlags(const iterator from, int count, uint flags, QVector<Insert> *inserts = 0) { setFlags(from, count, from.group, flags, inserts); } void clearFlags(Group fromGroup, int from, int count, Group group, uint flags, QVector<Remove> *removals = 0); void clearFlags(iterator from, int count, Group group, uint flags, QVector<Remove> *removals = 0); void clearFlags(Group fromGroup, int from, int count, uint flags, QVector<Remove> *removals = 0) { clearFlags(fromGroup, from, count, fromGroup, flags, removals); } - void clearFlags(iterator from, int count, uint flags, QVector<Remove> *removals = 0) { + void clearFlags(const iterator &from, int count, uint flags, QVector<Remove> *removals = 0) { clearFlags(from, count, from.group, flags, removals); } bool verifyMoveTo(Group fromGroup, int from, Group toGroup, int to, int count, Group group) const; @@ -347,7 +347,7 @@ inline QQmlListCompositor::insert_iterator::insert_iterator( Range *range, int offset, Group group, int groupCount) : iterator(range, offset, group, groupCount) {} -inline QQmlListCompositor::Change::Change(iterator it, int count, uint flags, int moveId) +inline QQmlListCompositor::Change::Change(const iterator &it, int count, uint flags, int moveId) : count(count), flags(flags), moveId(moveId) { for (int i = 0; i < MaximumGroupCount; ++i) |