From 46d9829c1e2543773c743957866679f97823ffc1 Mon Sep 17 00:00:00 2001 From: khizmax Date: Sat, 29 Oct 2016 17:39:33 +0300 Subject: [PATCH] Removed redundant spaces --- cds/container/details/make_lazy_kvlist.h | 2 +- cds/container/lazy_kvlist_nogc.h | 6 +++--- cds/container/michael_kvlist_nogc.h | 4 ++-- cds/container/michael_list_nogc.h | 2 +- cds/container/michael_map.h | 2 +- cds/container/michael_set.h | 2 +- cds/container/michael_set_nogc.h | 2 +- cds/container/michael_set_rcu.h | 2 +- cds/container/rwqueue.h | 2 +- cds/container/skip_list_map_nogc.h | 2 +- cds/container/striped_map.h | 2 +- cds/container/striped_map/std_hash_map.h | 2 +- cds/container/striped_map/std_map.h | 2 +- cds/container/striped_set/adapter.h | 2 +- cds/gc/details/dhp.h | 2 +- cds/intrusive/impl/ellen_bintree.h | 6 +++--- cds/intrusive/impl/iterable_list.h | 6 +++--- cds/intrusive/michael_list_rcu.h | 8 ++++---- cds/intrusive/michael_set_nogc.h | 2 +- cds/intrusive/michael_set_rcu.h | 2 +- cds/intrusive/striped_set/boost_unordered_set.h | 2 +- cds/memory/michael/allocator.h | 14 +++++++------- cds/sync/spinlock.h | 6 +++--- test/stress/map/delodd/map_delodd.cpp | 2 +- test/stress/map/delodd/map_delodd.h | 2 +- test/stress/map/find_int/map_find_int.cpp | 2 +- test/stress/map/find_string/map_find_string.cpp | 2 +- test/stress/map/map_type_std.h | 4 ++-- test/stress/queue/intrusive_push_pop.cpp | 2 +- test/stress/set/delodd/set_delodd.cpp | 2 +- .../intrusive-set/test_intrusive_feldman_hashset.h | 2 +- .../test_intrusive_feldman_hashset_hp.h | 2 +- .../test_intrusive_feldman_hashset_rcu.h | 2 +- .../test_intrusive_michael_iterable.h | 6 +++--- .../test_intrusive_michael_iterable_hp.h | 2 +- test/unit/intrusive-set/test_intrusive_set.h | 6 +++--- test/unit/intrusive-set/test_intrusive_set_hp.h | 2 +- test/unit/intrusive-set/test_intrusive_set_rcu.h | 2 +- .../test_intrusive_split_iterable_set.h | 6 +++--- .../test_intrusive_split_iterable_set_hp.h | 2 +- test/unit/map/test_feldman_hashmap.h | 12 ++++++------ test/unit/pqueue/mspqueue.cpp | 2 +- test/unit/queue/test_bounded_queue.h | 2 +- test/unit/queue/test_generic_queue.h | 2 +- test/unit/queue/test_segmented_queue.h | 2 +- test/unit/set/test_feldman_hashset.h | 12 ++++++------ test/unit/set/test_feldman_hashset_hp.h | 2 +- test/unit/set/test_feldman_hashset_rcu.h | 2 +- test/unit/set/test_michael_iterable.h | 8 ++++---- test/unit/set/test_michael_iterable_hp.h | 2 +- test/unit/set/test_ordered_set_hp.h | 2 +- test/unit/set/test_set.h | 8 ++++---- test/unit/set/test_set_hp.h | 2 +- test/unit/set/test_set_nogc.h | 2 +- test/unit/set/test_set_rcu.h | 2 +- test/unit/set/test_skiplist_rcu.h | 2 +- test/unit/set/test_split_iterable.h | 8 ++++---- test/unit/set/test_split_iterable_hp.h | 2 +- test/unit/striped-set/test_intrusive_set.h | 6 +++--- test/unit/striped-set/test_set.h | 8 ++++---- test/unit/striped-set/test_striped_set.h | 14 +++++++------- test/unit/tree/test_intrusive_tree.h | 6 +++--- test/unit/tree/test_intrusive_tree_hp.h | 2 +- test/unit/tree/test_intrusive_tree_rcu.h | 2 +- test/unit/tree/test_tree_set.h | 8 ++++---- test/unit/tree/test_tree_set_hp.h | 2 +- test/unit/tree/test_tree_set_rcu.h | 2 +- 67 files changed, 127 insertions(+), 127 deletions(-) diff --git a/cds/container/details/make_lazy_kvlist.h b/cds/container/details/make_lazy_kvlist.h index dbe53f2a..bc7d109f 100644 --- a/cds/container/details/make_lazy_kvlist.h +++ b/cds/container/details/make_lazy_kvlist.h @@ -87,7 +87,7 @@ namespace cds { namespace container { template node_type( Ky&& key, Args&&... args ) - : m_Data( key_type( std::forward( key )), std::move( mapped_type( std::forward( args )... )) ) + : m_Data( key_type( std::forward( key )), std::move( mapped_type( std::forward( args )... ))) {} }; diff --git a/cds/container/lazy_kvlist_nogc.h b/cds/container/lazy_kvlist_nogc.h index e123b8d8..6e2b2fcb 100644 --- a/cds/container/lazy_kvlist_nogc.h +++ b/cds/container/lazy_kvlist_nogc.h @@ -475,7 +475,7 @@ namespace cds { namespace container { template iterator contains( Q const& key ) { - return node_to_iterator( find_at( head(), key, intrusive_key_comparator()) ); + return node_to_iterator( find_at( head(), key, intrusive_key_comparator())); } //@cond template @@ -496,7 +496,7 @@ namespace cds { namespace container { typename std::enable_if::type contains( Q const& key, Less pred ) { CDS_UNUSED( pred ); - return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type()) ); + return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type())); } //@cond template @@ -516,7 +516,7 @@ namespace cds { namespace container { typename std::enable_if::type contains( Q const& key, Equal equal ) { CDS_UNUSED( equal ); - return node_to_iterator( find_at( head(), key, typename maker::template equal_to_wrapper::type()) ); + return node_to_iterator( find_at( head(), key, typename maker::template equal_to_wrapper::type())); } //@cond template diff --git a/cds/container/michael_kvlist_nogc.h b/cds/container/michael_kvlist_nogc.h index 43c3e1f1..e43c87c1 100644 --- a/cds/container/michael_kvlist_nogc.h +++ b/cds/container/michael_kvlist_nogc.h @@ -446,7 +446,7 @@ namespace cds { namespace container { template iterator contains( Q const& key ) { - return node_to_iterator( find_at( head(), key, intrusive_key_comparator()) ); + return node_to_iterator( find_at( head(), key, intrusive_key_comparator())); } //@cond template @@ -467,7 +467,7 @@ namespace cds { namespace container { iterator contains( Q const& key, Less pred ) { CDS_UNUSED( pred ); - return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type()) ); + return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type())); } //@cond template diff --git a/cds/container/michael_list_nogc.h b/cds/container/michael_list_nogc.h index 277560b2..a3b881b2 100644 --- a/cds/container/michael_list_nogc.h +++ b/cds/container/michael_list_nogc.h @@ -369,7 +369,7 @@ namespace cds { namespace container { iterator contains( Q const& key, Less pred ) { CDS_UNUSED( pred ); - return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type()) ); + return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type())); } //@cond template diff --git a/cds/container/michael_map.h b/cds/container/michael_map.h index 71287e4d..7ba149e2 100644 --- a/cds/container/michael_map.h +++ b/cds/container/michael_map.h @@ -402,7 +402,7 @@ namespace cds { namespace container { size_t nLoadFactor ///< load factor: estimation of max number of items in the bucket ) : m_nHashBitmask( michael_map::details::init_hash_bitmask( nMaxItemCount, nLoadFactor )) - , m_Buckets( bucket_table_allocator().allocate( bucket_count()) ) + , m_Buckets( bucket_table_allocator().allocate( bucket_count())) { for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it ) construct_bucket( it ); diff --git a/cds/container/michael_set.h b/cds/container/michael_set.h index 81823a23..e2aa8c3a 100644 --- a/cds/container/michael_set.h +++ b/cds/container/michael_set.h @@ -332,7 +332,7 @@ namespace cds { namespace container { size_t nMaxItemCount, ///< estimation of max item count in the hash set size_t nLoadFactor ///< load factor: estimation of max number of items in the bucket ) : m_nHashBitmask( michael_set::details::init_hash_bitmask( nMaxItemCount, nLoadFactor )) - , m_Buckets( bucket_table_allocator().allocate( bucket_count()) ) + , m_Buckets( bucket_table_allocator().allocate( bucket_count())) { for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it ) construct_bucket( it ); diff --git a/cds/container/michael_set_nogc.h b/cds/container/michael_set_nogc.h index a921ff43..9854ac07 100644 --- a/cds/container/michael_set_nogc.h +++ b/cds/container/michael_set_nogc.h @@ -225,7 +225,7 @@ namespace cds { namespace container { size_t nMaxItemCount, ///< estimation of max item count in the hash set size_t nLoadFactor ///< load factor: estimation of max number of items in the bucket ) : m_nHashBitmask( michael_set::details::init_hash_bitmask( nMaxItemCount, nLoadFactor )) - , m_Buckets( bucket_table_allocator().allocate( bucket_count()) ) + , m_Buckets( bucket_table_allocator().allocate( bucket_count())) { for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it ) construct_bucket( it ); diff --git a/cds/container/michael_set_rcu.h b/cds/container/michael_set_rcu.h index 9733f4c9..d2e47bcc 100644 --- a/cds/container/michael_set_rcu.h +++ b/cds/container/michael_set_rcu.h @@ -302,7 +302,7 @@ namespace cds { namespace container { size_t nMaxItemCount, ///< estimation of max item count in the hash set size_t nLoadFactor ///< load factor: estimation of max number of items in the bucket ) : m_nHashBitmask( michael_set::details::init_hash_bitmask( nMaxItemCount, nLoadFactor )) - , m_Buckets( bucket_table_allocator().allocate( bucket_count()) ) + , m_Buckets( bucket_table_allocator().allocate( bucket_count())) { for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it ) construct_bucket( it ); diff --git a/cds/container/rwqueue.h b/cds/container/rwqueue.h index 028a08b7..ffd6adff 100644 --- a/cds/container/rwqueue.h +++ b/cds/container/rwqueue.h @@ -256,7 +256,7 @@ namespace cds { namespace container { bool enqueue( value_type&& data ) { scoped_node_ptr p( alloc_node_move( std::move( data ))); - if ( enqueue_node( p.get()) ) { + if ( enqueue_node( p.get())) { p.release(); return true; } diff --git a/cds/container/skip_list_map_nogc.h b/cds/container/skip_list_map_nogc.h index 388cf46b..0740bef1 100644 --- a/cds/container/skip_list_map_nogc.h +++ b/cds/container/skip_list_map_nogc.h @@ -196,7 +196,7 @@ namespace cds { namespace container { iterator insert( K const& key ) { //TODO: pass arguments by reference (make_pair makes copy) - return base_class::insert( std::make_pair( key_type( key ), mapped_type()) ); + return base_class::insert( std::make_pair( key_type( key ), mapped_type())); } /// Inserts new node diff --git a/cds/container/striped_map.h b/cds/container/striped_map.h index 46ecd895..17e6462e 100644 --- a/cds/container/striped_map.h +++ b/cds/container/striped_map.h @@ -378,7 +378,7 @@ namespace cds { namespace container { { std::swap( map.insert( - std::map::value_type( itWhat->first, T()) ).first->second + std::map::value_type( itWhat->first, T())).first->second , itWhat->second )); } diff --git a/cds/container/striped_map/std_hash_map.h b/cds/container/striped_map/std_hash_map.h index 3f07addc..884083cd 100644 --- a/cds/container/striped_map/std_hash_map.h +++ b/cds/container/striped_map/std_hash_map.h @@ -149,7 +149,7 @@ namespace cds { namespace intrusive { namespace striped_set { std::pair update( const Q& key, Func func, bool bAllowInsert ) { if ( bAllowInsert ) { - std::pair res = m_Map.insert( value_type( key_type( key ), mapped_type()) ); + std::pair res = m_Map.insert( value_type( key_type( key ), mapped_type())); func( res.second, const_cast(*res.first)); return std::make_pair( true, res.second ); } diff --git a/cds/container/striped_map/std_map.h b/cds/container/striped_map/std_map.h index 9eeca8c0..f42e788c 100644 --- a/cds/container/striped_map/std_map.h +++ b/cds/container/striped_map/std_map.h @@ -132,7 +132,7 @@ namespace cds { namespace intrusive { namespace striped_set { template bool insert( const Q& key, Func f ) { - std::pair res = m_Map.insert( value_type( key_type( key ), mapped_type()) ); + std::pair res = m_Map.insert( value_type( key_type( key ), mapped_type())); if ( res.second ) f( *res.first ); return res.second; diff --git a/cds/container/striped_set/adapter.h b/cds/container/striped_set/adapter.h index 26faff5b..03a5cb48 100644 --- a/cds/container/striped_set/adapter.h +++ b/cds/container/striped_set/adapter.h @@ -452,7 +452,7 @@ namespace cds { namespace container { template bool insert( const Q& key, Func f ) { - std::pair res = m_Map.insert( value_type( key_type( key ), mapped_type()) ); + std::pair res = m_Map.insert( value_type( key_type( key ), mapped_type())); if ( res.second ) f( *res.first ); return res.second; diff --git a/cds/gc/details/dhp.h b/cds/gc/details/dhp.h index 92747657..5f03cc8f 100644 --- a/cds/gc/details/dhp.h +++ b/cds/gc/details/dhp.h @@ -670,7 +670,7 @@ namespace cds { namespace gc { template void retirePtr( T * p, void (* pFunc)(T *)) { - retirePtr( retired_ptr( reinterpret_cast( p ), reinterpret_cast( pFunc )) ); + retirePtr( retired_ptr( reinterpret_cast( p ), reinterpret_cast( pFunc ))); } /// Places retired pointer \p into thread's array of retired pointer for deferred reclamation diff --git a/cds/intrusive/impl/ellen_bintree.h b/cds/intrusive/impl/ellen_bintree.h index 0321fbb9..27c513fa 100644 --- a/cds/intrusive/impl/ellen_bintree.h +++ b/cds/intrusive/impl/ellen_bintree.h @@ -851,7 +851,7 @@ namespace cds { namespace intrusive { assert( pLeaf->is_leaf()); pGrandParent->m_pLeft.store( pParent->m_pRight.load( memory_model::memory_order_relaxed ), memory_model::memory_order_relaxed ); - free_leaf_node( node_traits::to_value_ptr( static_cast( pLeaf )) ); + free_leaf_node( node_traits::to_value_ptr( static_cast( pLeaf ))); free_internal_node( pParent ); } } @@ -1555,7 +1555,7 @@ namespace cds { namespace intrusive { guarded_ptr get_( Q const& val ) const { search_result res; - if ( search( res, val, node_compare()) ) { + if ( search( res, val, node_compare())) { assert( res.pLeaf ); m_Stat.onFindSuccess(); return guarded_ptr( res.guards.release( search_result::Guard_Leaf )); @@ -1578,7 +1578,7 @@ namespace cds { namespace intrusive { > compare_functor; search_result res; - if ( search( res, val, compare_functor()) ) { + if ( search( res, val, compare_functor())) { assert( res.pLeaf ); m_Stat.onFindSuccess(); return guarded_ptr( res.guards.release( search_result::Guard_Leaf )); diff --git a/cds/intrusive/impl/iterable_list.h b/cds/intrusive/impl/iterable_list.h index fa33dda7..3cb3fd84 100644 --- a/cds/intrusive/impl/iterable_list.h +++ b/cds/intrusive/impl/iterable_list.h @@ -847,7 +847,7 @@ namespace cds { namespace intrusive { insert_position pos; while ( true ) { - if ( inserting_search( pHead, *pNode->data.load(memory_model::memory_order_relaxed).ptr(), pos, key_comparator()) ) { + if ( inserting_search( pHead, *pNode->data.load(memory_model::memory_order_relaxed).ptr(), pos, key_comparator())) { m_Stat.onInsertFailed(); return false; } @@ -891,7 +891,7 @@ namespace cds { namespace intrusive { guard.assign( &val ); while ( true ) { - if ( inserting_search( pHead, val, pos, key_comparator()) ) { + if ( inserting_search( pHead, val, pos, key_comparator())) { m_Stat.onInsertFailed(); return false; } @@ -916,7 +916,7 @@ namespace cds { namespace intrusive { guard.assign( &val ); while ( true ) { - if ( inserting_search( pHead, val, pos, key_comparator()) ) { + if ( inserting_search( pHead, val, pos, key_comparator())) { // try to replace pCur->data with val assert( pos.pFound != nullptr ); assert( key_comparator()(*pos.pFound, val) == 0 ); diff --git a/cds/intrusive/michael_list_rcu.h b/cds/intrusive/michael_list_rcu.h index 3f3422da..0ed92529 100644 --- a/cds/intrusive/michael_list_rcu.h +++ b/cds/intrusive/michael_list_rcu.h @@ -875,7 +875,7 @@ namespace cds { namespace intrusive { marked_node_ptr p( pos.pCur ); pNode->m_pNext.store( p, memory_model::memory_order_release ); - if ( cds_likely( pos.pPrev->compare_exchange_strong( p, marked_node_ptr( pNode ), memory_model::memory_order_release, atomics::memory_order_relaxed )) ) + if ( cds_likely( pos.pPrev->compare_exchange_strong( p, marked_node_ptr( pNode ), memory_model::memory_order_release, atomics::memory_order_relaxed ))) return true; pNode->m_pNext.store( marked_node_ptr(), memory_model::memory_order_relaxed ); @@ -897,11 +897,11 @@ namespace cds { namespace intrusive { // Mark the node (logical deletion) marked_node_ptr next( pos.pNext, 0 ); - if ( cds_likely( pos.pCur->m_pNext.compare_exchange_strong( next, next | nMask, memory_model::memory_order_release, atomics::memory_order_relaxed )) ) { + if ( cds_likely( pos.pCur->m_pNext.compare_exchange_strong( next, next | nMask, memory_model::memory_order_release, atomics::memory_order_relaxed ))) { // Try physical removal - fast path marked_node_ptr cur( pos.pCur ); - if ( cds_likely( pos.pPrev->compare_exchange_strong( cur, marked_node_ptr( pos.pNext ), memory_model::memory_order_acquire, atomics::memory_order_relaxed )) ) { + if ( cds_likely( pos.pPrev->compare_exchange_strong( cur, marked_node_ptr( pos.pNext ), memory_model::memory_order_acquire, atomics::memory_order_relaxed ))) { if ( nMask == erase_mask ) link_to_remove_chain( pos, pos.pCur ); } @@ -1243,7 +1243,7 @@ namespace cds { namespace intrusive { assert( gc::is_locked()); while ( true ) { - if ( search( pos.refHead, val, pos, key_comparator()) ) { + if ( search( pos.refHead, val, pos, key_comparator())) { assert( key_comparator()( val, *node_traits::to_value_ptr( *pos.pCur )) == 0 ); func( false, *node_traits::to_value_ptr( *pos.pCur ), val ); diff --git a/cds/intrusive/michael_set_nogc.h b/cds/intrusive/michael_set_nogc.h index 9aeb8468..bea9ee56 100644 --- a/cds/intrusive/michael_set_nogc.h +++ b/cds/intrusive/michael_set_nogc.h @@ -225,7 +225,7 @@ namespace cds { namespace intrusive { size_t nMaxItemCount, ///< estimation of max item count in the hash set size_t nLoadFactor ///< load factor: estimation of max number of items in the bucket ) : m_nHashBitmask( michael_set::details::init_hash_bitmask( nMaxItemCount, nLoadFactor )) - , m_Buckets( bucket_table_allocator().allocate( bucket_count()) ) + , m_Buckets( bucket_table_allocator().allocate( bucket_count())) { for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it ) construct_bucket( it ); diff --git a/cds/intrusive/michael_set_rcu.h b/cds/intrusive/michael_set_rcu.h index ab80e74e..bbf53cc1 100644 --- a/cds/intrusive/michael_set_rcu.h +++ b/cds/intrusive/michael_set_rcu.h @@ -263,7 +263,7 @@ namespace cds { namespace intrusive { size_t nMaxItemCount, ///< estimation of max item count in the hash set size_t nLoadFactor ///< load factor: average size of the bucket ) : m_nHashBitmask( michael_set::details::init_hash_bitmask( nMaxItemCount, nLoadFactor )) - , m_Buckets( bucket_table_allocator().allocate( bucket_count()) ) + , m_Buckets( bucket_table_allocator().allocate( bucket_count())) { for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it ) construct_bucket( it ); diff --git a/cds/intrusive/striped_set/boost_unordered_set.h b/cds/intrusive/striped_set/boost_unordered_set.h index f612b372..5ff616d5 100644 --- a/cds/intrusive/striped_set/boost_unordered_set.h +++ b/cds/intrusive/striped_set/boost_unordered_set.h @@ -93,7 +93,7 @@ namespace cds { namespace intrusive { namespace striped_set { public: adapted_container() - : m_Set( typename container_type::bucket_traits( m_Buckets.buffer(), m_Buckets.capacity()) ) + : m_Set( typename container_type::bucket_traits( m_Buckets.buffer(), m_Buckets.capacity())) {} container_type& base_container() diff --git a/cds/memory/michael/allocator.h b/cds/memory/michael/allocator.h index b7cea674..4ef0f6d8 100644 --- a/cds/memory/michael/allocator.h +++ b/cds/memory/michael/allocator.h @@ -352,7 +352,7 @@ namespace michael { /// Push superblock descriptor to free-list void push( T * pDesc ) { - assert( base_class::node_algorithms::inited( static_cast(pDesc)) ); + assert( base_class::node_algorithms::inited( static_cast(pDesc))); auto_lock al(m_access); base_class::push_back( *pDesc ); } @@ -365,7 +365,7 @@ namespace michael { return nullptr; T& rDesc = base_class::front(); base_class::pop_front(); - assert( base_class::node_algorithms::inited( static_cast(&rDesc)) ); + assert( base_class::node_algorithms::inited( static_cast(&rDesc))); return &rDesc; } @@ -407,7 +407,7 @@ namespace michael { void push( T * pDesc ) { auto_lock al( m_access ); - assert( base_class::node_algorithms::inited( static_cast(pDesc)) ); + assert( base_class::node_algorithms::inited( static_cast(pDesc))); base_class::push_back( *pDesc ); } @@ -419,7 +419,7 @@ namespace michael { return nullptr; T& rDesc = base_class::front(); base_class::pop_front(); - assert( base_class::node_algorithms::inited( static_cast(&rDesc)) ); + assert( base_class::node_algorithms::inited( static_cast(&rDesc))); return &rDesc; } @@ -429,7 +429,7 @@ namespace michael { assert(pDesc != nullptr); auto_lock al( m_access ); // !inited(pDesc) is equal to "pDesc is being linked to partial list" - if ( !base_class::node_algorithms::inited( static_cast(pDesc)) ) { + if ( !base_class::node_algorithms::inited( static_cast(pDesc))) { base_class::erase( base_class::iterator_to( *pDesc )); return true; } @@ -1146,7 +1146,7 @@ namespace michael { } while ( !pPartial.compare_exchange_weak( pDesc, nullptr, atomics::memory_order_release, atomics::memory_order_relaxed )); //assert( pDesc == nullptr || free_desc_list::node_algorithms::inited( static_cast(pDesc))); - //assert( pDesc == nullptr || partial_desc_list::node_algorithms::inited( static_cast(pDesc)) ); + //assert( pDesc == nullptr || partial_desc_list::node_algorithms::inited( static_cast(pDesc))); return pDesc; } @@ -1154,7 +1154,7 @@ namespace michael { void add_partial( superblock_desc * pDesc ) { assert( pPartial != pDesc ); - //assert( partial_desc_list::node_algorithms::inited( static_cast(pDesc)) ); + //assert( partial_desc_list::node_algorithms::inited( static_cast(pDesc))); superblock_desc * pCur = nullptr; if ( !pPartial.compare_exchange_strong(pCur, pDesc, atomics::memory_order_acq_rel, atomics::memory_order_relaxed)) diff --git a/cds/sync/spinlock.h b/cds/sync/spinlock.h index 1708bba0..ec0ee5cf 100644 --- a/cds/sync/spinlock.h +++ b/cds/sync/spinlock.h @@ -145,7 +145,7 @@ namespace cds { Returns \p true if locking is succeeded otherwise (if the spin is already locked) returns \p false */ - bool try_lock( unsigned int nTryCount ) CDS_NOEXCEPT_( noexcept( backoff_strategy()()) ) + bool try_lock( unsigned int nTryCount ) CDS_NOEXCEPT_( noexcept( backoff_strategy()())) { backoff_strategy backoff; while ( nTryCount-- ) { @@ -340,7 +340,7 @@ namespace cds { /// Unlock the spin-lock. Return \p true if the current thread is owner of spin-lock \p false otherwise bool unlock() CDS_NOEXCEPT { - if ( is_taken( OS::get_current_thread_id()) ) { + if ( is_taken( OS::get_current_thread_id())) { integral_type n = m_spin.load( atomics::memory_order_relaxed ); if ( n > 1 ) m_spin.store( n - 1, atomics::memory_order_relaxed ); @@ -356,7 +356,7 @@ namespace cds { /// Change the owner of locked spin-lock. May be called by thread that is owner of the spin-lock bool change_owner( OS::ThreadId newOwnerId ) CDS_NOEXCEPT { - if ( is_taken( OS::get_current_thread_id()) ) { + if ( is_taken( OS::get_current_thread_id())) { assert( newOwnerId != OS::c_NullThreadId ); m_OwnerId = newOwnerId; return true; diff --git a/test/stress/map/delodd/map_delodd.cpp b/test/stress/map/delodd/map_delodd.cpp index 7419144f..15c213dc 100644 --- a/test/stress/map/delodd/map_delodd.cpp +++ b/test/stress/map/delodd/map_delodd.cpp @@ -119,5 +119,5 @@ namespace map { return lf; } - INSTANTIATE_TEST_CASE_P( a, Map_DelOdd_LF, ::testing::ValuesIn( Map_DelOdd_LF::get_load_factors()) ); + INSTANTIATE_TEST_CASE_P( a, Map_DelOdd_LF, ::testing::ValuesIn( Map_DelOdd_LF::get_load_factors())); } // namespace map diff --git a/test/stress/map/delodd/map_delodd.h b/test/stress/map/delodd/map_delodd.h index 62306896..3e5cebd3 100644 --- a/test/stress/map/delodd/map_delodd.h +++ b/test/stress/map/delodd/map_delodd.h @@ -685,7 +685,7 @@ namespace map { { for ( size_t n = 0; n < s_nMapSize; n +=2 ) { for ( size_t i = 0; i < s_nInsThreadCount; ++i ) { - EXPECT_TRUE( testMap.contains( key_type( n, i )) ) << "key=" << n << "/" << i; + EXPECT_TRUE( testMap.contains( key_type( n, i ))) << "key=" << n << "/" << i; } } } diff --git a/test/stress/map/find_int/map_find_int.cpp b/test/stress/map/find_int/map_find_int.cpp index 88bff4f6..e0f40496 100644 --- a/test/stress/map/find_int/map_find_int.cpp +++ b/test/stress/map/find_int/map_find_int.cpp @@ -128,5 +128,5 @@ namespace map { return lf; } - INSTANTIATE_TEST_CASE_P( a, Map_find_int_LF, ::testing::ValuesIn( Map_find_int_LF::get_load_factors()) ); + INSTANTIATE_TEST_CASE_P( a, Map_find_int_LF, ::testing::ValuesIn( Map_find_int_LF::get_load_factors())); } // namespace map diff --git a/test/stress/map/find_string/map_find_string.cpp b/test/stress/map/find_string/map_find_string.cpp index 51cee8d1..27bff50d 100644 --- a/test/stress/map/find_string/map_find_string.cpp +++ b/test/stress/map/find_string/map_find_string.cpp @@ -195,5 +195,5 @@ namespace map { return lf; } - INSTANTIATE_TEST_CASE_P( a, Map_find_string_LF, ::testing::ValuesIn( Map_find_string::get_load_factors()) ); + INSTANTIATE_TEST_CASE_P( a, Map_find_string_LF, ::testing::ValuesIn( Map_find_string::get_load_factors())); } // namespace map diff --git a/test/stress/map/map_type_std.h b/test/stress/map/map_type_std.h index 0f3c0059..ad4fe57e 100644 --- a/test/stress/map/map_type_std.h +++ b/test/stress/map/map_type_std.h @@ -80,7 +80,7 @@ namespace map { bool insert( const Key& key, const T& val, Func func ) { scoped_lock al( m_lock ); - std::pair pRet = base_class::insert( typename base_class::value_type( key, Value()) ); + std::pair pRet = base_class::insert( typename base_class::value_type( key, Value())); if ( pRet.second ) { func( pRet.first->second, val ); return true; @@ -92,7 +92,7 @@ namespace map { std::pair update( const T& key, Func func, bool /*bAllowInsert*/ = true ) { scoped_lock al( m_lock ); - std::pair pRet = base_class::insert( typename base_class::value_type( key, Value()) ); + std::pair pRet = base_class::insert( typename base_class::value_type( key, Value())); if ( pRet.second ) { func( true, *pRet.first ); return std::make_pair( true, true ); diff --git a/test/stress/queue/intrusive_push_pop.cpp b/test/stress/queue/intrusive_push_pop.cpp index a3a7c5b8..8c8c743c 100644 --- a/test/stress/queue/intrusive_push_pop.cpp +++ b/test/stress/queue/intrusive_push_pop.cpp @@ -514,6 +514,6 @@ namespace { INSTANTIATE_TEST_CASE_P( SQ, intrusive_segmented_queue_push_pop, - ::testing::ValuesIn( intrusive_segmented_queue_push_pop::get_test_parameters()) ); + ::testing::ValuesIn( intrusive_segmented_queue_push_pop::get_test_parameters())); } // namespace diff --git a/test/stress/set/delodd/set_delodd.cpp b/test/stress/set/delodd/set_delodd.cpp index b2d43292..0a3332e1 100644 --- a/test/stress/set/delodd/set_delodd.cpp +++ b/test/stress/set/delodd/set_delodd.cpp @@ -112,5 +112,5 @@ namespace set { return lf; } - INSTANTIATE_TEST_CASE_P( a, Set_DelOdd_LF, ::testing::ValuesIn( Set_DelOdd_LF::get_load_factors()) ); + INSTANTIATE_TEST_CASE_P( a, Set_DelOdd_LF, ::testing::ValuesIn( Set_DelOdd_LF::get_load_factors())); } // namespace set diff --git a/test/unit/intrusive-set/test_intrusive_feldman_hashset.h b/test/unit/intrusive-set/test_intrusive_feldman_hashset.h index c0e16d23..1409e8a9 100644 --- a/test/unit/intrusive-set/test_intrusive_feldman_hashset.h +++ b/test/unit/intrusive-set/test_intrusive_feldman_hashset.h @@ -241,7 +241,7 @@ namespace cds_test { break; case 1: ASSERT_TRUE( s.erase( i.key())); - ASSERT_FALSE( s.erase( i.key()) ); + ASSERT_FALSE( s.erase( i.key())); break; case 2: EXPECT_EQ( i.nEraseCount, 0u ); diff --git a/test/unit/intrusive-set/test_intrusive_feldman_hashset_hp.h b/test/unit/intrusive-set/test_intrusive_feldman_hashset_hp.h index e5b1507d..49dfb733 100644 --- a/test/unit/intrusive-set/test_intrusive_feldman_hashset_hp.h +++ b/test/unit/intrusive-set/test_intrusive_feldman_hashset_hp.h @@ -60,7 +60,7 @@ namespace cds_test { data.reserve( nSetSize ); indices.reserve( nSetSize ); for ( size_t key = 0; key < nSetSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/intrusive-set/test_intrusive_feldman_hashset_rcu.h b/test/unit/intrusive-set/test_intrusive_feldman_hashset_rcu.h index d8f795d5..6b5c1fc2 100644 --- a/test/unit/intrusive-set/test_intrusive_feldman_hashset_rcu.h +++ b/test/unit/intrusive-set/test_intrusive_feldman_hashset_rcu.h @@ -65,7 +65,7 @@ protected: data.reserve( nSetSize ); indices.reserve( nSetSize ); for ( size_t key = 0; key < nSetSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/intrusive-set/test_intrusive_michael_iterable.h b/test/unit/intrusive-set/test_intrusive_michael_iterable.h index 3af0cbe5..ef0fca48 100644 --- a/test/unit/intrusive-set/test_intrusive_michael_iterable.h +++ b/test/unit/intrusive-set/test_intrusive_michael_iterable.h @@ -312,7 +312,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey )); ASSERT_TRUE( s.contains( i )); - ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) ); + ASSERT_TRUE( s.contains( other_item( i.key()), other_less())); EXPECT_EQ( i.nFindCount, 0u ); ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } )); EXPECT_EQ( i.nFindCount, 1u ); @@ -333,7 +333,7 @@ namespace cds_test { break; case 1: ASSERT_TRUE( s.erase( i.key())); - ASSERT_FALSE( s.erase( i.key()) ); + ASSERT_FALSE( s.erase( i.key())); break; case 2: ASSERT_TRUE( s.erase( v )); @@ -341,7 +341,7 @@ namespace cds_test { break; case 3: ASSERT_TRUE( s.erase_with( other_item( i.key()), other_less())); - ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less()) ); + ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less())); break; case 4: EXPECT_EQ( i.nEraseCount, 0u ); diff --git a/test/unit/intrusive-set/test_intrusive_michael_iterable_hp.h b/test/unit/intrusive-set/test_intrusive_michael_iterable_hp.h index cc644ab8..674a3655 100644 --- a/test/unit/intrusive-set/test_intrusive_michael_iterable_hp.h +++ b/test/unit/intrusive-set/test_intrusive_michael_iterable_hp.h @@ -65,7 +65,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/intrusive-set/test_intrusive_set.h b/test/unit/intrusive-set/test_intrusive_set.h index b99e1fee..de18a348 100644 --- a/test/unit/intrusive-set/test_intrusive_set.h +++ b/test/unit/intrusive-set/test_intrusive_set.h @@ -352,7 +352,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey )); ASSERT_TRUE( s.contains( i )); - ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) ); + ASSERT_TRUE( s.contains( other_item( i.key()), other_less())); EXPECT_EQ( i.nFindCount, 0u ); ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } )); EXPECT_EQ( i.nFindCount, 1u ); @@ -368,7 +368,7 @@ namespace cds_test { break; case 1: ASSERT_TRUE( s.erase( i.key())); - ASSERT_FALSE( s.erase( i.key()) ); + ASSERT_FALSE( s.erase( i.key())); break; case 2: ASSERT_TRUE( s.erase( v )); @@ -376,7 +376,7 @@ namespace cds_test { break; case 3: ASSERT_TRUE( s.erase_with( other_item( i.key()), other_less())); - ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less()) ); + ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less())); break; case 4: EXPECT_EQ( i.nEraseCount, 0u ); diff --git a/test/unit/intrusive-set/test_intrusive_set_hp.h b/test/unit/intrusive-set/test_intrusive_set_hp.h index 90746509..e9f830d9 100644 --- a/test/unit/intrusive-set/test_intrusive_set_hp.h +++ b/test/unit/intrusive-set/test_intrusive_set_hp.h @@ -65,7 +65,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/intrusive-set/test_intrusive_set_rcu.h b/test/unit/intrusive-set/test_intrusive_set_rcu.h index bef48af8..b3e47ce7 100644 --- a/test/unit/intrusive-set/test_intrusive_set_rcu.h +++ b/test/unit/intrusive-set/test_intrusive_set_rcu.h @@ -65,7 +65,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/intrusive-set/test_intrusive_split_iterable_set.h b/test/unit/intrusive-set/test_intrusive_split_iterable_set.h index 2043306a..7d3b9cfc 100644 --- a/test/unit/intrusive-set/test_intrusive_split_iterable_set.h +++ b/test/unit/intrusive-set/test_intrusive_split_iterable_set.h @@ -313,7 +313,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey )); ASSERT_TRUE( s.contains( i )); - ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) ); + ASSERT_TRUE( s.contains( other_item( i.key()), other_less())); EXPECT_EQ( i.nFindCount, 0u ); ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } )); EXPECT_EQ( i.nFindCount, 1u ); @@ -334,7 +334,7 @@ namespace cds_test { break; case 1: ASSERT_TRUE( s.erase( i.key())); - ASSERT_FALSE( s.erase( i.key()) ); + ASSERT_FALSE( s.erase( i.key())); break; case 2: ASSERT_TRUE( s.erase( v )); @@ -342,7 +342,7 @@ namespace cds_test { break; case 3: ASSERT_TRUE( s.erase_with( other_item( i.key()), other_less())); - ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less()) ); + ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less())); break; case 4: EXPECT_EQ( i.nEraseCount, 0u ); diff --git a/test/unit/intrusive-set/test_intrusive_split_iterable_set_hp.h b/test/unit/intrusive-set/test_intrusive_split_iterable_set_hp.h index 1d634f30..76b04351 100644 --- a/test/unit/intrusive-set/test_intrusive_split_iterable_set_hp.h +++ b/test/unit/intrusive-set/test_intrusive_split_iterable_set_hp.h @@ -65,7 +65,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/map/test_feldman_hashmap.h b/test/unit/map/test_feldman_hashmap.h index 90ea6e30..bdde0385 100644 --- a/test/unit/map/test_feldman_hashmap.h +++ b/test/unit/map/test_feldman_hashmap.h @@ -104,8 +104,8 @@ namespace cds_test { } )); break; case 2: - ASSERT_TRUE( m.insert( std::to_string( i.nKey )) ); - ASSERT_FALSE( m.insert( std::to_string( i.nKey )) ); + ASSERT_TRUE( m.insert( std::to_string( i.nKey ))); + ASSERT_FALSE( m.insert( std::to_string( i.nKey ))); ASSERT_TRUE( m.find( i.nKey, []( map_pair& v ) { v.second.nVal = v.first.nKey; v.second.strVal = std::to_string( v.first.nKey ); @@ -234,20 +234,20 @@ namespace cds_test { case 14: { std::string str = val.strVal; - ASSERT_TRUE( m.emplace( i, std::move( str )) ); + ASSERT_TRUE( m.emplace( i, std::move( str ))); ASSERT_TRUE( str.empty()); str = val.strVal; - ASSERT_FALSE( m.emplace( i, std::move( str )) ); + ASSERT_FALSE( m.emplace( i, std::move( str ))); ASSERT_TRUE( str.empty()); } break; case 15: { std::string str = val.strVal; - ASSERT_TRUE( m.emplace( i, i.nKey, std::move( str )) ); + ASSERT_TRUE( m.emplace( i, i.nKey, std::move( str ))); ASSERT_TRUE( str.empty()); str = val.strVal; - ASSERT_FALSE( m.emplace( i, i.nKey, std::move( str )) ); + ASSERT_FALSE( m.emplace( i, i.nKey, std::move( str ))); ASSERT_TRUE( str.empty()); } break; diff --git a/test/unit/pqueue/mspqueue.cpp b/test/unit/pqueue/mspqueue.cpp index e378e42c..3d726abe 100644 --- a/test/unit/pqueue/mspqueue.cpp +++ b/test/unit/pqueue/mspqueue.cpp @@ -74,7 +74,7 @@ namespace { ASSERT_TRUE( pq.emplace( p->k, p->v )); break; case 2: - ASSERT_TRUE( pq.emplace( std::make_pair( p->k, p->v )) ); + ASSERT_TRUE( pq.emplace( std::make_pair( p->k, p->v ))); break; default: ASSERT_TRUE( pq.push( *p )); diff --git a/test/unit/queue/test_bounded_queue.h b/test/unit/queue/test_bounded_queue.h index 18cb423e..4edb773d 100644 --- a/test/unit/queue/test_bounded_queue.h +++ b/test/unit/queue/test_bounded_queue.h @@ -114,7 +114,7 @@ namespace cds_test { ASSERT_CONTAINER_SIZE( q, 0u ); for ( size_t i = 0; i < nSize; ++i ) { - ASSERT_TRUE( q.push( static_cast(i)) ); + ASSERT_TRUE( q.push( static_cast(i))); } ASSERT_FALSE( q.empty()); ASSERT_CONTAINER_SIZE( q, nSize ); diff --git a/test/unit/queue/test_generic_queue.h b/test/unit/queue/test_generic_queue.h index 67ed8075..eec329d1 100644 --- a/test/unit/queue/test_generic_queue.h +++ b/test/unit/queue/test_generic_queue.h @@ -115,7 +115,7 @@ namespace cds_test { // clear for ( size_t i = 0; i < nSize; ++i ) { - ASSERT_TRUE( q.push( static_cast(i)) ); + ASSERT_TRUE( q.push( static_cast(i))); } ASSERT_FALSE( q.empty()); ASSERT_CONTAINER_SIZE( q, nSize ); diff --git a/test/unit/queue/test_segmented_queue.h b/test/unit/queue/test_segmented_queue.h index db0e66da..94e02921 100644 --- a/test/unit/queue/test_segmented_queue.h +++ b/test/unit/queue/test_segmented_queue.h @@ -140,7 +140,7 @@ namespace cds_test { // clear for ( size_t i = 0; i < nSize; ++i ) { - ASSERT_TRUE( q.push( static_cast(i)) ); + ASSERT_TRUE( q.push( static_cast(i))); } ASSERT_FALSE( q.empty()); ASSERT_CONTAINER_SIZE( q, nSize ); diff --git a/test/unit/set/test_feldman_hashset.h b/test/unit/set/test_feldman_hashset.h index b6cb41b7..4536455d 100644 --- a/test/unit/set/test_feldman_hashset.h +++ b/test/unit/set/test_feldman_hashset.h @@ -210,7 +210,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); @@ -322,12 +322,12 @@ namespace cds_test { } )); break; case 6: - ASSERT_TRUE( s.emplace( i.key()) ); - ASSERT_TRUE( s.contains( i.key()) ); + ASSERT_TRUE( s.emplace( i.key())); + ASSERT_TRUE( s.contains( i.key())); break; case 7: str = "Hello!"; - ASSERT_TRUE( s.emplace( i.key(), std::move( str )) ); + ASSERT_TRUE( s.emplace( i.key(), std::move( str ))); EXPECT_TRUE( str.empty()); ASSERT_TRUE( s.find( i.key(), []( value_type const& v ) { @@ -360,8 +360,8 @@ namespace cds_test { int nKey = i.key() - 1; switch ( idx % 2 ) { case 0: - ASSERT_TRUE( s.erase( i.key()) ); - ASSERT_FALSE( s.erase( i.key()) ); + ASSERT_TRUE( s.erase( i.key())); + ASSERT_FALSE( s.erase( i.key())); break; case 1: ASSERT_TRUE( s.erase( i.key(), [&nKey]( value_type const& v ) diff --git a/test/unit/set/test_feldman_hashset_hp.h b/test/unit/set/test_feldman_hashset_hp.h index 805e5a79..0df10297 100644 --- a/test/unit/set/test_feldman_hashset_hp.h +++ b/test/unit/set/test_feldman_hashset_hp.h @@ -59,7 +59,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/set/test_feldman_hashset_rcu.h b/test/unit/set/test_feldman_hashset_rcu.h index bf759299..2ecc1bfd 100644 --- a/test/unit/set/test_feldman_hashset_rcu.h +++ b/test/unit/set/test_feldman_hashset_rcu.h @@ -66,7 +66,7 @@ namespace { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/set/test_michael_iterable.h b/test/unit/set/test_michael_iterable.h index 3a45bc24..196bffa6 100644 --- a/test/unit/set/test_michael_iterable.h +++ b/test/unit/set/test_michael_iterable.h @@ -55,7 +55,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); @@ -254,7 +254,7 @@ namespace cds_test { EXPECT_TRUE( s.contains( i.nKey )); EXPECT_TRUE( s.contains( i )); - EXPECT_TRUE( s.contains( other_item( i.key()), other_less()) ); + EXPECT_TRUE( s.contains( other_item( i.key()), other_less())); EXPECT_TRUE( s.find( i.nKey, []( value_type&, int ) {} )); EXPECT_TRUE( s.find( i, []( value_type&, value_type const& ) {} )); EXPECT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} )); @@ -273,7 +273,7 @@ namespace cds_test { EXPECT_TRUE( s.contains( i.nKey )); EXPECT_TRUE( s.contains( i )); - EXPECT_TRUE( s.contains( other_item( i.key()), other_less()) ); + EXPECT_TRUE( s.contains( other_item( i.key()), other_less())); EXPECT_TRUE( s.find( i.nKey, []( value_type& v, int ) { v.nFindCount = 1; @@ -299,7 +299,7 @@ namespace cds_test { break; case 2: EXPECT_TRUE( s.erase_with( other_item( i.key()), other_less())); - EXPECT_FALSE( s.erase_with( other_item( i.key()), other_less()) ); + EXPECT_FALSE( s.erase_with( other_item( i.key()), other_less())); break; case 3: EXPECT_TRUE( s.erase( i.key(), [&nKey]( value_type const& v ) diff --git a/test/unit/set/test_michael_iterable_hp.h b/test/unit/set/test_michael_iterable_hp.h index ba0679b9..4810ed77 100644 --- a/test/unit/set/test_michael_iterable_hp.h +++ b/test/unit/set/test_michael_iterable_hp.h @@ -59,7 +59,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/set/test_ordered_set_hp.h b/test/unit/set/test_ordered_set_hp.h index cc562c99..6bbf7865 100644 --- a/test/unit/set/test_ordered_set_hp.h +++ b/test/unit/set/test_ordered_set_hp.h @@ -59,7 +59,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/set/test_set.h b/test/unit/set/test_set.h index 946e605a..a2ed5862 100644 --- a/test/unit/set/test_set.h +++ b/test/unit/set/test_set.h @@ -57,7 +57,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); @@ -200,7 +200,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey )); ASSERT_TRUE( s.contains( i )); - ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) ); + ASSERT_TRUE( s.contains( other_item( i.key()), other_less())); ASSERT_TRUE( s.find( i.nKey, []( value_type&, int ) {} )); ASSERT_TRUE( s.find( i, []( value_type&, value_type const& ) {} )); ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} )); @@ -216,7 +216,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey )); ASSERT_TRUE( s.contains( i )); - ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) ); + ASSERT_TRUE( s.contains( other_item( i.key()), other_less())); ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { v.nFindCount = 1; @@ -242,7 +242,7 @@ namespace cds_test { break; case 2: ASSERT_TRUE( s.erase_with( other_item( i.key()), other_less())); - ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less()) ); + ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less())); break; case 3: ASSERT_TRUE( s.erase( i.key(), [&nKey]( value_type const& v ) diff --git a/test/unit/set/test_set_hp.h b/test/unit/set/test_set_hp.h index 03f1c270..cefce056 100644 --- a/test/unit/set/test_set_hp.h +++ b/test/unit/set/test_set_hp.h @@ -59,7 +59,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/set/test_set_nogc.h b/test/unit/set/test_set_nogc.h index 7eb805d9..f6aad21c 100644 --- a/test/unit/set/test_set_nogc.h +++ b/test/unit/set/test_set_nogc.h @@ -240,7 +240,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/set/test_set_rcu.h b/test/unit/set/test_set_rcu.h index 4d039978..e15edc5a 100644 --- a/test/unit/set/test_set_rcu.h +++ b/test/unit/set/test_set_rcu.h @@ -59,7 +59,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/set/test_skiplist_rcu.h b/test/unit/set/test_skiplist_rcu.h index 15220f76..6b0479e9 100644 --- a/test/unit/set/test_skiplist_rcu.h +++ b/test/unit/set/test_skiplist_rcu.h @@ -62,7 +62,7 @@ protected: data.reserve( nSetSize ); indices.reserve( nSetSize ); for ( size_t key = 0; key < nSetSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/set/test_split_iterable.h b/test/unit/set/test_split_iterable.h index 635682de..a4a0c79f 100644 --- a/test/unit/set/test_split_iterable.h +++ b/test/unit/set/test_split_iterable.h @@ -57,7 +57,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); @@ -254,7 +254,7 @@ namespace cds_test { EXPECT_TRUE( s.contains( i.nKey )); EXPECT_TRUE( s.contains( i )); - EXPECT_TRUE( s.contains( other_item( i.key()), other_less()) ); + EXPECT_TRUE( s.contains( other_item( i.key()), other_less())); EXPECT_TRUE( s.find( i.nKey, []( value_type&, int ) {} )); EXPECT_TRUE( s.find( i, []( value_type&, value_type const& ) {} )); EXPECT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} )); @@ -278,7 +278,7 @@ namespace cds_test { EXPECT_TRUE( s.contains( i.nKey )); EXPECT_TRUE( s.contains( i )); - EXPECT_TRUE( s.contains( other_item( i.key()), other_less()) ); + EXPECT_TRUE( s.contains( other_item( i.key()), other_less())); EXPECT_TRUE( s.find( i.nKey, []( value_type& v, int ) { v.nFindCount = 1; @@ -312,7 +312,7 @@ namespace cds_test { break; case 2: EXPECT_TRUE( s.erase_with( other_item( i.key()), other_less())); - EXPECT_FALSE( s.erase_with( other_item( i.key()), other_less()) ); + EXPECT_FALSE( s.erase_with( other_item( i.key()), other_less())); break; case 3: EXPECT_TRUE( s.erase( i.key(), [&nKey]( value_type const& v ) diff --git a/test/unit/set/test_split_iterable_hp.h b/test/unit/set/test_split_iterable_hp.h index 4003f066..7f6174e3 100644 --- a/test/unit/set/test_split_iterable_hp.h +++ b/test/unit/set/test_split_iterable_hp.h @@ -59,7 +59,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/striped-set/test_intrusive_set.h b/test/unit/striped-set/test_intrusive_set.h index 6e105052..036ad710 100644 --- a/test/unit/striped-set/test_intrusive_set.h +++ b/test/unit/striped-set/test_intrusive_set.h @@ -421,7 +421,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey )); ASSERT_TRUE( s.contains( i )); - ASSERT_TRUE( s.contains( other_item( i.key()), other_predicate()) ); + ASSERT_TRUE( s.contains( other_item( i.key()), other_predicate())); EXPECT_EQ( i.nFindCount, 0u ); ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } )); EXPECT_EQ( i.nFindCount, 1u ); @@ -437,7 +437,7 @@ namespace cds_test { break; case 1: ASSERT_TRUE( s.erase( i.key())); - ASSERT_FALSE( s.erase( i.key()) ); + ASSERT_FALSE( s.erase( i.key())); break; case 2: ASSERT_TRUE( s.erase( v )); @@ -445,7 +445,7 @@ namespace cds_test { break; case 3: ASSERT_TRUE( s.erase_with( other_item( i.key()), other_predicate())); - ASSERT_FALSE( s.erase_with( other_item( i.key()), other_predicate()) ); + ASSERT_FALSE( s.erase_with( other_item( i.key()), other_predicate())); break; case 4: EXPECT_EQ( i.nEraseCount, 0u ); diff --git a/test/unit/striped-set/test_set.h b/test/unit/striped-set/test_set.h index 7f648f1f..1deefc3f 100644 --- a/test/unit/striped-set/test_set.h +++ b/test/unit/striped-set/test_set.h @@ -299,7 +299,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); @@ -442,7 +442,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey )); ASSERT_TRUE( s.contains( i )); - ASSERT_TRUE( s.contains( other_item( i.key()), other_predicate()) ); + ASSERT_TRUE( s.contains( other_item( i.key()), other_predicate())); ASSERT_TRUE( s.find( i.nKey, []( value_type&, int ) {} )); ASSERT_TRUE( s.find( i, []( value_type&, value_type const& ) {} )); ASSERT_TRUE( s.find_with( other_item( i.key()), other_predicate(), []( value_type&, other_item const& ) {} )); @@ -458,7 +458,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey )); ASSERT_TRUE( s.contains( i )); - ASSERT_TRUE( s.contains( other_item( i.key()), other_predicate()) ); + ASSERT_TRUE( s.contains( other_item( i.key()), other_predicate())); ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { v.nFindCount = 1; @@ -484,7 +484,7 @@ namespace cds_test { break; case 2: ASSERT_TRUE( s.erase_with( other_item( i.key()), other_predicate())); - ASSERT_FALSE( s.erase_with( other_item( i.key()), other_predicate()) ); + ASSERT_FALSE( s.erase_with( other_item( i.key()), other_predicate())); break; case 3: ASSERT_TRUE( s.erase( i.key(), [&nKey]( value_type const& v ) diff --git a/test/unit/striped-set/test_striped_set.h b/test/unit/striped-set/test_striped_set.h index 62267155..a25d72fd 100644 --- a/test/unit/striped-set/test_striped_set.h +++ b/test/unit/striped-set/test_striped_set.h @@ -144,7 +144,7 @@ namespace { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); @@ -183,8 +183,8 @@ namespace { EXPECT_FALSE( updResult.second ); break; case 1: - ASSERT_TRUE( s.insert( i.key()) ); - ASSERT_FALSE( s.insert( i.key()) ); + ASSERT_TRUE( s.insert( i.key())); + ASSERT_FALSE( s.insert( i.key())); updResult = s.update( i.key(), []( bool bNew, value_type& val, int arg ) { EXPECT_FALSE( bNew ); @@ -262,7 +262,7 @@ namespace { } )); break; case 6: - ASSERT_TRUE( s.emplace( i.key()) ); + ASSERT_TRUE( s.emplace( i.key())); ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg ) { EXPECT_EQ( v.key(), arg.key()); @@ -271,7 +271,7 @@ namespace { break; case 7: str = "Hello!"; - ASSERT_TRUE( s.emplace( i.key(), std::move( str )) ); + ASSERT_TRUE( s.emplace( i.key(), std::move( str ))); EXPECT_TRUE( str.empty()); ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg ) { @@ -319,8 +319,8 @@ namespace { int nKey = i.key() - 1; switch ( idx % 6 ) { case 0: - ASSERT_TRUE( s.erase( i.key()) ); - ASSERT_FALSE( s.erase( i.key()) ); + ASSERT_TRUE( s.erase( i.key())); + ASSERT_FALSE( s.erase( i.key())); break; case 1: ASSERT_TRUE( s.erase( i )); diff --git a/test/unit/tree/test_intrusive_tree.h b/test/unit/tree/test_intrusive_tree.h index 111fe78d..b33e17e7 100644 --- a/test/unit/tree/test_intrusive_tree.h +++ b/test/unit/tree/test_intrusive_tree.h @@ -394,7 +394,7 @@ namespace cds_test { ASSERT_TRUE( t.contains( i.nKey )); ASSERT_TRUE( t.contains( i )); - ASSERT_TRUE( t.contains( other_item( i.key()), other_less()) ); + ASSERT_TRUE( t.contains( other_item( i.key()), other_less())); EXPECT_EQ( i.nFindCount, 0u ); ASSERT_TRUE( t.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } )); EXPECT_EQ( i.nFindCount, 1u ); @@ -410,7 +410,7 @@ namespace cds_test { break; case 1: ASSERT_TRUE( t.erase( i.key())); - ASSERT_FALSE( t.erase( i.key()) ); + ASSERT_FALSE( t.erase( i.key())); break; case 2: ASSERT_TRUE( t.erase( v )); @@ -418,7 +418,7 @@ namespace cds_test { break; case 3: ASSERT_TRUE( t.erase_with( other_item( i.key()), other_less())); - ASSERT_FALSE( t.erase_with( other_item( i.key()), other_less()) ); + ASSERT_FALSE( t.erase_with( other_item( i.key()), other_less())); break; case 4: EXPECT_EQ( i.nEraseCount, 0u ); diff --git a/test/unit/tree/test_intrusive_tree_hp.h b/test/unit/tree/test_intrusive_tree_hp.h index 926ed35d..1a1325af 100644 --- a/test/unit/tree/test_intrusive_tree_hp.h +++ b/test/unit/tree/test_intrusive_tree_hp.h @@ -64,7 +64,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/tree/test_intrusive_tree_rcu.h b/test/unit/tree/test_intrusive_tree_rcu.h index a430a713..4cae7a7d 100644 --- a/test/unit/tree/test_intrusive_tree_rcu.h +++ b/test/unit/tree/test_intrusive_tree_rcu.h @@ -67,7 +67,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/tree/test_tree_set.h b/test/unit/tree/test_tree_set.h index ec4c6920..e69c9b40 100644 --- a/test/unit/tree/test_tree_set.h +++ b/test/unit/tree/test_tree_set.h @@ -255,7 +255,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); @@ -398,7 +398,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey )); ASSERT_TRUE( s.contains( i )); - ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) ); + ASSERT_TRUE( s.contains( other_item( i.key()), other_less())); ASSERT_TRUE( s.find( i.nKey, []( value_type&, int ) {} )); ASSERT_TRUE( s.find( i, []( value_type&, value_type const& ) {} )); ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} )); @@ -416,7 +416,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey )); ASSERT_TRUE( s.contains( i )); - ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) ); + ASSERT_TRUE( s.contains( other_item( i.key()), other_less())); ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { v.nFindCount = 1; @@ -442,7 +442,7 @@ namespace cds_test { break; case 2: ASSERT_TRUE( s.erase_with( other_item( i.key()), other_less())); - ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less()) ); + ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less())); break; case 3: ASSERT_TRUE( s.erase( i.key(), [&nKey]( value_type const& v ) diff --git a/test/unit/tree/test_tree_set_hp.h b/test/unit/tree/test_tree_set_hp.h index 2e39de5c..0d7194cb 100644 --- a/test/unit/tree/test_tree_set_hp.h +++ b/test/unit/tree/test_tree_set_hp.h @@ -59,7 +59,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); diff --git a/test/unit/tree/test_tree_set_rcu.h b/test/unit/tree/test_tree_set_rcu.h index 2d908080..be22a843 100644 --- a/test/unit/tree/test_tree_set_rcu.h +++ b/test/unit/tree/test_tree_set_rcu.h @@ -59,7 +59,7 @@ namespace cds_test { data.reserve( kSize ); indices.reserve( kSize ); for ( size_t key = 0; key < kSize; ++key ) { - data.push_back( value_type( static_cast(key)) ); + data.push_back( value_type( static_cast(key))); indices.push_back( key ); } shuffle( indices.begin(), indices.end()); -- 2.34.1