diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-26 22:07:27 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-30 08:05:38 +0200 |
commit | aacebc74b2d6d982caa4ba0952fd848ffdc54c7a (patch) | |
tree | d71c8520255ee7309641e7ace32f6dbf677c3183 /src/qml/jsruntime/qv4arrayobject.cpp | |
parent | 72af16f7f48fec3d13e6537953d723cc7a50841e (diff) |
Remove more occurrences of QV4::Value
Change-Id: I66c370680d7e6bee2e73a7a940aa96ab4009ec57
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4arrayobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4arrayobject.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4arrayobject.cpp b/src/qml/jsruntime/qv4arrayobject.cpp index 7051276f4c..3ad3ec6f32 100644 --- a/src/qml/jsruntime/qv4arrayobject.cpp +++ b/src/qml/jsruntime/qv4arrayobject.cpp @@ -279,7 +279,7 @@ ReturnedValue ArrayPrototype::method_push(SimpleCallContext *ctx) ScopedString str(scope, ctx->engine->newString(QStringLiteral("Array.prototype.push: Overflow"))); ctx->throwRangeError(str); } - return Primitive::fromDouble(newLen).asReturnedValue(); + return Encode(newLen); } if (!instance->protoHasArray() && instance->arrayDataLen <= len) { @@ -345,7 +345,7 @@ ReturnedValue ArrayPrototype::method_shift(SimpleCallContext *ctx) if (!len) { if (!instance->isArrayObject()) instance->put(ctx->engine->id_length, ScopedValue(scope, Primitive::fromInt32(0))); - return Primitive::undefinedValue().asReturnedValue(); + return Encode::undefined(); } Property *front = 0; @@ -558,7 +558,7 @@ ReturnedValue ArrayPrototype::method_indexOf(SimpleCallContext *ctx) ScopedObject instance(scope, ctx->callData->thisObject.toObject(ctx)); uint len = getLength(ctx, instance.getPointer()); if (!len) - return Primitive::fromInt32(-1).asReturnedValue(); + return Encode(-1); ScopedValue searchValue(scope); uint fromIndex = 0; @@ -598,7 +598,7 @@ ReturnedValue ArrayPrototype::method_lastIndexOf(SimpleCallContext *ctx) ScopedObject instance(scope, ctx->callData->thisObject.toObject(ctx)); uint len = getLength(ctx, instance.getPointer()); if (!len) - return Primitive::fromInt32(-1).asReturnedValue(); + return Encode(-1); ScopedValue searchValue(scope); uint fromIndex = len; @@ -628,7 +628,7 @@ ReturnedValue ArrayPrototype::method_lastIndexOf(SimpleCallContext *ctx) if (exists && __qmljs_strict_equal(v, searchValue)) return Encode(k); } - return Primitive::fromInt32(-1).asReturnedValue(); + return Encode(-1); } ReturnedValue ArrayPrototype::method_every(SimpleCallContext *ctx) |