aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-11-21 14:25:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-04 09:45:40 +0100
commit81d55c6ef3b8faf6ca7bfcc7f9e212e382c2689f (patch)
treeabf9cb2870c4475ad20d562ab0017c94568d4a14 /src/qml/compiler/qv4codegen.cpp
parent8831e02402fa0b2a3cdfdc017bcbb10bf000995e (diff)
Add a static toArrayIndex() method to QV4::String
This avoids a hack in QV4::Codegen where we created a V4::String on the stack to convert to an array index. Change-Id: I9a88d45817bbcde52a4037a52fbae299b8c9cb1a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index a8338f8656..a920f1b419 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -1632,7 +1632,7 @@ bool Codegen::visit(ObjectLiteral *ast)
if (!valueMap.isEmpty()) {
V4IR::ExprList *current;
for (QMap<QString, ObjectPropertyValue>::iterator it = valueMap.begin(); it != valueMap.end(); ) {
- if (QV4::String(0, it.key()).asArrayIndex() != UINT_MAX) {
+ if (QV4::String::toArrayIndex(it.key()) != UINT_MAX) {
++it;
continue;
}