diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-19 22:44:14 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-20 05:55:25 +0200 |
commit | 3ef88c539ff63d9cb33af71f44653b328f36d0db (patch) | |
tree | 207bd2f78b4d9614bd10f1949d27d9c711786d81 /src/qml/compiler/qv4isel_moth_p.h | |
parent | 8ed38c70fd29680f7981d9d23581d46cf32139d0 (diff) |
Use a handwritten offsetof macro
clang complains about our usage of offsetof(). What we do is not
strictly c++98 compliant, but compliant with c++11. So replace
the default offsetof with a handwritten macro to shut up clang
until we can switch to c++11 mode for all compilers.
Change-Id: Id724adb323ba9724ad5d7d9e0dba5a73b51af24f
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth_p.h')
-rw-r--r-- | src/qml/compiler/qv4isel_moth_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4isel_moth_p.h b/src/qml/compiler/qv4isel_moth_p.h index c4b298eaac..df6095db5b 100644 --- a/src/qml/compiler/qv4isel_moth_p.h +++ b/src/qml/compiler/qv4isel_moth_p.h @@ -157,7 +157,7 @@ private: int scratchTempIndex() const { return _function->tempCount; } int callDataStart() const { return scratchTempIndex() + 1; } - int outgoingArgumentTempStart() const { return callDataStart() + offsetof(QV4::CallData, args)/sizeof(QV4::Value); } + int outgoingArgumentTempStart() const { return callDataStart() + qOffsetOf(QV4::CallData, args)/sizeof(QV4::Value); } int frameSize() const { return outgoingArgumentTempStart() + _function->maxNumberOfArguments; } template <int Instr> |