diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-05-10 12:26:47 +0100 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2015-06-02 19:41:16 +0000 |
commit | f44a59f390be9b67365db8796aa6a54fe9241028 (patch) | |
tree | bb860d3bfe9771928a654e9c7f6809f4e1c4129c /src/tools/qdoc/tree.cpp | |
parent | cd0bed6d7189fe338043e5dbdf5e8b110da7b06f (diff) |
Don't assign iterator to const_iterator
It should also be possible to use QT_STRICT_ITERATORS in Qt's own code base
Change-Id: I0914db480d4d2b06e71e3a2588163efdd3ff6d27
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/tools/qdoc/tree.cpp')
-rw-r--r-- | src/tools/qdoc/tree.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp index 420396e51c..1b0aba1a0c 100644 --- a/src/tools/qdoc/tree.cpp +++ b/src/tools/qdoc/tree.cpp @@ -1222,8 +1222,8 @@ CollectionNode* Tree::getCollection(const QString& name, Node::Genus genus) { CNMap* m = getCollectionMap(genus); if (m) { - CNMap::const_iterator i = m->find(name); - if (i != m->end()) + CNMap::const_iterator i = m->constFind(name); + if (i != m->cend()) return i.value(); } return 0; @@ -1249,8 +1249,8 @@ CollectionNode* Tree::findCollection(const QString& name, Node::Genus genus) CNMap* m = getCollectionMap(genus); if (!m) // error return 0; - CNMap::const_iterator i = m->find(name); - if (i != m->end()) + CNMap::const_iterator i = m->constFind(name); + if (i != m->cend()) return i.value(); Node::Type t = Node::NoType; switch (genus) { |