From 1e96341781fa47f1607e66bf15045ca5682781e5 Mon Sep 17 00:00:00 2001 From: khizmax Date: Sat, 16 Apr 2016 17:02:49 +0300 Subject: [PATCH] Docfix, formatting, minor bugs --- cds/container/bronson_avltree_map_rcu.h | 4 ++-- cds/container/details/ellen_bintree_base.h | 18 +++++++++--------- cds/container/ellen_bintree_set_rcu.h | 2 +- cds/container/impl/bronson_avltree_map_rcu.h | 4 ++-- cds/container/impl/ellen_bintree_set.h | 2 +- cds/intrusive/details/ellen_bintree_base.h | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cds/container/bronson_avltree_map_rcu.h b/cds/container/bronson_avltree_map_rcu.h index 24a6d73e..723fb109 100644 --- a/cds/container/bronson_avltree_map_rcu.h +++ b/cds/container/bronson_avltree_map_rcu.h @@ -437,7 +437,7 @@ namespace cds { namespace container { return base_class::extract_min(); } - /// Extracts minimal key key and corresponding value + /// Extracts minimal key and corresponding value /** Returns \p exempt_ptr to the leftmost item. If the tree is empty, returns empty \p exempt_ptr. @@ -469,7 +469,7 @@ namespace cds { namespace container { return base_class::extract_min( f ); } - /// Extracts minimal key key and corresponding value + /// Extracts minimal key and corresponding value /** This function is a shortcut for the following call: \code diff --git a/cds/container/details/ellen_bintree_base.h b/cds/container/details/ellen_bintree_base.h index 9805c177..073a87a2 100644 --- a/cds/container/details/ellen_bintree_base.h +++ b/cds/container/details/ellen_bintree_base.h @@ -88,14 +88,14 @@ namespace cds { namespace container { /// Copy constructor template - node( Args const&... args) + node( Args const&... args ) : m_Value( args... ) {} /// Move constructor template - node( Args&&... args) - : m_Value( std::forward(args)... ) + node( Args&&... args ) + : m_Value( std::forward( args )... ) {} }; @@ -127,15 +127,15 @@ namespace cds { namespace container { { /// Key extracting functor (only for \p EllenBinTreeSet) /** - You should explicit define a valid functor. - The functor has the following prototype: + This is mandatory functor for \p %EllenBinTreeSet. + It has the following prototype: \code struct key_extractor { void operator ()( Key& dest, T const& src ); }; \endcode It should initialize \p dest key from \p src data. - The functor is used to initialize internal nodes of \p EllenBinTreeSet + The functor is used to initialize internal nodes of \p %EllenBinTreeSet */ typedef opt::none key_extractor; @@ -359,7 +359,7 @@ namespace cds { namespace container { typedef typename cds::opt::details::make_comparator< value_type, original_traits, false >::type key_comparator; - typedef cds::details::Allocator< leaf_node, typename original_traits::allocator> cxx_leaf_node_allocator; + typedef cds::details::Allocator< leaf_node, typename original_traits::allocator> cxx_leaf_node_allocator; struct leaf_deallocator { void operator()( leaf_node * p ) const @@ -370,14 +370,14 @@ namespace cds { namespace container { struct intrusive_traits: public original_traits { - typedef cds::intrusive::ellen_bintree::base_hook< cds::opt::gc< gc > > hook; + typedef cds::intrusive::ellen_bintree::base_hook< cds::opt::gc< gc >> hook; typedef intrusive_key_extractor key_extractor; typedef leaf_deallocator disposer; typedef cds::details::compare_wrapper< leaf_node, key_comparator, value_accessor > compare; }; // Metafunction result - typedef cds::intrusive::EllenBinTree< gc, key_type, leaf_node, intrusive_traits > type; + typedef cds::intrusive::EllenBinTree< gc, key_type, leaf_node, intrusive_traits > type; }; template < class GC, typename Key, typename T, class Traits> diff --git a/cds/container/ellen_bintree_set_rcu.h b/cds/container/ellen_bintree_set_rcu.h index 4ede50a2..2acbe887 100644 --- a/cds/container/ellen_bintree_set_rcu.h +++ b/cds/container/ellen_bintree_set_rcu.h @@ -296,7 +296,7 @@ namespace cds { namespace container { template bool emplace( Args&&... args ) { - scoped_node_ptr sp( cxx_leaf_node_allocator().New( std::forward(args)... )); + scoped_node_ptr sp( cxx_leaf_node_allocator().MoveNew( std::forward(args)... )); if ( base_class::insert( *sp.get() )) { sp.release(); return true; diff --git a/cds/container/impl/bronson_avltree_map_rcu.h b/cds/container/impl/bronson_avltree_map_rcu.h index 1755dcdc..0db75ce8 100644 --- a/cds/container/impl/bronson_avltree_map_rcu.h +++ b/cds/container/impl/bronson_avltree_map_rcu.h @@ -436,7 +436,7 @@ namespace cds { namespace container { return exempt_ptr(do_extract_min( []( key_type const& ) {})); } - /// Extracts minimal key key and corresponding value + /// Extracts minimal key and corresponding value /** Returns \p exempt_ptr to the leftmost item. If the tree is empty, returns empty \p exempt_ptr. @@ -468,7 +468,7 @@ namespace cds { namespace container { return exempt_ptr(do_extract_min( [&f]( key_type const& key ) { f(key); })); } - /// Extracts minimal key key and corresponding value + /// Extracts minimal key and corresponding value /** This function is a shortcut for the following call: \code diff --git a/cds/container/impl/ellen_bintree_set.h b/cds/container/impl/ellen_bintree_set.h index 538e447e..94a29a5d 100644 --- a/cds/container/impl/ellen_bintree_set.h +++ b/cds/container/impl/ellen_bintree_set.h @@ -290,7 +290,7 @@ namespace cds { namespace container { template bool emplace( Args&&... args ) { - scoped_node_ptr sp( cxx_leaf_node_allocator().New( std::forward(args)... )); + scoped_node_ptr sp( cxx_leaf_node_allocator().MoveNew( std::forward(args)... )); if ( base_class::insert( *sp.get() )) { sp.release(); return true; diff --git a/cds/intrusive/details/ellen_bintree_base.h b/cds/intrusive/details/ellen_bintree_base.h index 6d29a2d7..3b04a962 100644 --- a/cds/intrusive/details/ellen_bintree_base.h +++ b/cds/intrusive/details/ellen_bintree_base.h @@ -96,7 +96,7 @@ namespace cds { namespace intrusive { delete_info dInfo; }; - update_desc * pNextRetire ; // for local retired list (RCU) + update_desc * pNextRetire; // for local retired list (RCU) update_desc() : pNextRetire( nullptr ) -- 2.34.1