aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/ftw
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-06-25 22:02:11 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-28 14:55:58 +0200
commite7249321a95d615fa0abea700e9f768b20151fe1 (patch)
tree38209a4e6f286e09e8bd9c04aa6f8a062f5aa012 /src/qml/qml/ftw
parent4a3d5537dde71c57378da7e65e732d50f88e592a (diff)
Remove the symbol optimisation from hashed string
Simplify the code, so we can move over to identifiers later. Change-Id: I42cb164840ecfd3f765049ab9fa46746a0d4a85b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/ftw')
-rw-r--r--src/qml/qml/ftw/qhashedstring_p.h31
1 files changed, 1 insertions, 30 deletions
diff --git a/src/qml/qml/ftw/qhashedstring_p.h b/src/qml/qml/ftw/qhashedstring_p.h
index 1261db234d..efcee0fb51 100644
--- a/src/qml/qml/ftw/qhashedstring_p.h
+++ b/src/qml/qml/ftw/qhashedstring_p.h
@@ -110,7 +110,6 @@ public:
inline quint32 hash() const;
inline int length() const;
- inline quint32 symbolId() const;
inline QV4::Value string() const;
@@ -268,12 +267,6 @@ public:
}
}
- inline bool symbolEquals(const QHashedV4String &string) const {
- Q_ASSERT(string.symbolId() != 0);
- return length == string.length() && hash == string.hash() &&
- (string.symbolId() == symbolId || equals(string.string()));
- }
-
inline bool equals(const QHashedV4String &string) const {
return length == string.length() && hash == string.hash() &&
equals(string.string());
@@ -402,8 +395,6 @@ public:
template<typename K>
inline Node *findNode(const K &) const;
- inline Node *findSymbolNode(const QHashedV4String &) const;
-
inline Node *createNode(const Node &o);
template<typename K>
@@ -867,21 +858,6 @@ typename QStringHash<T>::Node *QStringHash<T>::findNode(const K &key) const
}
template<class T>
-typename QStringHash<T>::Node *QStringHash<T>::findSymbolNode(const QHashedV4String &string) const
-{
- Q_ASSERT(string.symbolId() != 0);
-
- QStringHashNode *node = data.numBuckets?data.buckets[hashOf(string) % data.numBuckets]:0;
- while (node && !node->symbolEquals(string))
- node = (*node->next);
-
- if (node)
- node->symbolId = string.symbolId();
-
- return (Node *)node;
-}
-
-template<class T>
template<class K>
T *QStringHash<T>::value(const K &key) const
{
@@ -899,7 +875,7 @@ T *QStringHash<T>::value(const ConstIterator &iter) const
template<class T>
T *QStringHash<T>::value(const QHashedV4String &string) const
{
- Node *n = string.symbolId()?findSymbolNode(string):findNode(string);
+ Node *n = findNode(string);
return n?&n->value:0;
}
@@ -1159,11 +1135,6 @@ int QHashedV4String::length() const
return m_string.asString()->toQString().length();
}
-quint32 QHashedV4String::symbolId() const
-{
- return m_string.asString()->identifier;
-}
-
QV4::Value QHashedV4String::string() const
{
return m_string;