aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4booleanobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-02-13 10:02:28 +0100
committerLars Knoll <lars.knoll@digia.com>2015-03-20 11:17:11 +0000
commit7b7297470cde5645b2ea1db4cec7ac4bec87c1a3 (patch)
treef6649d82123938b4ea79ebc9726480368af65335 /src/qml/jsruntime/qv4booleanobject.cpp
parent4e3fef5528587c3a360c7e8057ad8d9328f9e4cc (diff)
Cleanup some of the casting code
Get rid of value_cast, and move the Managed::as() method into Value. Change-Id: I440ac44ae77f4fda1a8a837383fe631f432f6532 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4booleanobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4booleanobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4booleanobject.cpp b/src/qml/jsruntime/qv4booleanobject.cpp
index 988af0c74b..474405e0cd 100644
--- a/src/qml/jsruntime/qv4booleanobject.cpp
+++ b/src/qml/jsruntime/qv4booleanobject.cpp
@@ -74,7 +74,7 @@ ReturnedValue BooleanPrototype::method_toString(CallContext *ctx)
if (ctx->thisObject().isBoolean()) {
result = ctx->thisObject().booleanValue();
} else {
- BooleanObject *thisObject = ctx->thisObject().as<BooleanObject>();
+ const BooleanObject *thisObject = ctx->thisObject().as<BooleanObject>();
if (!thisObject)
return ctx->engine()->throwTypeError();
result = thisObject->value();
@@ -88,7 +88,7 @@ ReturnedValue BooleanPrototype::method_valueOf(CallContext *ctx)
if (ctx->thisObject().isBoolean())
return ctx->thisObject().asReturnedValue();
- BooleanObject *thisObject = ctx->thisObject().as<BooleanObject>();
+ const BooleanObject *thisObject = ctx->thisObject().as<BooleanObject>();
if (!thisObject)
return ctx->engine()->throwTypeError();