diff --git a/src/libs/qmljs/persistenttrie.cpp b/src/libs/qmljs/persistenttrie.cpp index d41c5d2443e..6c604882490 100644 --- a/src/libs/qmljs/persistenttrie.cpp +++ b/src/libs/qmljs/persistenttrie.cpp @@ -583,12 +583,12 @@ bool Trie::isEmpty() const return trie.isNull(); // assuming to never generate an empty non null trie } -bool Trie::operator==(const Trie &o) +bool Trie::operator==(const Trie &o) const { return TrieNode::isSame(trie,o.trie); } -bool Trie::operator!=(const Trie &o) +bool Trie::operator!=(const Trie &o) const { return !TrieNode::isSame(trie,o.trie); } diff --git a/src/libs/qmljs/persistenttrie.h b/src/libs/qmljs/persistenttrie.h index f9457723c4b..f0e52a2662b 100644 --- a/src/libs/qmljs/persistenttrie.h +++ b/src/libs/qmljs/persistenttrie.h @@ -73,8 +73,8 @@ public: void replace(const QHash &replacements); bool isEmpty() const; - bool operator==(const Trie &o); - bool operator!=(const Trie &o); + bool operator==(const Trie &o) const; + bool operator!=(const Trie &o) const; friend QMLJS_EXPORT QDebug operator<<(QDebug dbg, const TrieNode::Ptr &trie); friend QMLJS_EXPORT QDebug operator<<(QDebug dbg, const Trie &trie);