diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2015-03-07 14:35:47 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2015-07-09 00:12:37 +0000 |
commit | f35be0bc5afe940bb95695a319176e45fec1f594 (patch) | |
tree | f6e610550a3efbbaea02b177c8fab526416e1515 /src/qml/jsruntime/qv4vme_moth.cpp | |
parent | f558bc48585c69de36151248c969a484a969ebb4 (diff) |
QtQml: Fix const correctness in old style casts
Found with GCC's -Wcast-qual.
Change-Id: Ia0aac2f09e9245339951ffff13c958364a2e9859
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4vme_moth.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index dda5848f0b..390bbf5ee3 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -593,7 +593,7 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code MOTH_END_INSTR(CallGlobalLookup) MOTH_BEGIN_INSTR(SetExceptionHandler) - exceptionHandler = instr.offset ? ((uchar *)&instr.offset) + instr.offset : 0; + exceptionHandler = instr.offset ? ((const uchar *)&instr.offset) + instr.offset : 0; MOTH_END_INSTR(SetExceptionHandler) MOTH_BEGIN_INSTR(CallBuiltinThrow) @@ -727,21 +727,21 @@ QV4::ReturnedValue VME::run(ExecutionEngine *engine, const uchar *code MOTH_END_INSTR(ConstructGlobalLookup) MOTH_BEGIN_INSTR(Jump) - code = ((uchar *)&instr.offset) + instr.offset; + code = ((const uchar *)&instr.offset) + instr.offset; MOTH_END_INSTR(Jump) MOTH_BEGIN_INSTR(JumpEq) bool cond = VALUEPTR(instr.condition)->toBoolean(); TRACE(condition, "%s", cond ? "TRUE" : "FALSE"); if (cond) - code = ((uchar *)&instr.offset) + instr.offset; + code = ((const uchar *)&instr.offset) + instr.offset; MOTH_END_INSTR(JumpEq) MOTH_BEGIN_INSTR(JumpNe) bool cond = VALUEPTR(instr.condition)->toBoolean(); TRACE(condition, "%s", cond ? "TRUE" : "FALSE"); if (!cond) - code = ((uchar *)&instr.offset) + instr.offset; + code = ((const uchar *)&instr.offset) + instr.offset; MOTH_END_INSTR(JumpNe) MOTH_BEGIN_INSTR(UNot) |