diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-05-28 15:57:26 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-05-28 19:15:55 +0000 |
commit | 04ad4f2d9c8d5c93c33f873a3b8a5a86b7489634 (patch) | |
tree | 28717542421a0ca4490fb6cf883bc0a6523fedf8 /src/qml/compiler/qv4compileddata_p.h | |
parent | ef75c3017e75135fb3454f67c0778e9a89165cd2 (diff) |
Minor cleanup with bytecode pointer types
Even though we consider the bytecode to be a sequence of unsigned bytes,
we store it as const char * (so unsigned except on arm) everywhere,
because that makes it convenient to work with QByteArray's constData().
By using const char * consistently we can get rid of at least one more
reinterpret_cast.
Change-Id: I7a803e4201381c39eec2fdc6497d9bf36a1c2b6b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index 239c12acfd..bd19c1e1a8 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -299,7 +299,7 @@ struct Function const quint32_le *formalsEnd() const { return formalsTable() + nFormals; } // --- - const uchar *code() const { return reinterpret_cast<const uchar *>(this) + codeOffset; } + const char *code() const { return reinterpret_cast<const char *>(this) + codeOffset; } inline bool hasQmlDependencies() const { return nDependingIdObjects > 0 || nDependingContextProperties > 0 || nDependingScopeProperties > 0; } |