aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4stringobject.cpp
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2015-09-14 15:34:29 +0200
committerAleix Pol Gonzalez <aleixpol@kde.org>2015-09-15 13:17:00 +0000
commit620b67ee15db7845d813a641563c488125730800 (patch)
tree5279a54d523acf138ec00e47aeb78318795a9389 /src/qml/jsruntime/qv4stringobject.cpp
parenta7003d3a1e46946bb2ed77f71bf68d25d5ecae8c (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.cpp2
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)