From 47fbcb47771a36ab9fd0a4d5ede7b7504ab1410d Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 11 Jan 2015 16:30:29 +0100 Subject: Get rid of all uses of Managed::engine() Change-Id: I596f14554d81f5e9af9996294d96047f2e810bef Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4dateobject.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/jsruntime/qv4dateobject.cpp') diff --git a/src/qml/jsruntime/qv4dateobject.cpp b/src/qml/jsruntime/qv4dateobject.cpp index bfc97b12af..fde0818f0e 100644 --- a/src/qml/jsruntime/qv4dateobject.cpp +++ b/src/qml/jsruntime/qv4dateobject.cpp @@ -650,13 +650,13 @@ Heap::DateCtor::DateCtor(QV4::ExecutionContext *scope) ReturnedValue DateCtor::construct(Managed *m, CallData *callData) { + Scope scope(static_cast(m)->engine()); double t = 0; if (callData->argc == 0) t = currentTime(); else if (callData->argc == 1) { - Scope scope(m->engine()); ScopedValue arg(scope, callData->args[0]); if (DateObject *d = arg->asDateObject()) arg = d->date(); @@ -683,13 +683,13 @@ ReturnedValue DateCtor::construct(Managed *m, CallData *callData) t = TimeClip(UTC(t)); } - return Encode(m->engine()->newDateObject(Primitive::fromDouble(t))); + return Encode(scope.engine->newDateObject(Primitive::fromDouble(t))); } ReturnedValue DateCtor::call(Managed *m, CallData *) { double t = currentTime(); - return m->engine()->newString(ToString(t))->asReturnedValue(); + return static_cast(m)->engine()->newString(ToString(t))->asReturnedValue(); } void DatePrototype::init(ExecutionEngine *engine, Object *ctor) -- cgit v1.2.3