aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-06-28 08:49:16 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-28 14:56:35 +0200
commit85ccf50e35a755088ee733bb4c737f8173f20241 (patch)
tree4524ca3383695b99f1deaa334053a6f3b0e7737c
parentbc9c9ca653796582b5faacb5415d12fd71d036f1 (diff)
Don't convert to a temporary QString just to compute it's hash
Change-Id: I45fbd4a6304dd2f771d75a47a2ddf162705887b5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--src/qml/qml/ftw/qhashedstring.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/qml/ftw/qhashedstring.cpp b/src/qml/qml/ftw/qhashedstring.cpp
index 0af68e89f6..7e6ea59ef9 100644
--- a/src/qml/qml/ftw/qhashedstring.cpp
+++ b/src/qml/qml/ftw/qhashedstring.cpp
@@ -48,8 +48,7 @@ inline quint32 stringHash(const QChar* data, int length)
inline quint32 stringHash(const char *data, int length)
{
- QString s = QString::fromLatin1(data, length);
- return QV4::String::createHashValue(s.constData(), s.length());
+ return QV4::String::createHashValue(data, length);
}
void QHashedString::computeHash() const