diff options
Diffstat (limited to 'src/qml/jsruntime/qv4booleanobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4booleanobject.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4booleanobject.cpp b/src/qml/jsruntime/qv4booleanobject.cpp index d9da7d7754..57c54e15c4 100644 --- a/src/qml/jsruntime/qv4booleanobject.cpp +++ b/src/qml/jsruntime/qv4booleanobject.cpp @@ -50,17 +50,16 @@ Heap::BooleanCtor::BooleanCtor(QV4::ExecutionContext *scope) { } -ReturnedValue BooleanCtor::construct(const Managed *m, CallData *callData) +void BooleanCtor::construct(const Managed *, Scope &scope, CallData *callData) { - Scope scope(static_cast<const BooleanCtor *>(m)->engine()); bool n = callData->argc ? callData->args[0].toBoolean() : false; - return Encode(scope.engine->newBooleanObject(n)); + scope.result = Encode(scope.engine->newBooleanObject(n)); } -ReturnedValue BooleanCtor::call(const Managed *, CallData *callData) +void BooleanCtor::call(const Managed *, Scope &scope, CallData *callData) { bool value = callData->argc ? callData->args[0].toBoolean() : 0; - return Encode(value); + scope.result = Encode(value); } void BooleanPrototype::init(ExecutionEngine *engine, Object *ctor) |