diff options
| author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-20 12:19:21 +0200 |
|---|---|---|
| committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-21 08:26:38 +0200 |
| commit | 05685708b78b43713fbfc59ff78160340a38e2d1 (patch) | |
| tree | ec5ee4bc4fdff1e176cd0698644bc893950054c2 /src/corelib/tools/qbitarray.h | |
| parent | 9aba868571e7448ea79229a31d18bfd3e69813f8 (diff) | |
Whitespace cleanup in corelib/tools
Change-Id: Ibe796c398a8e5488b7203abb07aa54740744f1ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qbitarray.h')
| -rw-r--r-- | src/corelib/tools/qbitarray.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/corelib/tools/qbitarray.h b/src/corelib/tools/qbitarray.h index 8a1e229364c..75d680dc84a 100644 --- a/src/corelib/tools/qbitarray.h +++ b/src/corelib/tools/qbitarray.h @@ -44,7 +44,6 @@ QT_BEGIN_NAMESPACE - class QBitRef; class Q_CORE_EXPORT QBitArray { @@ -88,13 +87,13 @@ public: QBitRef operator[](qsizetype i); bool operator[](qsizetype i) const; - QBitArray& operator&=(const QBitArray &); - QBitArray& operator|=(const QBitArray &); - QBitArray& operator^=(const QBitArray &); - QBitArray operator~() const; + QBitArray &operator&=(const QBitArray &); + QBitArray &operator|=(const QBitArray &); + QBitArray &operator^=(const QBitArray &); + QBitArray operator~() const; - inline bool operator==(const QBitArray& other) const { return d == other.d; } - inline bool operator!=(const QBitArray& other) const { return d != other.d; } + inline bool operator==(const QBitArray &other) const { return d == other.d; } + inline bool operator!=(const QBitArray &other) const { return d != other.d; } inline bool fill(bool val, qsizetype size = -1); void fill(bool val, qsizetype first, qsizetype last); @@ -144,15 +143,16 @@ inline bool QBitArray::at(qsizetype i) const { return testBit(i); } class Q_CORE_EXPORT QBitRef { private: - QBitArray& a; + QBitArray &a; qsizetype i; - inline QBitRef(QBitArray& array, qsizetype idx) : a(array), i(idx) {} + inline QBitRef(QBitArray &array, qsizetype idx) : a(array), i(idx) { } friend class QBitArray; + public: inline operator bool() const { return a.testBit(i); } inline bool operator!() const { return !a.testBit(i); } - QBitRef& operator=(const QBitRef& val) { a.setBit(i, val); return *this; } - QBitRef& operator=(bool val) { a.setBit(i, val); return *this; } + QBitRef &operator=(const QBitRef &val) { a.setBit(i, val); return *this; } + QBitRef &operator=(bool val) { a.setBit(i, val); return *this; } }; inline QBitRef QBitArray::operator[](qsizetype i) |
