aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4numberobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4numberobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index 8cfa930888..40586b558b 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -78,16 +78,16 @@ void Heap::NumberCtor::init(QV4::ExecutionContext *scope)
Heap::FunctionObject::init(scope, QStringLiteral("Number"));
}
-void NumberCtor::construct(const Managed *, Scope &scope, CallData *callData)
+ReturnedValue NumberCtor::construct(const Managed *m, CallData *callData)
{
double dbl = callData->argc ? callData->args[0].toNumber() : 0.;
- scope.result = Encode(scope.engine->newNumberObject(dbl));
+ return Encode(m->engine()->newNumberObject(dbl));
}
-void NumberCtor::call(const Managed *, Scope &scope, CallData *callData)
+ReturnedValue NumberCtor::call(const Managed *, CallData *callData)
{
double dbl = callData->argc ? callData->args[0].toNumber() : 0.;
- scope.result = Encode(dbl);
+ return Encode(dbl);
}
void NumberPrototype::init(ExecutionEngine *engine, Object *ctor)