aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/ftw
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-04-21 14:08:06 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-05-12 14:08:37 +0000
commita7b383ab989e74ef552c2ef9c38377e065f1ab0e (patch)
treea278dba709e1133e805d8d64cf3facb5d716ea89 /src/qml/qml/ftw
parent32897258b4b9309cae9562a61fea280acd954aa5 (diff)
V4: calculate the hash only once when inserting a string.
Reduces the number of instructions of IdentifierTable::identifier by ~15%. Change-Id: I5a234fa96a6ee3e7202150ded512d1be0b36560d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/ftw')
-rw-r--r--src/qml/qml/ftw/qhashedstring.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/ftw/qhashedstring.cpp b/src/qml/qml/ftw/qhashedstring.cpp
index 37c1003748..5c5d2a31ac 100644
--- a/src/qml/qml/ftw/qhashedstring.cpp
+++ b/src/qml/qml/ftw/qhashedstring.cpp
@@ -41,12 +41,12 @@
inline quint32 stringHash(const QChar* data, int length)
{
- return QV4::String::createHashValue(data, length);
+ return QV4::String::createHashValue(data, length, Q_NULLPTR);
}
inline quint32 stringHash(const char *data, int length)
{
- return QV4::String::createHashValue(data, length);
+ return QV4::String::createHashValue(data, length, Q_NULLPTR);
}
void QHashedString::computeHash() const