From 63a0776c0ee73e7957208b96573a8275504879ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C4=99drzej=20Nowacki?= Date: Mon, 28 Jan 2013 12:54:07 +0100 Subject: [PATCH] Fix constness of Value::toXXX functions. Change-Id: I66d622555b2cca4e6aa546745fd0e46373dee919 Reviewed-by: Lars Knoll --- qmljs_value.cpp | 2 +- qmljs_value.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qmljs_value.cpp b/qmljs_value.cpp index 0e4e4f2..ec3ff21 100644 --- a/qmljs_value.cpp +++ b/qmljs_value.cpp @@ -46,7 +46,7 @@ namespace QQmlJS { namespace VM { -int Value::toUInt16(ExecutionContext *ctx) +int Value::toUInt16(ExecutionContext *ctx) const { return __qmljs_to_uint16(*this, ctx); } diff --git a/qmljs_value.h b/qmljs_value.h index b6124c0..5d0e495 100644 --- a/qmljs_value.h +++ b/qmljs_value.h @@ -198,8 +198,8 @@ struct Value static int toInt32(double value); static unsigned int toUInt32(double value); - int toUInt16(ExecutionContext *ctx); - int toInt32(ExecutionContext *ctx); + int toUInt16(ExecutionContext *ctx) const; + int toInt32(ExecutionContext *ctx) const; unsigned int toUInt32(ExecutionContext *ctx) const; Bool toBoolean(ExecutionContext *ctx) const; @@ -343,7 +343,7 @@ inline Value Value::fromObject(Object *o) return v; } -inline int Value::toInt32(ExecutionContext *ctx) +inline int Value::toInt32(ExecutionContext *ctx) const { if (isConvertibleToInt()) return int_32; -- 2.7.4