diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-06-29 15:06:08 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-07-13 08:16:39 +0000 |
commit | 9109d15398f8c869e401aa9aacc578c96200e217 (patch) | |
tree | a304ea0c5aabb46f3f306e7a5f444d224c918b59 /src/qml/qml/ftw/qhashedstring.cpp | |
parent | b55485bd4ad6d9084e15e982e457a835aeda831d (diff) |
V4: allow for String::createHashValue to be inlined
Notably into QHashedString(Ref)::computeHash.
Change-Id: Icf8487ed3da0f117cb0911f20c9b88498f61510a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/ftw/qhashedstring.cpp')
-rw-r--r-- | src/qml/qml/ftw/qhashedstring.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/qml/qml/ftw/qhashedstring.cpp b/src/qml/qml/ftw/qhashedstring.cpp index 5c5d2a31ac..117670dbfc 100644 --- a/src/qml/qml/ftw/qhashedstring.cpp +++ b/src/qml/qml/ftw/qhashedstring.cpp @@ -39,30 +39,7 @@ #include "qhashedstring_p.h" -inline quint32 stringHash(const QChar* data, int length) -{ - return QV4::String::createHashValue(data, length, Q_NULLPTR); -} -inline quint32 stringHash(const char *data, int length) -{ - return QV4::String::createHashValue(data, length, Q_NULLPTR); -} - -void QHashedString::computeHash() const -{ - m_hash = stringHash(constData(), length()); -} - -void QHashedStringRef::computeHash() const -{ - m_hash = stringHash(m_data, m_length); -} - -void QHashedCStringRef::computeHash() const -{ - m_hash = stringHash(m_data, m_length); -} /* A QHash has initially around pow(2, MinNumBits) buckets. For |