diff options
author | spacelord <spacelord@yandex-team.ru> | 2022-02-10 16:48:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:15 +0300 |
commit | a0c6d9ad0cf6b94c527a15da147eb24335281b6d (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/containers/intrusive_rb_tree | |
parent | 16747e4f77455cca4932df21eb76f12cb0a97a5c (diff) | |
download | ydb-a0c6d9ad0cf6b94c527a15da147eb24335281b6d.tar.gz |
Restoring authorship annotation for <spacelord@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/containers/intrusive_rb_tree')
-rw-r--r-- | library/cpp/containers/intrusive_rb_tree/rb_tree.h | 38 | ||||
-rw-r--r-- | library/cpp/containers/intrusive_rb_tree/rb_tree_ut.cpp | 2 |
2 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/containers/intrusive_rb_tree/rb_tree.h b/library/cpp/containers/intrusive_rb_tree/rb_tree.h index 5539d6391b..0259452a14 100644 --- a/library/cpp/containers/intrusive_rb_tree/rb_tree.h +++ b/library/cpp/containers/intrusive_rb_tree/rb_tree.h @@ -3,14 +3,14 @@ #include <util/generic/utility.h> #include <util/generic/yexception.h> -using TRbTreeColorType = bool; +using TRbTreeColorType = bool; #define RBTreeRed false #define RBTreeBlack true struct TRbTreeNodeBase { - using TColorType = TRbTreeColorType; - using TBasePtr = TRbTreeNodeBase*; + using TColorType = TRbTreeColorType; + using TBasePtr = TRbTreeNodeBase*; TColorType Color_; TBasePtr Parent_; @@ -63,7 +63,7 @@ struct TRbTreeBaseIterator; template <class TDummy> class TRbGlobal { public: - using TBasePtr = TRbTreeNodeBase*; + using TBasePtr = TRbTreeNodeBase*; static void Rebalance(TBasePtr x, TBasePtr& root); static TBasePtr RebalanceForErase(TBasePtr z, TBasePtr& root, TBasePtr& leftmost, TBasePtr& rightmost); @@ -76,10 +76,10 @@ public: static void RotateRight(TBasePtr x, TBasePtr& root); }; -using TRbGlobalInst = TRbGlobal<bool>; +using TRbGlobalInst = TRbGlobal<bool>; struct TRbTreeBaseIterator { - using TBasePtr = TRbTreeNodeBase*; + using TBasePtr = TRbTreeNodeBase*; TBasePtr Node_; inline TRbTreeBaseIterator(TBasePtr x = nullptr) noexcept @@ -90,10 +90,10 @@ struct TRbTreeBaseIterator { template <class TValue, class TTraits> struct TRbTreeIterator: public TRbTreeBaseIterator { - using TReference = typename TTraits::TReference; - using TPointer = typename TTraits::TPointer; - using TSelf = TRbTreeIterator<TValue, TTraits>; - using TBasePtr = TRbTreeNodeBase*; + using TReference = typename TTraits::TReference; + using TPointer = typename TTraits::TPointer; + using TSelf = TRbTreeIterator<TValue, TTraits>; + using TBasePtr = TRbTreeNodeBase*; inline TRbTreeIterator() noexcept = default; @@ -161,18 +161,18 @@ class TRbTree { }; struct TNonConstTraits { - using TReference = TValue&; - using TPointer = TValue*; + using TReference = TValue&; + using TPointer = TValue*; }; struct TConstTraits { - using TReference = const TValue&; - using TPointer = const TValue*; + using TReference = const TValue&; + using TPointer = const TValue*; }; - using TNodeBase = TRbTreeNodeBase; - using TBasePtr = TRbTreeNodeBase*; - using TColorType = TRbTreeColorType; + using TNodeBase = TRbTreeNodeBase; + using TBasePtr = TRbTreeNodeBase*; + using TColorType = TRbTreeColorType; public: class TRealNode: public TNodeBase { @@ -206,8 +206,8 @@ public: TRbTree* Tree_; }; - using TIterator = TRbTreeIterator<TValue, TNonConstTraits>; - using TConstIterator = TRbTreeIterator<TValue, TConstTraits>; + using TIterator = TRbTreeIterator<TValue, TNonConstTraits>; + using TConstIterator = TRbTreeIterator<TValue, TConstTraits>; inline TRbTree() noexcept { Init(); diff --git a/library/cpp/containers/intrusive_rb_tree/rb_tree_ut.cpp b/library/cpp/containers/intrusive_rb_tree/rb_tree_ut.cpp index 8eb7cad122..c34ed1fd9b 100644 --- a/library/cpp/containers/intrusive_rb_tree/rb_tree_ut.cpp +++ b/library/cpp/containers/intrusive_rb_tree/rb_tree_ut.cpp @@ -34,7 +34,7 @@ class TRedBlackTreeTest: public TTestBase { int N; }; - using TTree = TRbTree<TNode, TCmp>; + using TTree = TRbTree<TNode, TCmp>; UNIT_TEST_SUITE(TRedBlackTreeTest); UNIT_TEST(TestEmpty) |