From: Lars Knoll Date: Fri, 28 Jun 2013 06:49:16 +0000 (+0200) Subject: Don't convert to a temporary QString just to compute it's hash X-Git-Tag: upstream/5.2.1~669^2~99 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85ccf50e35a755088ee733bb4c737f8173f20241;p=platform%2Fupstream%2Fqtdeclarative.git Don't convert to a temporary QString just to compute it's hash Change-Id: I45fbd4a6304dd2f771d75a47a2ddf162705887b5 Reviewed-by: Simon Hausmann --- diff --git a/src/qml/qml/ftw/qhashedstring.cpp b/src/qml/qml/ftw/qhashedstring.cpp index 0af68e8..7e6ea59 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