diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-03-14 15:44:16 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-03-17 08:35:58 +0000 |
commit | 53547ee6b3a828969a3e2283a6ea5b3141f065d5 (patch) | |
tree | e35ad3e7ced5ef121964b5860ef03d66b31042c7 /src/qml/compiler/qv4compileddata.cpp | |
parent | 94b52fd93b8ec31981b097af0b29f39b6b294ce7 (diff) |
Clean up qOffsetOf usage
For offsets from CompiledData::Unit we can use C++11's offsetof macro as
the class has standard layout.
Change-Id: I7377294679a9cd79c35486fa34355933271f9251
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index cddc0dd8aa..4688f936cc 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -776,7 +776,7 @@ void Unit::generateChecksum() #ifndef V4_BOOTSTRAP QCryptographicHash hash(QCryptographicHash::Md5); - const int checksummableDataOffset = qOffsetOf(QV4::CompiledData::Unit, md5Checksum) + sizeof(md5Checksum); + const int checksummableDataOffset = offsetof(QV4::CompiledData::Unit, md5Checksum) + sizeof(md5Checksum); const char *dataPtr = reinterpret_cast<const char *>(this) + checksummableDataOffset; hash.addData(dataPtr, unitSize - checksummableDataOffset); |