diff options
| author | Méven Car <[email protected]> | 2026-01-22 16:04:09 +0100 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-01-22 16:14:16 +0100 |
| commit | 174bc684603326de15e933b3bb24ffb739f3291e (patch) | |
| tree | fdc03ec185e718265e17d007b321c5b6c7c7a9be /src/kitemviews/kitemset.h | |
| parent | 843d10ae2ab6a7f2c6f69b63fa278fdd6162254c (diff) | |
clang-tidy: use default for trivial constructor
Diffstat (limited to 'src/kitemviews/kitemset.h')
| -rw-r--r-- | src/kitemviews/kitemset.h | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/src/kitemviews/kitemset.h b/src/kitemviews/kitemset.h index d3562aca4..8dd134ec6 100644 --- a/src/kitemviews/kitemset.h +++ b/src/kitemviews/kitemset.h @@ -57,18 +57,9 @@ public: } public: - iterator(const iterator &other) - : m_rangeIt(other.m_rangeIt) - , m_offset(other.m_offset) - { - } + iterator(const iterator &other) = default; - iterator &operator=(const iterator &other) - { - m_rangeIt = other.m_rangeIt; - m_offset = other.m_offset; - return *this; - } + iterator &operator=(const iterator &other) = default; ~iterator() = default; @@ -142,11 +133,7 @@ public: } public: - const_iterator(const const_iterator &other) - : m_rangeIt(other.m_rangeIt) - , m_offset(other.m_offset) - { - } + const_iterator(const const_iterator &other) = default; explicit const_iterator(const iterator &other) : m_rangeIt(other.m_rangeIt) @@ -154,12 +141,7 @@ public: { } - const_iterator &operator=(const const_iterator &other) - { - m_rangeIt = other.m_rangeIt; - m_offset = other.m_offset; - return *this; - } + const_iterator &operator=(const const_iterator &other) = default; ~const_iterator() = default; @@ -352,18 +334,11 @@ inline KItemSet::KItemSet() { } -inline KItemSet::KItemSet(const KItemSet &other) - : m_itemRanges(other.m_itemRanges) -{ -} +inline KItemSet::KItemSet(const KItemSet &other) = default; inline KItemSet::~KItemSet() = default; -inline KItemSet &KItemSet::operator=(const KItemSet &other) -{ - m_itemRanges = other.m_itemRanges; - return *this; -} +inline KItemSet &KItemSet::operator=(const KItemSet &other) = default; inline int KItemSet::count() const { |
