diff options
author | Aleix Pol <aleixpol@kde.org> | 2015-09-14 15:34:29 +0200 |
---|---|---|
committer | Aleix Pol Gonzalez <aleixpol@kde.org> | 2015-09-15 13:17:00 +0000 |
commit | 620b67ee15db7845d813a641563c488125730800 (patch) | |
tree | 5279a54d523acf138ec00e47aeb78318795a9389 /src/qml/jsruntime/qv4stringobject.cpp | |
parent | a7003d3a1e46946bb2ed77f71bf68d25d5ecae8c (diff) |
Don't compute the QString whenever we need to know the v4 string length
The length is already computed in the len attribute anyway.
Change-Id: I1a406175edd9127b9b425eb21703e2184f5a3cd7
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4stringobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4stringobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4stringobject.cpp b/src/qml/jsruntime/qv4stringobject.cpp index cb2694774b..eebbf802c9 100644 --- a/src/qml/jsruntime/qv4stringobject.cpp +++ b/src/qml/jsruntime/qv4stringobject.cpp @@ -98,7 +98,7 @@ Heap::String *Heap::StringObject::getIndex(uint index) const uint Heap::StringObject::length() const { - return string->toQString().length(); + return string->len; } bool StringObject::deleteIndexedProperty(Managed *m, uint index) |