aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-06-27 15:21:53 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-06-28 19:19:36 +0000
commit2969c92c82e67beb592542cb34a3cbd65ed2fb16 (patch)
treeec928d63a705502bbf1b66030870c512fd11d58f /src/qml/compiler
parent5c80b29e6d77f0ebc63832473159f5a39babe21b (diff)
Do not access the qle_bitfield internals directly
This make is impossible to make it private. The uses here also set the internal value multiple times as each part of the union shares the internal. Change-Id: I5db5bf6dd930c09b2aa169371b8d989acfcc00e5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4compileddata_p.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index f4ba257cf5..ff0d597b92 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -129,11 +129,12 @@ struct TableIterator
struct Location
{
union {
+ quint32 _dummy;
QJsonPrivate::qle_bitfield<0, 20> line;
QJsonPrivate::qle_bitfield<20, 12> column;
};
- Location() { line.val = 0; column.val = 0; }
+ Location() : _dummy(0) { }
inline bool operator<(const Location &other) const {
return line < other.line ||
@@ -149,11 +150,12 @@ struct RegExp
RegExp_Multiline = 0x04
};
union {
+ quint32 _dummy;
QJsonPrivate::qle_bitfield<0, 4> flags;
QJsonPrivate::qle_bitfield<4, 28> stringIndex;
};
- RegExp() { flags.val = 0; stringIndex.val = 0; }
+ RegExp() : _dummy(0) { }
};
struct Lookup
@@ -167,21 +169,23 @@ struct Lookup
};
union {
+ quint32 _dummy;
QJsonPrivate::qle_bitfield<0, 4> type_and_flags;
QJsonPrivate::qle_bitfield<4, 28> nameIndex;
};
- Lookup() { type_and_flags.val = 0; nameIndex.val = 0; }
+ Lookup() : _dummy(0) { }
};
struct JSClassMember
{
union {
+ quint32 _dummy;
QJsonPrivate::qle_bitfield<0, 31> nameOffset;
QJsonPrivate::qle_bitfield<31, 1> isAccessor;
};
- JSClassMember() { nameOffset = 0; isAccessor = 0; }
+ JSClassMember() : _dummy(0) { }
};
struct JSClass