diff options
author | khlebnikov <khlebnikov@yandex-team.ru> | 2022-02-10 16:50:08 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:08 +0300 |
commit | df35d89845ad252e6db1c6adf84da9b15de0e3b3 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/intrlist.h | |
parent | 6cffcf9a14a1dd07278bd534c7cca706ec2827b3 (diff) | |
download | ydb-df35d89845ad252e6db1c6adf84da9b15de0e3b3.tar.gz |
Restoring authorship annotation for <khlebnikov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/intrlist.h')
-rw-r--r-- | util/generic/intrlist.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/util/generic/intrlist.h b/util/generic/intrlist.h index 53c0838d36..b5d3f2051b 100644 --- a/util/generic/intrlist.h +++ b/util/generic/intrlist.h @@ -6,14 +6,14 @@ #include <iterator> struct TIntrusiveListDefaultTag {}; - + /* * two-way linked list */ -template <class T, class Tag = TIntrusiveListDefaultTag> +template <class T, class Tag = TIntrusiveListDefaultTag> class TIntrusiveListItem { private: - using TListItem = TIntrusiveListItem<T, Tag>; + using TListItem = TIntrusiveListItem<T, Tag>; public: inline TIntrusiveListItem() noexcept @@ -118,10 +118,10 @@ private: TListItem* Prev_; }; -template <class T, class Tag> +template <class T, class Tag> class TIntrusiveList { private: - using TListItem = TIntrusiveListItem<T, Tag>; + using TListItem = TIntrusiveListItem<T, Tag>; template <class TListItem, class TNode> class TIteratorBase { @@ -365,10 +365,10 @@ public: return std::distance(Begin(), End()); } - inline void Remove(TListItem* item) noexcept { - item->Unlink(); - } - + inline void Remove(TListItem* item) noexcept { + item->Unlink(); + } + inline void Clear() noexcept { End_.Unlink(); } @@ -584,14 +584,14 @@ private: TListItem End_; }; -template <class T, class D, class Tag> -class TIntrusiveListWithAutoDelete: public TIntrusiveList<T, Tag> { +template <class T, class D, class Tag> +class TIntrusiveListWithAutoDelete: public TIntrusiveList<T, Tag> { public: - using TIterator = typename TIntrusiveList<T, Tag>::TIterator; - using TConstIterator = typename TIntrusiveList<T, Tag>::TConstIterator; + using TIterator = typename TIntrusiveList<T, Tag>::TIterator; + using TConstIterator = typename TIntrusiveList<T, Tag>::TConstIterator; - using TReverseIterator = typename TIntrusiveList<T, Tag>::TReverseIterator; - using TConstReverseIterator = typename TIntrusiveList<T, Tag>::TConstReverseIterator; + using TReverseIterator = typename TIntrusiveList<T, Tag>::TReverseIterator; + using TConstReverseIterator = typename TIntrusiveList<T, Tag>::TConstReverseIterator; using iterator = TIterator; using const_iterator = TConstIterator; @@ -603,7 +603,7 @@ public: inline TIntrusiveListWithAutoDelete() noexcept = default; inline TIntrusiveListWithAutoDelete(TIntrusiveListWithAutoDelete&& right) noexcept - : TIntrusiveList<T, Tag>(std::move(right)) + : TIntrusiveList<T, Tag>(std::move(right)) { } @@ -612,7 +612,7 @@ public: } TIntrusiveListWithAutoDelete& operator=(TIntrusiveListWithAutoDelete&& rhs) noexcept { - TIntrusiveList<T, Tag>::operator=(std::move(rhs)); + TIntrusiveList<T, Tag>::operator=(std::move(rhs)); return *this; } @@ -624,22 +624,22 @@ public: } inline static void Cut(TIterator begin, TIterator end) noexcept { - TIntrusiveListWithAutoDelete<T, D, Tag> temp; + TIntrusiveListWithAutoDelete<T, D, Tag> temp; Cut(begin, end, temp.End()); } inline static void Cut(TIterator begin, TIterator end, TIterator pasteBefore) noexcept { - TIntrusiveList<T, Tag>::Cut(begin, end, pasteBefore); + TIntrusiveList<T, Tag>::Cut(begin, end, pasteBefore); } }; /* * one-way linked list */ -template <class T, class Tag = TIntrusiveListDefaultTag> +template <class T, class Tag = TIntrusiveListDefaultTag> class TIntrusiveSListItem { private: - using TListItem = TIntrusiveSListItem<T, Tag>; + using TListItem = TIntrusiveSListItem<T, Tag>; public: inline TIntrusiveSListItem() noexcept @@ -678,10 +678,10 @@ private: TListItem* Next_; }; -template <class T, class Tag> +template <class T, class Tag> class TIntrusiveSList { private: - using TListItem = TIntrusiveSListItem<T, Tag>; + using TListItem = TIntrusiveSListItem<T, Tag>; public: template <class TListItem, class TNode> |