diff options
| author | Serg Podtynnyi <[email protected]> | 2023-02-04 00:14:53 +0700 |
|---|---|---|
| committer | Serg Podtynnyi <[email protected]> | 2023-02-05 12:45:38 +0700 |
| commit | 38c34eeca315c7be58e65d4d3fb72aaf7b866719 (patch) | |
| tree | 886e53f20c9c43edc3eb7fe04789716a9bc98ebe /src/kitemviews/kitemset.cpp | |
| parent | ffff8af851e3a386c44438337779d0ce7ca98a61 (diff) | |
Add clang-format and format code as in Frameworks
Diffstat (limited to 'src/kitemviews/kitemset.cpp')
| -rw-r--r-- | src/kitemviews/kitemset.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/kitemviews/kitemset.cpp b/src/kitemviews/kitemset.cpp index 1200bc7a9..b3a9909af 100644 --- a/src/kitemviews/kitemset.cpp +++ b/src/kitemviews/kitemset.cpp @@ -6,7 +6,6 @@ #include "kitemset.h" - KItemSet::iterator KItemSet::insert(int i) { if (m_itemRanges.empty()) { @@ -128,7 +127,7 @@ KItemSet::iterator KItemSet::erase(iterator it) } } -KItemSet KItemSet::operator+(const KItemSet& other) const +KItemSet KItemSet::operator+(const KItemSet &other) const { KItemSet sum; @@ -170,8 +169,7 @@ KItemSet KItemSet::operator+(const KItemSet& other) const count = qMax(count, it2->index + it2->count - index); ++it2; } - } while ((it1 != end1 && it1->index <= index + count) - || (it2 != end2 && it2->index <= index + count)); + } while ((it1 != end1 && it1->index <= index + count) || (it2 != end2 && it2->index <= index + count)); sum.m_itemRanges.append(KItemRange(index, count)); } @@ -180,7 +178,7 @@ KItemSet KItemSet::operator+(const KItemSet& other) const return sum; } -KItemSet KItemSet::operator^(const KItemSet& other) const +KItemSet KItemSet::operator^(const KItemSet &other) const { // We are looking for all ints which are either in *this or in other, // but not in both. @@ -197,14 +195,14 @@ KItemSet KItemSet::operator^(const KItemSet& other) const const QVector<int>::iterator end = rangeBoundaries.end(); QVector<int>::iterator it = begin; - for (const KItemRange& range : qAsConst(m_itemRanges)) { + for (const KItemRange &range : qAsConst(m_itemRanges)) { *it++ = range.index; *it++ = range.index + range.count; } const QVector<int>::iterator middle = it; - for (const KItemRange& range : qAsConst(other.m_itemRanges)) { + for (const KItemRange &range : qAsConst(other.m_itemRanges)) { *it++ = range.index; *it++ = range.index + range.count; } |
