Removed redundant spaces
authorkhizmax <libcds.dev@gmail.com>
Sat, 29 Oct 2016 14:31:54 +0000 (17:31 +0300)
committerkhizmax <libcds.dev@gmail.com>
Sat, 29 Oct 2016 14:31:54 +0000 (17:31 +0300)
346 files changed:
cds/algo/backoff_strategy.h
cds/algo/flat_combining/kernel.h
cds/algo/split_bitstring.h
cds/compiler/gcc/ia64/bitop.h
cds/compiler/icl/defs.h
cds/compiler/vc/amd64/cxx11_atomic.h
cds/compiler/vc/defs.h
cds/compiler/vc/x86/cxx11_atomic.h
cds/container/basket_queue.h
cds/container/cuckoo_map.h
cds/container/cuckoo_set.h
cds/container/details/bronson_avltree_base.h
cds/container/details/ellen_bintree_base.h
cds/container/details/feldman_hashmap_base.h
cds/container/details/make_lazy_kvlist.h
cds/container/details/make_michael_kvlist.h
cds/container/details/make_skip_list_map.h
cds/container/details/make_split_list_set_iterable_list.h
cds/container/details/make_split_list_set_michael_list.h
cds/container/details/skip_list_base.h
cds/container/ellen_bintree_map_rcu.h
cds/container/ellen_bintree_set_rcu.h
cds/container/fcdeque.h
cds/container/fcpriority_queue.h
cds/container/fcqueue.h
cds/container/fcstack.h
cds/container/feldman_hashmap_rcu.h
cds/container/impl/bronson_avltree_map_rcu.h
cds/container/impl/ellen_bintree_map.h
cds/container/impl/ellen_bintree_set.h
cds/container/impl/feldman_hashmap.h
cds/container/impl/iterable_kvlist.h
cds/container/impl/iterable_list.h
cds/container/impl/lazy_kvlist.h
cds/container/impl/lazy_list.h
cds/container/impl/michael_kvlist.h
cds/container/impl/michael_list.h
cds/container/impl/skip_list_map.h
cds/container/impl/skip_list_set.h
cds/container/lazy_kvlist_nogc.h
cds/container/lazy_kvlist_rcu.h
cds/container/lazy_list_nogc.h
cds/container/lazy_list_rcu.h
cds/container/michael_kvlist_nogc.h
cds/container/michael_kvlist_rcu.h
cds/container/michael_list_nogc.h
cds/container/michael_list_rcu.h
cds/container/michael_map.h
cds/container/michael_map_nogc.h
cds/container/michael_map_rcu.h
cds/container/michael_set.h
cds/container/michael_set_nogc.h
cds/container/michael_set_rcu.h
cds/container/moir_queue.h
cds/container/mspriority_queue.h
cds/container/msqueue.h
cds/container/optimistic_queue.h
cds/container/rwqueue.h
cds/container/segmented_queue.h
cds/container/skip_list_map_nogc.h
cds/container/skip_list_map_rcu.h
cds/container/skip_list_set_nogc.h
cds/container/skip_list_set_rcu.h
cds/container/split_list_map.h
cds/container/split_list_map_nogc.h
cds/container/split_list_map_rcu.h
cds/container/split_list_set.h
cds/container/split_list_set_nogc.h
cds/container/split_list_set_rcu.h
cds/container/striped_map.h
cds/container/striped_map/boost_list.h
cds/container/striped_map/boost_slist.h
cds/container/striped_map/std_hash_map.h
cds/container/striped_map/std_list.h
cds/container/striped_map/std_map.h
cds/container/striped_set.h
cds/container/striped_set/adapter.h
cds/container/striped_set/boost_list.h
cds/container/striped_set/boost_slist.h
cds/container/striped_set/boost_stable_vector.h
cds/container/striped_set/boost_vector.h
cds/container/striped_set/std_hash_set.h
cds/container/striped_set/std_list.h
cds/container/striped_set/std_set.h
cds/container/striped_set/std_vector.h
cds/container/tsigas_cycle_queue.h
cds/container/vyukov_mpmc_cycle_queue.h
cds/details/aligned_type.h
cds/details/bit_reverse_counter.h
cds/details/bitop_generic.h
cds/details/bounded_array.h
cds/details/defs.h
cds/details/marked_ptr.h
cds/gc/details/dhp.h
cds/gc/details/hp.h
cds/gc/details/hp_alloc.h
cds/gc/details/retired_ptr.h
cds/gc/impl/dhp_decl.h
cds/gc/impl/dhp_impl.h
cds/gc/impl/hp_decl.h
cds/gc/impl/hp_impl.h
cds/init.h
cds/intrusive/cuckoo_set.h
cds/intrusive/details/ellen_bintree_base.h
cds/intrusive/details/michael_set_base.h
cds/intrusive/details/skip_list_base.h
cds/intrusive/details/split_list_base.h
cds/intrusive/fcqueue.h
cds/intrusive/fcstack.h
cds/intrusive/free_list.h
cds/intrusive/free_list_cached.h
cds/intrusive/free_list_tagged.h
cds/intrusive/impl/ellen_bintree.h
cds/intrusive/impl/iterable_list.h
cds/intrusive/impl/michael_list.h
cds/intrusive/impl/skip_list.h
cds/intrusive/lazy_list_nogc.h
cds/intrusive/lazy_list_rcu.h
cds/intrusive/michael_list_nogc.h
cds/intrusive/michael_list_rcu.h
cds/intrusive/michael_set.h
cds/intrusive/michael_set_nogc.h
cds/intrusive/michael_set_rcu.h
cds/intrusive/mspriority_queue.h
cds/intrusive/msqueue.h
cds/intrusive/optimistic_queue.h
cds/intrusive/segmented_queue.h
cds/intrusive/skip_list_nogc.h
cds/intrusive/skip_list_rcu.h
cds/intrusive/split_list.h
cds/intrusive/split_list_nogc.h
cds/intrusive/split_list_rcu.h
cds/intrusive/striped_set.h
cds/intrusive/striped_set/adapter.h
cds/intrusive/striped_set/boost_list.h
cds/intrusive/striped_set/boost_slist.h
cds/intrusive/striped_set/boost_unordered_set.h
cds/intrusive/striped_set/striping_policy.h
cds/intrusive/treiber_stack.h
cds/intrusive/tsigas_cycle_queue.h
cds/intrusive/vyukov_mpmc_cycle_queue.h
cds/memory/michael/allocator.h
cds/memory/michael/bound_check.h
cds/memory/vyukov_queue_pool.h
cds/opt/buffer.h
cds/opt/compare.h
cds/opt/hash.h
cds/opt/permutation.h
cds/os/aix/timer.h
cds/os/alloc_aligned.h
cds/os/free_bsd/timer.h
cds/os/linux/timer.h
cds/os/osx/timer.h
cds/os/posix/timer.h
cds/os/sunos/timer.h
cds/os/win/timer.h
cds/sync/lock_array.h
cds/sync/pool_monitor.h
cds/sync/spinlock.h
cds/threading/details/_common.h
cds/threading/details/cxx11_manager.h
cds/threading/details/gcc_manager.h
cds/threading/details/msvc_manager.h
cds/threading/details/pthread_manager.h
cds/threading/details/wintls_manager.h
cds/urcu/details/base.h
cds/urcu/details/check_deadlock.h
cds/urcu/details/gp.h
cds/urcu/details/gp_decl.h
cds/urcu/details/gpb.h
cds/urcu/details/gpi.h
cds/urcu/details/gpt.h
cds/urcu/details/sh.h
cds/urcu/details/sh_decl.h
cds/urcu/details/sig_buffered.h
cds/urcu/details/sig_threaded.h
cds/urcu/dispose_thread.h
cds/urcu/exempt_ptr.h
cds/urcu/general_buffered.h
cds/urcu/general_instant.h
cds/urcu/general_threaded.h
cds/urcu/signal_buffered.h
cds/urcu/signal_threaded.h
src/dhp_gc.cpp
src/dllmain.cpp
src/hp_gc.cpp
src/topology_linux.cpp
test/include/cds_test/fixture.h
test/include/cds_test/hash_func.h
test/include/cds_test/stat_feldman_hashset_out.h
test/include/cds_test/stat_flat_combining_out.h
test/include/cds_test/stat_sync_monitor_out.h
test/include/cds_test/stress_test.h
test/include/cds_test/thread.h
test/stress/framework/config.cpp
test/stress/framework/stress_test.cpp
test/stress/freelist/put_get.cpp
test/stress/freelist/put_get_single.cpp
test/stress/map/delodd/map_delodd.cpp
test/stress/map/delodd/map_delodd.h
test/stress/map/find_int/map_find_int.cpp
test/stress/map/find_string/map_find_string.cpp
test/stress/map/find_string/map_find_string.h
test/stress/map/insdel_func/map_insdel_func.cpp
test/stress/map/insdel_func/map_insdel_func.h
test/stress/map/insdel_int/map_insdel_int.cpp
test/stress/map/insdel_int/map_insdel_int.h
test/stress/map/insdel_item_int/map_insdel_item_int.h
test/stress/map/insdel_string/map_insdel_string.cpp
test/stress/map/insdel_string/map_insdel_string.h
test/stress/map/insdelfind/map_insdelfind.h
test/stress/map/insfind_int/map_insfind_int.h
test/stress/map/map_type.h
test/stress/map/map_type_cuckoo.h
test/stress/map/map_type_ellen_bintree.h
test/stress/map/map_type_std.h
test/stress/map/map_type_striped.h
test/stress/pqueue/pop.cpp
test/stress/pqueue/pqueue_type.h
test/stress/pqueue/push.cpp
test/stress/pqueue/push_pop.cpp
test/stress/queue/intrusive_push_pop.cpp
test/stress/queue/intrusive_queue_type.h
test/stress/queue/pop.cpp
test/stress/queue/push.cpp
test/stress/queue/push_pop.cpp
test/stress/queue/random.cpp
test/stress/queue/std_queue.h
test/stress/set/delodd/set_delodd.cpp
test/stress/set/delodd/set_delodd.h
test/stress/set/insdel_find/set_insdelfind.h
test/stress/set/insdel_func/set_insdel_func.h
test/stress/set/insdel_string/set_insdel_string.h
test/stress/set/iteration/set_iteration.h
test/stress/set/set_type.h
test/stress/set/set_type_cuckoo.h
test/stress/set/set_type_ellen_bintree.h
test/stress/set/set_type_feldman_hashset.h
test/stress/set/set_type_std.h
test/stress/set/set_type_striped.h
test/stress/stack/intrusive_push_pop.cpp
test/stress/stack/intrusive_push_pop_fcstack.cpp
test/stress/stack/intrusive_stack_push_pop.h
test/stress/stack/intrusive_stack_type.h
test/stress/stack/push.cpp
test/stress/stack/push_pop.cpp
test/stress/stack/stack_type.h
test/unit/deque/fcdeque.cpp
test/unit/intrusive-list/test_intrusive_iterable_list.h
test/unit/intrusive-list/test_intrusive_iterable_list_hp.h
test/unit/intrusive-list/test_intrusive_list.h
test/unit/intrusive-list/test_intrusive_list_hp.h
test/unit/intrusive-list/test_intrusive_list_nogc.h
test/unit/intrusive-list/test_intrusive_list_rcu.h
test/unit/intrusive-set/test_intrusive_feldman_hashset.h
test/unit/intrusive-set/test_intrusive_feldman_hashset_hp.h
test/unit/intrusive-set/test_intrusive_feldman_hashset_rcu.h
test/unit/intrusive-set/test_intrusive_michael_iterable.h
test/unit/intrusive-set/test_intrusive_michael_iterable_hp.h
test/unit/intrusive-set/test_intrusive_set.h
test/unit/intrusive-set/test_intrusive_set_hp.h
test/unit/intrusive-set/test_intrusive_set_nogc.h
test/unit/intrusive-set/test_intrusive_set_rcu.h
test/unit/intrusive-set/test_intrusive_split_iterable_set.h
test/unit/intrusive-set/test_intrusive_split_iterable_set_hp.h
test/unit/list/test_iterable_list.h
test/unit/list/test_iterable_list_hp.h
test/unit/list/test_kv_iterable_list.h
test/unit/list/test_kv_iterable_list_hp.h
test/unit/list/test_kv_list.h
test/unit/list/test_kv_list_hp.h
test/unit/list/test_kv_list_nogc.h
test/unit/list/test_kv_list_rcu.h
test/unit/list/test_list.h
test/unit/list/test_list_hp.h
test/unit/list/test_list_nogc.h
test/unit/list/test_list_rcu.h
test/unit/map/skiplist_nogc.cpp
test/unit/map/test_feldman_hashmap.h
test/unit/map/test_feldman_hashmap_hp.h
test/unit/map/test_feldman_hashmap_rcu.h
test/unit/map/test_map.h
test/unit/map/test_map_hp.h
test/unit/map/test_map_nogc.h
test/unit/map/test_map_rcu.h
test/unit/map/test_michael_iterable.h
test/unit/map/test_michael_iterable_hp.h
test/unit/map/test_skiplist_hp.h
test/unit/map/test_skiplist_rcu.h
test/unit/misc/cxx11_atomic_class.cpp
test/unit/misc/cxx11_atomic_func.cpp
test/unit/misc/permutation_generator.cpp
test/unit/misc/split_bitstring.cpp
test/unit/pqueue/intrusive_mspqueue.cpp
test/unit/pqueue/mspqueue.cpp
test/unit/pqueue/test_fcpqueue.h
test/unit/queue/fcqueue.cpp
test/unit/queue/intrusive_fcqueue.cpp
test/unit/queue/segmented_queue_dhp.cpp
test/unit/queue/segmented_queue_hp.cpp
test/unit/queue/test_bounded_queue.h
test/unit/queue/test_generic_queue.h
test/unit/queue/test_intrusive_bounded_queue.h
test/unit/queue/test_intrusive_msqueue.h
test/unit/queue/test_intrusive_segmented_queue.h
test/unit/queue/test_segmented_queue.h
test/unit/set/test_feldman_hashset.h
test/unit/set/test_feldman_hashset_hp.h
test/unit/set/test_feldman_hashset_rcu.h
test/unit/set/test_michael_iterable.h
test/unit/set/test_michael_iterable_hp.h
test/unit/set/test_ordered_set_hp.h
test/unit/set/test_set.h
test/unit/set/test_set_data.h
test/unit/set/test_set_hp.h
test/unit/set/test_set_nogc.h
test/unit/set/test_set_rcu.h
test/unit/set/test_skiplist_rcu.h
test/unit/set/test_split_iterable.h
test/unit/set/test_split_iterable_hp.h
test/unit/stack/fcstack.cpp
test/unit/stack/intrusive_fcstack.cpp
test/unit/stack/test_intrusive_treiber_stack.h
test/unit/stack/test_treiber_stack.h
test/unit/striped-map/cuckoo_map.cpp
test/unit/striped-map/test_map.h
test/unit/striped-map/test_striped_map.h
test/unit/striped-set/cuckoo_set.cpp
test/unit/striped-set/intrusive_boost_unordered_set.cpp
test/unit/striped-set/intrusive_cuckoo_set.cpp
test/unit/striped-set/test_intrusive_set.h
test/unit/striped-set/test_intrusive_striped_set.h
test/unit/striped-set/test_set.h
test/unit/striped-set/test_striped_set.h
test/unit/tree/test_bronson_avltree_map.h
test/unit/tree/test_bronson_avltree_map_ptr.h
test/unit/tree/test_intrusive_tree.h
test/unit/tree/test_intrusive_tree_hp.h
test/unit/tree/test_intrusive_tree_rcu.h
test/unit/tree/test_tree_map.h
test/unit/tree/test_tree_map_hp.h
test/unit/tree/test_tree_map_rcu.h
test/unit/tree/test_tree_set.h
test/unit/tree/test_tree_set_hp.h
test/unit/tree/test_tree_set_rcu.h
tools/brush_cds.pl

index 03f95c60cf3842a0dc8a4a52676db39e70272d84..1d191fdae10b2fd66604ebed487be9a89f8a84a9 100644 (file)
@@ -88,7 +88,7 @@ namespace cds {
             {}
 
             template <typename Predicate>
-            bool operator()(Predicate pr) const CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()() ))
+            bool operator()(Predicate pr) const CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()()))
             {
                 return pr();
             }
@@ -107,9 +107,9 @@ namespace cds {
             }
 
             template <typename Predicate>
-            bool operator()(Predicate pr) const CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()() ))
+            bool operator()(Predicate pr) const CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()()))
             {
-                if ( pr() )
+                if ( pr())
                     return true;
                 operator()();
                 return false;
@@ -135,9 +135,9 @@ namespace cds {
             }
 
             template <typename Predicate>
-            bool operator()(Predicate pr) const CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()() ))
+            bool operator()(Predicate pr) const CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()()))
             {
-                if ( pr() )
+                if ( pr())
                     return true;
                 operator()();
                 return false;
@@ -166,9 +166,9 @@ namespace cds {
             }
 
             template <typename Predicate>
-            bool operator()(Predicate pr) const CDS_NOEXCEPT_(noexcept(std::declval<Predicate>()() ))
+            bool operator()(Predicate pr) const CDS_NOEXCEPT_(noexcept(std::declval<Predicate>()()))
             {
-                if ( pr() )
+                if ( pr())
                     return true;
                 operator()();
                 return false;
@@ -293,11 +293,11 @@ namespace cds {
             }
 
             template <typename Predicate>
-            bool operator()( Predicate pr ) CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()()) && noexcept(std::declval<spin_backoff>()()) && noexcept(std::declval<yield_backoff>()() ))
+            bool operator()( Predicate pr ) CDS_NOEXCEPT_( noexcept(std::declval<Predicate>()()) && noexcept(std::declval<spin_backoff>()()) && noexcept(std::declval<yield_backoff>()()))
             {
                 if ( m_nExpCur <= m_nExpMax ) {
                     for ( size_t n = 0; n < m_nExpCur; ++n ) {
-                        if ( m_bkSpin(pr) )
+                        if ( m_bkSpin(pr))
                             return true;
                     }
                     m_nExpCur *= 2;
@@ -307,7 +307,7 @@ namespace cds {
                 return false;
             }
 
-            void reset() CDS_NOEXCEPT_( noexcept( std::declval<spin_backoff>().reset() ) && noexcept( std::declval<yield_backoff>().reset() ))
+            void reset() CDS_NOEXCEPT_( noexcept( std::declval<spin_backoff>().reset()) && noexcept( std::declval<yield_backoff>().reset()))
             {
                 m_nExpCur = m_nExpMin;
                 m_bkSpin.reset();
@@ -403,7 +403,7 @@ namespace cds {
             bool operator()(Predicate pr) const
             {
                 for ( unsigned int i = 0; i < m_nTimeout; i += 2 ) {
-                    if ( pr() )
+                    if ( pr())
                         return true;
                     std::this_thread::sleep_for( duration_type( 2 ));
                 }
index ece696f05da4a3a599dde68adb672e759d1dcf5f..f8dd398ca4ba9a4f17002cbd23ed139679adb9cd 100644 (file)
@@ -329,7 +329,7 @@ namespace cds { namespace algo {
             /// Marks publication record for the current thread as empty
             void release_record( publication_record_type * pRec )
             {
-                assert( pRec->is_done() );
+                assert( pRec->is_done());
                 pRec->nRequest.store( req_EmptyRecord, memory_model::memory_order_release );
             }
 
@@ -410,7 +410,7 @@ namespace cds { namespace algo {
             /// Marks \p rec as executed
             /**
                 This function should be called by container if \p batch_combine mode is used.
-                For usual combining (see \p combine() ) this function is excess.
+                For usual combining (see \p combine()) this function is excess.
             */
             void operation_done( publication_record& rec )
             {
@@ -606,7 +606,7 @@ namespace cds { namespace algo {
                 pRec->nState.store( active, memory_model::memory_order_release );
 
                 // Insert record to publication list
-                if ( m_pHead != static_cast<publication_record *>(pRec) ) {
+                if ( m_pHead != static_cast<publication_record *>(pRec)) {
                     publication_record * p = m_pHead->pNext.load(memory_model::memory_order_relaxed);
                     if ( p != static_cast<publication_record *>( pRec )) {
                         do {
@@ -630,9 +630,9 @@ namespace cds { namespace algo {
             template <class Container>
             void try_combining( Container& owner, publication_record_type* pRec )
             {
-                if ( m_Mutex.try_lock() ) {
+                if ( m_Mutex.try_lock()) {
                     // The thread becomes a combiner
-                    lock_guard l( m_Mutex, std::adopt_lock_t() );
+                    lock_guard l( m_Mutex, std::adopt_lock_t());
 
                     // The record pRec can be excluded from publication list. Re-publish it
                     republish( pRec );
@@ -642,9 +642,9 @@ namespace cds { namespace algo {
                 }
                 else {
                     // There is another combiner, wait while it executes our request
-                    if ( !wait_for_combining( pRec ) ) {
+                    if ( !wait_for_combining( pRec )) {
                         // The thread becomes a combiner
-                        lock_guard l( m_Mutex, std::adopt_lock_t() );
+                        lock_guard l( m_Mutex, std::adopt_lock_t());
 
                         // The record pRec can be excluded from publication list. Re-publish it
                         republish( pRec );
@@ -658,9 +658,9 @@ namespace cds { namespace algo {
             template <class Container>
             void try_batch_combining( Container& owner, publication_record_type * pRec )
             {
-                if ( m_Mutex.try_lock() ) {
+                if ( m_Mutex.try_lock()) {
                     // The thread becomes a combiner
-                    lock_guard l( m_Mutex, std::adopt_lock_t() );
+                    lock_guard l( m_Mutex, std::adopt_lock_t());
 
                     // The record pRec can be excluded from publication list. Re-publish it
                     republish( pRec );
@@ -670,9 +670,9 @@ namespace cds { namespace algo {
                 }
                 else {
                     // There is another combiner, wait while it executes our request
-                    if ( !wait_for_combining( pRec ) ) {
+                    if ( !wait_for_combining( pRec )) {
                         // The thread becomes a combiner
-                        lock_guard l( m_Mutex, std::adopt_lock_t() );
+                        lock_guard l( m_Mutex, std::adopt_lock_t());
 
                         // The record pRec can be excluded from publication list. Re-publish it
                         republish( pRec );
@@ -687,7 +687,7 @@ namespace cds { namespace algo {
             void combining( Container& owner )
             {
                 // The thread is a combiner
-                assert( !m_Mutex.try_lock() );
+                assert( !m_Mutex.try_lock());
 
                 unsigned int const nCurAge = m_nCount.fetch_add( 1, memory_model::memory_order_relaxed ) + 1;
 
@@ -716,7 +716,7 @@ namespace cds { namespace algo {
                         case active:
                             if ( p->op() >= req_Operation ) {
                                 p->nAge.store( nCurAge, memory_model::memory_order_release );
-                                owner.fc_apply( static_cast<publication_record_type*>(p) );
+                                owner.fc_apply( static_cast<publication_record_type*>(p));
                                 operation_done( *p );
                                 bOpDone = true;
                             }
@@ -743,12 +743,12 @@ namespace cds { namespace algo {
             void batch_combining( Container& owner )
             {
                 // The thread is a combiner
-                assert( !m_Mutex.try_lock() );
+                assert( !m_Mutex.try_lock());
 
                 unsigned int const nCurAge = m_nCount.fetch_add( 1, memory_model::memory_order_relaxed ) + 1;
 
                 for ( unsigned int nPass = 0; nPass < m_nCombinePassCount; ++nPass )
-                    owner.fc_process( begin(), end() );
+                    owner.fc_process( begin(), end());
 
                 combining_pass( owner, nCurAge );
                 m_Stat.onCombining();
@@ -771,7 +771,7 @@ namespace cds { namespace algo {
                     if ( m_waitStrategy.wait( *this, *pRec ))
                         m_Stat.onWakeupByNotifying();
 
-                    if ( m_Mutex.try_lock() ) {
+                    if ( m_Mutex.try_lock()) {
                         if ( pRec->op( memory_model::memory_order_acquire ) == req_Response ) {
                             // Operation is done
                             m_Mutex.unlock();
index 239b9dd39288c43298eca7f995771b818722d56d..738accbb6c25ba42f3df20873c4c184491c2a478 100644 (file)
@@ -101,7 +101,7 @@ namespace cds { namespace algo {
         */
         uint_type cut( size_t nBits )
         {
-            assert( !eos() );
+            assert( !eos());
             assert( nBits <= c_nBitPerInt );
             assert( m_offset + nBits <= c_nBitPerHash );
 #   ifdef _DEBUG
@@ -145,7 +145,7 @@ namespace cds { namespace algo {
         */
         uint_type safe_cut( size_t nBits )
         {
-            if ( eos() )
+            if ( eos())
                 return 0;
 
             assert( nBits <= sizeof(uint_type) * c_nBitPerByte );
index e213b621086c5032220cc789a4c7600defde3bc4..4363081dd77fe7d59a8730866c5e796b30f6405d 100644 (file)
@@ -49,7 +49,7 @@ namespace cds {
             x |= x >> 16;
 
             uint64_t    nRes;
-            asm __volatile__( "popcnt %0=%1\n\t" : "=r" (nRes) : "r" (x) );
+            asm __volatile__( "popcnt %0=%1\n\t" : "=r" (nRes) : "r" (x));
             return (int) nRes;
         }
 
index 2c16c5adf881fe681856de2a1a9b5a9a46ae90a4..2a5cae3b27a8b8c0ac09d4ca6e4b63a636a93bdf 100644 (file)
 // Alignment macro
 
 #if CDS_OS_INTERFACE == CDS_OSI_WINDOWS
-#   define CDS_TYPE_ALIGNMENT(n)     __declspec( align(n) )
-#   define CDS_DATA_ALIGNMENT(n)     __declspec( align(n) )
-#   define CDS_CLASS_ALIGNMENT(n)    __declspec( align(n) )
+#   define CDS_TYPE_ALIGNMENT(n)     __declspec( align(n))
+#   define CDS_DATA_ALIGNMENT(n)     __declspec( align(n))
+#   define CDS_CLASS_ALIGNMENT(n)    __declspec( align(n))
 #else
 #   define CDS_TYPE_ALIGNMENT(n)   __attribute__ ((aligned (n)))
 #   define CDS_CLASS_ALIGNMENT(n)  __attribute__ ((aligned (n)))
index 83aac1d38937328372a553c912c10ab35515181d..27a6f669969bb496adc730110fd4fb0a6dbf1bca 100644 (file)
@@ -206,7 +206,7 @@ namespace cds { namespace cxx11_atomic {
             return expected == prev;
 #       else
             // VC 2008
-            unsigned int *  pnDest = (unsigned int *)( ((unsigned __int64) pDest) & ~(unsigned __int64(3)) );
+            unsigned int *  pnDest = (unsigned int *)( ((unsigned __int64) pDest) & ~(unsigned __int64(3)));
             unsigned int    nOffset = ((unsigned __int64) pDest) & 3;
             unsigned int    nExpected;
             unsigned int    nDesired;
@@ -545,7 +545,7 @@ namespace cds { namespace cxx11_atomic {
         static inline T * exchange_ptr( T * volatile * pDest, T * v, memory_order /*order*/ ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T *) == sizeof(void *), "Illegal size of operand" );
-            return (T *) _InterlockedExchangePointer( (void * volatile *) pDest, reinterpret_cast<void *>(v) );
+            return (T *) _InterlockedExchangePointer( (void * volatile *) pDest, reinterpret_cast<void *>(v));
         }
 
         template <typename T>
index 6d8aa406dc8446ef8825a1ff6641ccdb302f988b..1b00f6ff8df580a67b57daf3f6a968e3b096378d 100644 (file)
 // *************************************************
 // Alignment macro
 
-#define CDS_TYPE_ALIGNMENT(n)     __declspec( align(n) )
-#define CDS_DATA_ALIGNMENT(n)     __declspec( align(n) )
-#define CDS_CLASS_ALIGNMENT(n)    __declspec( align(n) )
+#define CDS_TYPE_ALIGNMENT(n)     __declspec( align(n))
+#define CDS_DATA_ALIGNMENT(n)     __declspec( align(n))
+#define CDS_CLASS_ALIGNMENT(n)    __declspec( align(n))
 
 // Attributes
 #if CDS_COMPILER_VERSION >= CDS_COMPILER_MSVC14
index 5f42ca2dd6c043e50fcd3e3417cf7ef930012ed9..d9dc799ebd5c84cbbf457aba0c928293839fca1a 100644 (file)
@@ -518,7 +518,7 @@ namespace cds { namespace cxx11_atomic {
         {
             static_assert( sizeof(T *) == sizeof(void *), "Illegal operand size" );
             return (T *) _InterlockedExchange( (long volatile *) pDest, (uintptr_t) v );
-            //return (T *) _InterlockedExchangePointer( (void * volatile *) pDest, reinterpret_cast<void *>(v) );
+            //return (T *) _InterlockedExchangePointer( (void * volatile *) pDest, reinterpret_cast<void *>(v));
         }
 
         template <typename T>
index e3bceaf6368a8be5cbc210d95ca69e76ab587b0e..0192f483fe19a056508e2d008969e87c41bfda07 100644 (file)
@@ -329,7 +329,7 @@ namespace cds { namespace container {
         bool enqueue( value_type&& val )
         {
             scoped_node_ptr p( alloc_node_move( std::move( val )));
-            if ( base_class::enqueue( *p ) ) {
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
@@ -349,7 +349,7 @@ namespace cds { namespace container {
         template <typename Func>
         bool enqueue_with( Func f )
         {
-            scoped_node_ptr p( alloc_node() );
+            scoped_node_ptr p( alloc_node());
             f( p->m_value );
             if ( base_class::enqueue( *p )) {
                 p.release();
index d990092f9503716271f47452a263e56827a02f36..89eca7c038d7c37d31933825d1e445cbc90a5b39 100644 (file)
@@ -56,17 +56,17 @@ namespace cds { namespace container {
 
                 template <typename K>
                 node_type( K const& key )
-                    : m_val( std::make_pair( key_type(key), mapped_type() ))
+                    : m_val( std::make_pair( key_type(key), mapped_type()))
                 {}
 
                 template <typename K, typename Q>
                 node_type( K const& key, Q const& v )
-                    : m_val( std::make_pair( key_type(key), mapped_type(v) ))
+                    : m_val( std::make_pair( key_type(key), mapped_type(v)))
                 {}
 
                 template <typename K, typename... Args>
                 node_type( K&& key, Args&&... args )
-                    : m_val( std::forward<K>(key), std::move( mapped_type(std::forward<Args>(args)...)) )
+                    : m_val( std::forward<K>(key), std::move( mapped_type(std::forward<Args>(args)...)))
                 {}
             };
 
@@ -401,7 +401,7 @@ namespace cds { namespace container {
         CuckooMap(
             hash_tuple_type&& h     ///< hash functor tuple of type <tt>std::tuple<H1, H2, ... Hn></tt> where <tt> n == \ref c_nArity </tt>
         )
-        : base_class( std::forward<hash_tuple_type>(h) )
+        : base_class( std::forward<hash_tuple_type>(h))
         {}
 
         /// Constructs a map with given probe set properties and hash functor tuple (move semantics)
@@ -415,7 +415,7 @@ namespace cds { namespace container {
             , unsigned int nProbesetThreshold   ///< probe set threshold, <tt>nProbesetThreshold < nProbesetSize</tt>. If 0, nProbesetThreshold = nProbesetSize - 1
             , hash_tuple_type&& h    ///< hash functor tuple of type <tt>std::tuple<H1, H2, ... Hn></tt> where <tt> n == \ref c_nArity </tt>
         )
-        : base_class( nInitialSize, nProbesetSize, nProbesetThreshold, std::forward<hash_tuple_type>(h) )
+        : base_class( nInitialSize, nProbesetSize, nProbesetThreshold, std::forward<hash_tuple_type>(h))
         {}
 
         /// Destructor clears the map
@@ -629,7 +629,7 @@ namespace cds { namespace container {
         bool erase_with( K const& key, Predicate pred, Func f )
         {
             CDS_UNUSED( pred );
-            node_type * pNode = base_class::erase_with( key, cds::details::predicate_wrapper<node_type, Predicate, key_accessor>() );
+            node_type * pNode = base_class::erase_with( key, cds::details::predicate_wrapper<node_type, Predicate, key_accessor>());
             if ( pNode ) {
                 f( pNode->m_val );
                 free_node( pNode );
@@ -705,7 +705,7 @@ namespace cds { namespace container {
         bool contains( K const& key, Predicate pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, cds::details::predicate_wrapper<node_type, Predicate, key_accessor>() );
+            return base_class::contains( key, cds::details::predicate_wrapper<node_type, Predicate, key_accessor>());
         }
         //@cond
         template <typename K, typename Predicate>
@@ -719,7 +719,7 @@ namespace cds { namespace container {
         /// Clears the map
         void clear()
         {
-            base_class::clear_and_dispose( node_disposer() );
+            base_class::clear_and_dispose( node_disposer());
         }
 
         /// Checks if the map is empty
index bebbb47d1e8294c86f8a922b29bfeee2945d69de..9229432ec344b3118588f7663a1cf7994f29c4f5 100644 (file)
@@ -474,7 +474,7 @@ namespace cds { namespace container {
         CuckooSet(
             hash_tuple_type&& h     ///< hash functor tuple of type <tt>std::tuple<H1, H2, ... Hn></tt> where <tt> n == \ref c_nArity </tt>
         )
-        : base_class( std::forward<hash_tuple_type>(h) )
+        : base_class( std::forward<hash_tuple_type>(h))
         {}
 
         /// Constructs the set object with given probe set properties and hash functor tuple (move semantics)
@@ -488,7 +488,7 @@ namespace cds { namespace container {
             , unsigned int nProbesetThreshold   ///< probe set threshold, <tt>nProbesetThreshold < nProbesetSize</tt>. If 0, nProbesetThreshold = nProbesetSize - 1
             , hash_tuple_type&& h    ///< hash functor tuple of type <tt>std::tuple<H1, H2, ... Hn></tt> where <tt> n == \ref c_nArity </tt>
         )
-        : base_class( nInitialSize, nProbesetSize, nProbesetThreshold, std::forward<hash_tuple_type>(h) )
+        : base_class( nInitialSize, nProbesetSize, nProbesetThreshold, std::forward<hash_tuple_type>(h))
         {}
 
         /// Destructor clears the set
@@ -638,7 +638,7 @@ namespace cds { namespace container {
         bool erase_with( Q const& key, Predicate pred )
         {
             CDS_UNUSED( pred );
-            node_type * pNode = base_class::erase_with( key, typename maker::template predicate_wrapper<Predicate, bool>() );
+            node_type * pNode = base_class::erase_with( key, typename maker::template predicate_wrapper<Predicate, bool>());
             if ( pNode ) {
                 free_node( pNode );
                 return true;
@@ -685,7 +685,7 @@ namespace cds { namespace container {
         bool erase_with( Q const& key, Predicate pred, Func f )
         {
             CDS_UNUSED( pred );
-            node_type * pNode = base_class::erase_with( key, typename maker::template predicate_wrapper<Predicate, bool>() );
+            node_type * pNode = base_class::erase_with( key, typename maker::template predicate_wrapper<Predicate, bool>());
             if ( pNode ) {
                 f( pNode->m_val );
                 free_node( pNode );
@@ -799,7 +799,7 @@ namespace cds { namespace container {
         */
         void clear()
         {
-            return base_class::clear_and_dispose( node_disposer() );
+            return base_class::clear_and_dispose( node_disposer());
         }
 
         /// Checks if the set is empty
index a13438861de3ffa6d435627a50b9c1f3d90e9654..822c204bff1e603ca3f602721e14611f527585b2 100644 (file)
@@ -137,7 +137,7 @@ namespace cds { namespace container {
             void wait_until_shrink_completed( atomics::memory_order order ) const
             {
                 BackOff bkoff;
-                while ( is_shrinking( order ) )
+                while ( is_shrinking( order ))
                     bkoff();
             }
 
@@ -185,14 +185,14 @@ namespace cds { namespace container {
             template <typename Q>
             node( Q&& key )
                 : base_class()
-                , m_key( std::forward<Q>( key ) )
+                , m_key( std::forward<Q>( key ))
                 , m_pNextRemoved( nullptr )
             {}
 
             template <typename Q>
             node( Q&& key, int nHeight, version_type version, node * pParent, node * pLeft, node * pRight )
                 : base_class( nHeight, version, pParent, pLeft, pRight )
-                , m_key( std::forward<Q>( key ) )
+                , m_key( std::forward<Q>( key ))
                 , m_pNextRemoved( nullptr )
             {}
             //@endcond
index b53c4de40b5e6d7530266ac1c3236353c8045bf2..6f963a4d1b9081131332d3537dc5ee745d3f2bc7 100644 (file)
@@ -112,13 +112,13 @@ namespace cds { namespace container {
             /// Initializes key field, value if default-constructed
             template <typename K>
             map_node( K const& key )
-                : m_Value( std::make_pair( key_type(key), mapped_type() ))
+                : m_Value( std::make_pair( key_type(key), mapped_type()))
             {}
 
             /// Initializes key and value fields
             template <typename K, typename Q>
             map_node( K const& key, Q const& v )
-                : m_Value( std::make_pair(key_type(key), mapped_type(v) ))
+                : m_Value( std::make_pair(key_type(key), mapped_type(v)))
             {}
         };
 
index 1be683e6329e9d080d0e8a2bfcc2f1dbdda3602e..ae2f72a3df25274a862b63131d1ae0560730eb92 100644 (file)
@@ -292,7 +292,7 @@ namespace cds { namespace container {
 
                 template <typename Q, typename... Args>
                 node_type( hasher /*h*/, Q&& key, Args&&... args )
-                    : m_Value( std::make_pair( key_type( std::forward<Q>( key )), mapped_type( std::forward<Args>(args)...) ))
+                    : m_Value( std::make_pair( key_type( std::forward<Q>( key )), mapped_type( std::forward<Args>(args)...)))
                 {}
             };
 
index 2c974c932b1a389360a5df57c39961cb11f8f685..dbe53f2a613ec5db54b1b8d9ce3b6e900b70e6bf 100644 (file)
@@ -53,12 +53,12 @@ namespace cds { namespace container {
                 value_type   m_Data;
 
                 node_type( key_type const& key )
-                    : m_Data( key, mapped_type() )
+                    : m_Data( key, mapped_type())
                 {}
 
                 template <typename Q>
                 node_type( Q const& key )
-                    : m_Data( key_type( key ), mapped_type() )
+                    : m_Data( key_type( key ), mapped_type())
                 {}
 
                 template <typename Q, typename R>
@@ -72,7 +72,7 @@ namespace cds { namespace container {
 
                 template <typename R>
                 node_type( key_type const& key, R const& value )
-                    : m_Data( key, mapped_type( value ) )
+                    : m_Data( key, mapped_type( value ))
                 {}
 
                 template <typename Q>
@@ -87,7 +87,7 @@ namespace cds { namespace container {
 
                 template <typename Ky, typename... Args>
                 node_type( Ky&& key, Args&&... args )
-                    : m_Data( key_type( std::forward<Ky>( key )), std::move( mapped_type( std::forward<Args>( args )... ) ) )
+                    : m_Data( key_type( std::forward<Ky>( key )), std::move( mapped_type( std::forward<Args>( args )... )) )
                 {}
             };
 
index 9de92342957480ba9fc0f7f0787c9b59aa33b6a4..c28521fa4d68f7b7aba991a94c5e6089457dd5f7 100644 (file)
@@ -53,12 +53,12 @@ namespace cds { namespace container {
                 pair_type               m_Data;
 
                 node_type( key_type const& key )
-                    : m_Data( key, value_type() )
+                    : m_Data( key, value_type())
                 {}
 
                 template <typename Q>
                 node_type( Q const& key )
-                    : m_Data( key_type(key), value_type() )
+                    : m_Data( key_type(key), value_type())
                 {}
 
                 template <typename Q, typename R>
index 5c808a3b4ef9a83fd6d40ee6cdfa0f9474efd761..cc34b391e3e7ccbe3f70938d2839bf699835ba6e 100644 (file)
@@ -58,7 +58,7 @@ namespace cds { namespace container { namespace details {
 
             template <typename Q>
             node_type( unsigned int nHeight, atomic_marked_ptr * pTower, Q const& key )
-                : m_Value( std::make_pair( key, mapped_type() ))
+                : m_Value( std::make_pair( key, mapped_type()))
             {
                 init_tower( nHeight, pTower );
             }
index 9bb3a25624d3642ffcf959e277023b13202e254f..f38edb5e3c7f40bbaa8d9bba5af1e92d776800e5 100644 (file)
@@ -114,7 +114,7 @@ namespace cds { namespace container { namespace details {
 
                 size_t operator()(node_type const& v ) const
                 {
-                    return base_class::operator()( key_accessor()( v.m_Value ) );
+                    return base_class::operator()( key_accessor()( v.m_Value ));
                 }
                 template <typename Q>
                 size_t operator()( Q const& k ) const
index 143550749c3b3ddc6f0780e758f7759ee83328ab..73ff261431eb834989fdf0e676fc36488427f8e7 100644 (file)
@@ -119,7 +119,7 @@ namespace cds { namespace container { namespace details {
 
                 size_t operator()(node_type const& v ) const
                 {
-                    return base_class::operator()( key_accessor()( v.m_Value ) );
+                    return base_class::operator()( key_accessor()( v.m_Value ));
                 }
                 template <typename Q>
                 size_t operator()( Q const& k ) const
index 383f7ef57fb68754a77388de523fe558383a2186..a737ec42727030637243d6091320aee9bc41fd1e 100644 (file)
@@ -173,7 +173,7 @@ namespace cds { namespace container {
                 static unsigned char * alloc_space( unsigned int nHeight )
                 {
                     if ( nHeight > 1 ) {
-                        unsigned char * pMem = tower_allocator_type().allocate( node_size(nHeight) );
+                        unsigned char * pMem = tower_allocator_type().allocate( node_size(nHeight));
 
                         // check proper alignments
                         assert( (((uintptr_t) pMem) & (alignof(node_type) - 1)) == 0 );
index 19e78617f6c1513fd2521cfa636caaf281ed7504..e7f4c90f856d4fc1cf63dc41768027ec2fec96cd 100644 (file)
@@ -438,7 +438,7 @@ namespace cds { namespace container {
         {
             CDS_UNUSED( pred );
             return exempt_ptr( base_class::extract_with_( key,
-                cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() ));
+                cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >()));
         }
 
         /// Find the key \p key
@@ -512,7 +512,7 @@ namespace cds { namespace container {
         bool contains( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() );
+            return base_class::contains( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >());
         }
         //@cond
         template <typename K, typename Less>
index 57f6ea8cf0f832c9d26a4e0f747b23907fe3ae65..1723e80ad1d818156aef6f1e2ae04a8c6233da7f 100644 (file)
@@ -204,7 +204,7 @@ namespace cds { namespace container {
         bool insert( Q const& val )
         {
             scoped_node_ptr sp( cxx_leaf_node_allocator().New( val ));
-            if ( base_class::insert( *sp.get() )) {
+            if ( base_class::insert( *sp.get())) {
                 sp.release();
                 return true;
             }
@@ -297,7 +297,7 @@ namespace cds { namespace container {
         bool emplace( Args&&... args )
         {
             scoped_node_ptr sp( cxx_leaf_node_allocator().MoveNew( std::forward<Args>(args)... ));
-            if ( base_class::insert( *sp.get() )) {
+            if ( base_class::insert( *sp.get())) {
                 sp.release();
                 return true;
             }
@@ -448,7 +448,7 @@ namespace cds { namespace container {
         {
             CDS_UNUSED( pred );
             return exempt_ptr( base_class::extract_with_( key,
-                cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >() ));
+                cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >()));
         }
 
         /// Find the key \p key
@@ -600,7 +600,7 @@ namespace cds { namespace container {
             this sequence
             \code
             set.clear();
-            assert( set.empty() );
+            assert( set.empty());
             \endcode
             the assertion could be raised.
 
index ce1691083a76a473a9abc687eee35879e9258700..1a27fea6bc472cedc5aefead55aad337aa5893a0 100644 (file)
@@ -208,7 +208,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_push_front, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPushFront();
             return true;
@@ -230,7 +230,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_push_front_move, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPushFrontMove();
             return true;
@@ -252,7 +252,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_push_back, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPushBack();
             return true;
@@ -274,7 +274,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_push_back_move, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPushBackMove();
             return true;
@@ -297,7 +297,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_pop_front, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPopFront( pRec->bEmpty );
             return !pRec->bEmpty;
@@ -320,7 +320,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_pop_back, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPopBack( pRec->bEmpty );
             return !pRec->bEmpty;
@@ -336,7 +336,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_clear, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
         }
 
@@ -384,22 +384,22 @@ namespace cds { namespace container {
             // this function is called under FC mutex, so switch TSan off
             CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
 
-            switch ( pRec->op() ) {
+            switch ( pRec->op()) {
             case op_push_front:
                 assert( pRec->pValPush );
-                m_Deque.push_front( *(pRec->pValPush) );
+                m_Deque.push_front( *(pRec->pValPush));
                 break;
             case op_push_front_move:
                 assert( pRec->pValPush );
-                m_Deque.push_front( std::move( *(pRec->pValPush )) );
+                m_Deque.push_front( std::move( *(pRec->pValPush )));
                 break;
             case op_push_back:
                 assert( pRec->pValPush );
-                m_Deque.push_back( *(pRec->pValPush) );
+                m_Deque.push_back( *(pRec->pValPush));
                 break;
             case op_push_back_move:
                 assert( pRec->pValPush );
-                m_Deque.push_back( std::move( *(pRec->pValPush )) );
+                m_Deque.push_back( std::move( *(pRec->pValPush )));
                 break;
             case op_pop_front:
                 assert( pRec->pValPop );
@@ -418,7 +418,7 @@ namespace cds { namespace container {
                 }
                 break;
             case op_clear:
-                while ( !m_Deque.empty() )
+                while ( !m_Deque.empty())
                     m_Deque.pop_front();
                 break;
             default:
@@ -437,10 +437,10 @@ namespace cds { namespace container {
             CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
 
             for ( fc_iterator it = itBegin, itPrev = itEnd; it != itEnd; ++it ) {
-                switch ( it->op() ) {
+                switch ( it->op()) {
                 case op_push_front:
                     if ( itPrev != itEnd
-                        && (itPrev->op() == op_pop_front || (m_Deque.empty() && itPrev->op() == op_pop_back)) )
+                        && (itPrev->op() == op_pop_front || (m_Deque.empty() && itPrev->op() == op_pop_back)))
                     {
                         collide( *it, *itPrev );
                         itPrev = itEnd;
@@ -460,7 +460,7 @@ namespace cds { namespace container {
                     break;
                 case op_push_back:
                     if ( itPrev != itEnd
-                        && (itPrev->op() == op_pop_back || (m_Deque.empty() && itPrev->op() == op_pop_front)) )
+                        && (itPrev->op() == op_pop_back || (m_Deque.empty() && itPrev->op() == op_pop_front)))
                     {
                         collide( *it, *itPrev );
                         itPrev = itEnd;
@@ -480,8 +480,8 @@ namespace cds { namespace container {
                     break;
                 case op_pop_front:
                     if ( itPrev != itEnd ) {
-                        if ( m_Deque.empty() ) {
-                            switch ( itPrev->op() ) {
+                        if ( m_Deque.empty()) {
+                            switch ( itPrev->op()) {
                             case op_push_back:
                                 collide( *itPrev, *it );
                                 itPrev = itEnd;
@@ -496,7 +496,7 @@ namespace cds { namespace container {
                             }
                         }
                         else {
-                            switch ( itPrev->op() ) {
+                            switch ( itPrev->op()) {
                             case op_push_front:
                                 collide( *itPrev, *it );
                                 itPrev = itEnd;
@@ -516,8 +516,8 @@ namespace cds { namespace container {
                     break;
                 case op_pop_back:
                     if ( itPrev != itEnd ) {
-                        if ( m_Deque.empty() ) {
-                            switch ( itPrev->op() ) {
+                        if ( m_Deque.empty()) {
+                            switch ( itPrev->op()) {
                             case op_push_front:
                                 collide( *itPrev, *it );
                                 itPrev = itEnd;
@@ -532,7 +532,7 @@ namespace cds { namespace container {
                             }
                         }
                         else {
-                            switch ( itPrev->op() ) {
+                            switch ( itPrev->op()) {
                             case op_push_back:
                                 collide( *itPrev, *it );
                                 itPrev = itEnd;
index 13bcde0774f70b40c2a3e1c95927c381304c104c..d8d164629b1de5e17b0dce12478172958a581dce 100644 (file)
@@ -183,7 +183,7 @@ namespace cds { namespace container {
 
             m_FlatCombining.combine( op_push, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPush();
             return true;
@@ -202,7 +202,7 @@ namespace cds { namespace container {
 
             m_FlatCombining.combine( op_push_move, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPushMove();
             return true;
@@ -222,7 +222,7 @@ namespace cds { namespace container {
 
             m_FlatCombining.combine( op_pop, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPop( pRec->bEmpty );
             return !pRec->bEmpty;
@@ -235,7 +235,7 @@ namespace cds { namespace container {
 
            m_FlatCombining.combine( op_clear, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
         }
 
@@ -282,14 +282,14 @@ namespace cds { namespace container {
             // this function is called under FC mutex, so switch TSan off
             CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
 
-            switch ( pRec->op() ) {
+            switch ( pRec->op()) {
             case op_push:
                 assert( pRec->pValPush );
-                m_PQueue.push( *(pRec->pValPush) );
+                m_PQueue.push( *(pRec->pValPush));
                 break;
             case op_push_move:
                 assert( pRec->pValPush );
-                m_PQueue.push( std::move( *(pRec->pValPush )) );
+                m_PQueue.push( std::move( *(pRec->pValPush )));
                 break;
             case op_pop:
                 assert( pRec->pValPop );
@@ -300,7 +300,7 @@ namespace cds { namespace container {
                 }
                 break;
             case op_clear:
-                while ( !m_PQueue.empty() )
+                while ( !m_PQueue.empty())
                     m_PQueue.pop();
                 break;
             default:
index 03daa01461f7ef2d47dc22e53af13e75d44d9860..7da19de89d310d8c82c2dd47d61df9ce4fd011c9 100644 (file)
@@ -194,7 +194,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_enq, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onEnqueue();
             return true;
@@ -220,7 +220,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_enq_move, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
 
             m_FlatCombining.internal_statistics().onEnqMove();
@@ -247,7 +247,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_deq, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
 
             m_FlatCombining.internal_statistics().onDequeue( pRec->bEmpty );
@@ -270,7 +270,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_clear, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
         }
 
@@ -318,14 +318,14 @@ namespace cds { namespace container {
             // this function is called under FC mutex, so switch TSan off
             CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
 
-            switch ( pRec->op() ) {
+            switch ( pRec->op()) {
             case op_enq:
                 assert( pRec->pValEnq );
-                m_Queue.push( *(pRec->pValEnq ) );
+                m_Queue.push( *(pRec->pValEnq ));
                 break;
             case op_enq_move:
                 assert( pRec->pValEnq );
-                m_Queue.push( std::move( *(pRec->pValEnq )) );
+                m_Queue.push( std::move( *(pRec->pValEnq )));
                 break;
             case op_deq:
                 assert( pRec->pValDeq );
@@ -336,7 +336,7 @@ namespace cds { namespace container {
                 }
                 break;
             case op_clear:
-                while ( !m_Queue.empty() )
+                while ( !m_Queue.empty())
                     m_Queue.pop();
                 break;
             default:
@@ -355,11 +355,11 @@ namespace cds { namespace container {
             CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
 
             for ( fc_iterator it = itBegin, itPrev = itEnd; it != itEnd; ++it ) {
-                switch ( it->op() ) {
+                switch ( it->op()) {
                 case op_enq:
                 case op_enq_move:
                 case op_deq:
-                    if ( m_Queue.empty() ) {
+                    if ( m_Queue.empty()) {
                         if ( itPrev != itEnd && collide( *itPrev, *it ))
                             itPrev = itEnd;
                         else
@@ -376,7 +376,7 @@ namespace cds { namespace container {
         //@cond
         bool collide( fc_record& rec1, fc_record& rec2 )
         {
-            switch ( rec1.op() ) {
+            switch ( rec1.op()) {
                 case op_enq:
                     if ( rec2.op() == op_deq ) {
                         assert(rec1.pValEnq);
@@ -396,7 +396,7 @@ namespace cds { namespace container {
                     }
                     break;
                 case op_deq:
-                    switch ( rec2.op() ) {
+                    switch ( rec2.op()) {
                     case op_enq:
                     case op_enq_move:
                         return collide( rec2, rec1 );
index 5c5e14736e22d214beb1918a124124184d0d0032..87521a535968058653a5e87f141f3f55cac39260 100644 (file)
@@ -191,7 +191,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_push, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPush();
             return true;
@@ -211,7 +211,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_push_move, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
 
             m_FlatCombining.internal_statistics().onPushMove();
@@ -232,7 +232,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_pop, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
 
             m_FlatCombining.internal_statistics().onPop( pRec->bEmpty );
@@ -249,7 +249,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_clear, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
         }
 
@@ -277,7 +277,7 @@ namespace cds { namespace container {
             else
                 m_FlatCombining.combine( op_empty, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             return pRec->bEmpty;
         }
@@ -303,14 +303,14 @@ namespace cds { namespace container {
 
             // this function is called under FC mutex, so switch TSan off
             CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
-            switch ( pRec->op() ) {
+            switch ( pRec->op()) {
             case op_push:
                 assert( pRec->pValPush );
-                m_Stack.push( *(pRec->pValPush ) );
+                m_Stack.push( *(pRec->pValPush ));
                 break;
             case op_push_move:
                 assert( pRec->pValPush );
-                m_Stack.push( std::move( *(pRec->pValPush )) );
+                m_Stack.push( std::move( *(pRec->pValPush )));
                 break;
             case op_pop:
                 assert( pRec->pValPop );
@@ -321,7 +321,7 @@ namespace cds { namespace container {
                 }
                 break;
             case op_clear:
-                while ( !m_Stack.empty() )
+                while ( !m_Stack.empty())
                     m_Stack.pop();
                 break;
             case op_empty:
@@ -342,7 +342,7 @@ namespace cds { namespace container {
 
             typedef typename fc_kernel::iterator fc_iterator;
             for ( fc_iterator it = itBegin, itPrev = itEnd; it != itEnd; ++it ) {
-                switch ( it->op() ) {
+                switch ( it->op()) {
                 case op_push:
                 case op_push_move:
                 case op_pop:
@@ -361,7 +361,7 @@ namespace cds { namespace container {
         //@cond
         bool collide( fc_record& rec1, fc_record& rec2 )
         {
-            switch ( rec1.op() ) {
+            switch ( rec1.op()) {
                 case op_push:
                     if ( rec2.op() == op_pop ) {
                         assert(rec1.pValPush);
@@ -381,7 +381,7 @@ namespace cds { namespace container {
                     }
                     break;
                 case op_pop:
-                    switch ( rec2.op() ) {
+                    switch ( rec2.op()) {
                     case op_push:
                     case op_push_move:
                         return collide( rec2, rec1 );
index f356748d7c9d97c1e7fb5907564671e40a071291..8394c9834609b54dff009f3ee28cc05d3a2a60a4 100644 (file)
@@ -352,7 +352,7 @@ namespace cds { namespace container {
         template <typename K>
         bool insert( K&& key )
         {
-            scoped_node_ptr sp( cxx_node_allocator().MoveNew( m_Hasher, std::forward<K>(key) ));
+            scoped_node_ptr sp( cxx_node_allocator().MoveNew( m_Hasher, std::forward<K>(key)));
             if ( base_class::insert( *sp )) {
                 sp.release();
                 return true;
@@ -566,7 +566,7 @@ namespace cds { namespace container {
         template <typename K>
         bool contains( K const& key )
         {
-            return base_class::contains( m_Hasher( key_type( key )) );
+            return base_class::contains( m_Hasher( key_type( key )));
         }
 
         /// Find the key \p key
index 29805b0bba9fb6de7e6ddf1ddaa4fc1d489979ae..e5dd40c049a7a6be77a6c19d6c951a2a1df11be1 100644 (file)
@@ -231,7 +231,7 @@ namespace cds { namespace container {
 
             void clean()
             {
-                assert( !gc::is_locked() );
+                assert( !gc::is_locked());
 
                 // TODO: use RCU::batch_retire
 
@@ -675,7 +675,7 @@ namespace cds { namespace container {
             this sequence
             \code
             set.clear();
-            assert( set.empty() );
+            assert( set.empty());
             \endcode
             the assertion could be raised.
 
@@ -685,7 +685,7 @@ namespace cds { namespace container {
         */
         void clear()
         {
-            while ( extract_min() );
+            while ( extract_min());
         }
 
         /// Clears the tree (not thread safe)
@@ -962,7 +962,7 @@ namespace cds { namespace container {
         template <typename Q, typename Compare, typename Func>
         find_result try_find( Q const& key, Compare cmp, Func f, node_type * pNode, int nDir, version_type nVersion ) const
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
             assert( pNode );
 
             struct stack_record
@@ -997,12 +997,12 @@ namespace cds { namespace container {
 
                     int nCmp = cmp( key, pChild->m_key );
                     if ( nCmp == 0 ) {
-                        if ( pChild->is_valued( memory_model::memory_order_acquire ) ) {
+                        if ( pChild->is_valued( memory_model::memory_order_acquire )) {
                             // key found
                             node_scoped_lock l( m_Monitor, *pChild );
                             if ( child(pNode, nDir, memory_model::memory_order_acquire) == pChild ) {
                                 if ( pChild->is_valued( memory_model::memory_order_relaxed )) {
-                                    if ( f( pChild ) ) {
+                                    if ( f( pChild )) {
                                         m_stat.onFindSuccess();
                                         return find_result::found;
                                     }
@@ -1059,7 +1059,7 @@ namespace cds { namespace container {
         template <typename K, typename Compare, typename Func>
         int try_update_root( K const& key, Compare cmp, int nFlags, Func funcUpdate, rcu_disposer& disp )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             while ( true ) {
                 int result;
@@ -1114,7 +1114,7 @@ namespace cds { namespace container {
         template <typename K, typename Compare, typename Func>
         bool try_remove_root( K const& key, Compare cmp, Func func, rcu_disposer& disp )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             while ( true ) {
                 int result;
@@ -1149,7 +1149,7 @@ namespace cds { namespace container {
         template <typename K, typename Compare, typename Func>
         int try_update( K const& key, Compare cmp, int nFlags, Func funcUpdate, node_type * pNode, version_type nVersion, rcu_disposer& disp )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
             assert( nVersion != node_type::unlinked );
 
             struct stack_record
@@ -1237,7 +1237,7 @@ namespace cds { namespace container {
         template <typename K, typename Compare, typename Func>
         int try_remove( K const& key, Compare cmp, Func func, node_type * pParent, node_type * pNode, version_type nVersion, rcu_disposer& disp )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
             assert( nVersion != node_type::unlinked );
 
             struct stack_record
@@ -1317,7 +1317,7 @@ namespace cds { namespace container {
         template <typename Func>
         int try_extract_minmax( int nDir, Func func, node_type * pParent, node_type * pNode, version_type nVersion, rcu_disposer& disp )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
             assert( nVersion != node_type::unlinked );
 
             struct stack_record
@@ -1468,7 +1468,7 @@ namespace cds { namespace container {
                     return update_flags::retry;
                 }
 
-                if ( pNode->is_valued( memory_model::memory_order_relaxed ) && !(nFlags & update_flags::allow_update) ) {
+                if ( pNode->is_valued( memory_model::memory_order_relaxed ) && !(nFlags & update_flags::allow_update)) {
                     m_stat.onInsertFailed();
                     return update_flags::failed;
                 }
@@ -1505,7 +1505,7 @@ namespace cds { namespace container {
             assert( pParent != nullptr );
             assert( pNode != nullptr );
 
-            if ( !pNode->is_valued( memory_model::memory_order_acquire ) )
+            if ( !pNode->is_valued( memory_model::memory_order_acquire ))
                 return update_flags::failed;
 
             if ( child( pNode, left_child, memory_model::memory_order_acquire ) == nullptr
@@ -1574,7 +1574,7 @@ namespace cds { namespace container {
         bool try_unlink_locked( node_type * pParent, node_type * pNode, rcu_disposer& disp )
         {
             // pParent and pNode must be locked
-            assert( !pParent->is_unlinked(memory_model::memory_order_relaxed) );
+            assert( !pParent->is_unlinked(memory_model::memory_order_relaxed));
 
             node_type * pParentLeft = child( pParent, left_child, memory_model::memory_order_relaxed );
             node_type * pParentRight = child( pParent, right_child, memory_model::memory_order_relaxed );
@@ -1666,7 +1666,7 @@ namespace cds { namespace container {
         {
             while ( pNode && parent( pNode, memory_model::memory_order_acquire )) {
                 int nCond = estimate_node_condition( pNode );
-                if ( nCond == nothing_required || pNode->is_unlinked( memory_model::memory_order_acquire ) )
+                if ( nCond == nothing_required || pNode->is_unlinked( memory_model::memory_order_acquire ))
                     return;
 
                 if ( nCond != unlink_required && nCond != rebalance_required )
@@ -1904,7 +1904,7 @@ namespace cds { namespace container {
             }
 
             // pLeft might also have routing node damage (if pLeft.left was null)
-            if ( hLL == 0 && !pLeft->is_valued(memory_model::memory_order_acquire) ) {
+            if ( hLL == 0 && !pLeft->is_valued(memory_model::memory_order_acquire)) {
                 m_stat.onDamageAfterRightRotation();
                 return pLeft;
             }
@@ -1956,7 +1956,7 @@ namespace cds { namespace container {
                 return pNode;
             }
 
-            if ( (pRLeft == nullptr || hL == 0) && !pNode->is_valued(memory_model::memory_order_relaxed) ) {
+            if ( (pRLeft == nullptr || hL == 0) && !pNode->is_valued(memory_model::memory_order_relaxed)) {
                 m_stat.onRemoveAfterLeftRotation();
                 return pNode;
             }
@@ -1967,7 +1967,7 @@ namespace cds { namespace container {
                 return pRight;
             }
 
-            if ( hRR == 0 && !pRight->is_valued(memory_model::memory_order_acquire) ) {
+            if ( hRR == 0 && !pRight->is_valued(memory_model::memory_order_acquire)) {
                 m_stat.onDamageAfterLeftRotation();
                 return pRight;
             }
@@ -2114,7 +2114,7 @@ namespace cds { namespace container {
                 return pNode;
             }
 
-            if ( (pRLL == nullptr || hL == 0) && !pNode->is_valued(memory_model::memory_order_relaxed) ) {
+            if ( (pRLL == nullptr || hL == 0) && !pNode->is_valued(memory_model::memory_order_relaxed)) {
                 m_stat.onRemoveAfterLRRotation();
                 return pNode;
             }
index 7e1cb48dc3e44a30e6cf234fc3cd96ed76e3f0e5..1949c7fb8c79a71a6dfee1ef79e0ea23126b8b84 100644 (file)
@@ -489,7 +489,7 @@ namespace cds { namespace container {
         bool contains( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() );
+            return base_class::contains( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >());
         }
         //@cond
         template <typename K, typename Less>
@@ -527,7 +527,7 @@ namespace cds { namespace container {
         {
             CDS_UNUSED( pred );
             return guarded_ptr( base_class::get_with_( key,
-                cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() ));
+                cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >()));
         }
 
         /// Clears the map (not atomic)
index b3e8a43adb9af278a8e1f6a0875ee9eff9a12b88..282c72610b2c17d23ef74455d8f6b3d41f446a87 100644 (file)
@@ -201,7 +201,7 @@ namespace cds { namespace container {
         bool insert( Q const& val )
         {
             scoped_node_ptr sp( cxx_leaf_node_allocator().New( val ));
-            if ( base_class::insert( *sp.get() )) {
+            if ( base_class::insert( *sp.get())) {
                 sp.release();
                 return true;
             }
@@ -291,7 +291,7 @@ namespace cds { namespace container {
         bool emplace( Args&&... args )
         {
             scoped_node_ptr sp( cxx_leaf_node_allocator().MoveNew( std::forward<Args>(args)... ));
-            if ( base_class::insert( *sp.get() )) {
+            if ( base_class::insert( *sp.get())) {
                 sp.release();
                 return true;
             }
@@ -566,7 +566,7 @@ namespace cds { namespace container {
         {
             CDS_UNUSED(pred);
             return base_class::get_with_( key,
-                cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >() );
+                cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >());
         }
 
         /// Clears the set (not atomic)
@@ -576,7 +576,7 @@ namespace cds { namespace container {
             this sequence
             \code
             set.clear();
-            assert( set.empty() );
+            assert( set.empty());
             \endcode
             the assertion could be raised.
 
index 9046679ffea4b88499c6334d0f012d1071bdf613..c393492336d44a069f2d41c09ea3594646a13e2a 100644 (file)
@@ -384,7 +384,7 @@ namespace cds { namespace container {
         template <typename K>
         bool insert( K&& key )
         {
-            scoped_node_ptr sp( cxx_node_allocator().MoveNew( m_Hasher, std::forward<K>( key ) ));
+            scoped_node_ptr sp( cxx_node_allocator().MoveNew( m_Hasher, std::forward<K>( key )));
             if ( base_class::insert( *sp )) {
                 sp.release();
                 return true;
@@ -603,7 +603,7 @@ namespace cds { namespace container {
         template <typename K>
         bool contains( K const& key )
         {
-            return base_class::contains( m_Hasher( key_type( key )) );
+            return base_class::contains( m_Hasher( key_type( key )));
         }
 
         /// Find the key \p key
index f684a75749982c1ee83a1978d697303ceb585582..3595b9ecc76bf5a89b11d10553c506ab374c4953 100644 (file)
@@ -217,7 +217,7 @@ namespace cds { namespace container {
             this code
             \code
                 if ( it1 == it2 )
-                    assert( &(*it1) == &(*it2) );
+                    assert( &(*it1) == &(*it2));
             \endcode
             can throw assertion. The point is that the iterator stores the value of element which can be modified later by other thread.
             The guard inside the iterator prevents recycling that value so the iterator's value remains valid even after such changing.
@@ -409,7 +409,7 @@ namespace cds { namespace container {
         bool erase_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::erase_with( key, less_wrapper<Less>() );
+            return base_class::erase_with( key, less_wrapper<Less>());
         }
 
         /// Deletes \p key from the list
@@ -491,7 +491,7 @@ namespace cds { namespace container {
         guarded_ptr extract_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::extract_with( key, less_wrapper<Less>() );
+            return base_class::extract_with( key, less_wrapper<Less>());
         }
 
         /// Checks whether the list contains \p key
@@ -515,7 +515,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred ) const
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, less_wrapper<Less>() );
+            return base_class::contains( key, less_wrapper<Less>());
         }
 
         /// Finds the key \p key and performs an action with it
@@ -625,7 +625,7 @@ namespace cds { namespace container {
         guarded_ptr get_with( K const& key, Less pred ) const
         {
             CDS_UNUSED( pred );
-            return base_class::get_with( key, less_wrapper<Less>() );
+            return base_class::get_with( key, less_wrapper<Less>());
         }
 
         /// Checks if the list is empty
@@ -668,7 +668,7 @@ namespace cds { namespace container {
         template <typename K>
         bool insert_at( head_type& refHead, K&& key )
         {
-            return base_class::insert_at( refHead, value_type( key_type( std::forward<K>( key )), mapped_type() ));
+            return base_class::insert_at( refHead, value_type( key_type( std::forward<K>( key )), mapped_type()));
         }
 
         template <typename K, typename V>
index c4922921b1b495f6aff2472eb00a6012b5d31af2..b8dbe688734aeb6797db73c7a1aa4ba403966ac9 100644 (file)
@@ -265,7 +265,7 @@ namespace cds { namespace container {
             this code
             \code
                 if ( it1 == it2 )
-                    assert( &(*it1) == &(*it2) );
+                    assert( &(*it1) == &(*it2));
             \endcode
             can throw assertion. The point is that the iterator stores the value of element which can be modified later by other thread.
             The guard inside the iterator prevents recycling that value so the iterator's value remains valid even after such changing.
@@ -285,7 +285,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( base_class::begin() );
+            return iterator( base_class::begin());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a list
@@ -304,13 +304,13 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            return const_iterator( base_class::cbegin() );
+            return const_iterator( base_class::cbegin());
         }
 
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            return const_iterator( base_class::cbegin() );
+            return const_iterator( base_class::cbegin());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a list
@@ -552,7 +552,7 @@ namespace cds { namespace container {
         template <typename Q>
         guarded_ptr extract( Q const& key )
         {
-            return extract_at( head(), key, key_comparator() );
+            return extract_at( head(), key, key_comparator());
         }
 
         /// Extracts the item from the list with comparing functor \p pred
@@ -567,7 +567,7 @@ namespace cds { namespace container {
         guarded_ptr extract_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Checks whether the list contains \p key
@@ -578,7 +578,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool contains( Q const& key ) const
         {
-            return find_at( head(), key, key_comparator() );
+            return find_at( head(), key, key_comparator());
         }
 
         /// Checks whether the list contains \p key using \p pred predicate for searching
@@ -591,7 +591,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred ) const
         {
             CDS_UNUSED( pred );
-            return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Finds \p key and perform an action with it
@@ -700,7 +700,7 @@ namespace cds { namespace container {
         template <typename Q>
         guarded_ptr get( Q const& key ) const
         {
-            return get_at( head(), key, key_comparator() );
+            return get_at( head(), key, key_comparator());
         }
 
         /// Finds \p key and return the item found
@@ -716,7 +716,7 @@ namespace cds { namespace container {
         guarded_ptr get_with( Q const& key, Less pred ) const
         {
             CDS_UNUSED( pred );
-            return get_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return get_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Checks if the list is empty
index 218bc87c4a62c0b554fbe6b9156d4ed47e7b319f..0872686189ea41a209718f02034fcdd1c2cb991a 100644 (file)
@@ -231,10 +231,10 @@ namespace cds { namespace container {
             typedef typename base_class::template iterator_type<IsConst>    iterator_base;
 
             iterator_type( head_type const& pNode )
-                : iterator_base( const_cast<head_type *>(&pNode) )
+                : iterator_base( const_cast<head_type *>(&pNode))
             {}
             iterator_type( head_type const * pNode )
-                : iterator_base( const_cast<head_type *>(pNode) )
+                : iterator_base( const_cast<head_type *>(pNode))
             {}
 
             friend class LazyKVList;
@@ -337,7 +337,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            iterator it( head() );
+            iterator it( head());
             ++it ;  // skip dummy head
             return it;
         }
@@ -352,13 +352,13 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( tail() );
+            return iterator( tail());
         }
 
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it;   // skip dummy head
             return it;
         }
@@ -366,7 +366,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it;   // skip dummy head
             return it;
         }
@@ -527,7 +527,7 @@ namespace cds { namespace container {
         template <typename K>
         bool erase( K const& key )
         {
-            return erase_at( head(), key, intrusive_key_comparator() );
+            return erase_at( head(), key, intrusive_key_comparator());
         }
 
         /// Deletes the item from the list using \p pred predicate for searching
@@ -541,7 +541,7 @@ namespace cds { namespace container {
         bool erase_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return erase_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return erase_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Deletes \p key from the list
@@ -606,7 +606,7 @@ namespace cds { namespace container {
         template <typename K>
         guarded_ptr extract( K const& key )
         {
-            return extract_at( head(), key, intrusive_key_comparator() );
+            return extract_at( head(), key, intrusive_key_comparator());
         }
 
         /// Extracts the item from the list with comparing functor \p pred
@@ -622,7 +622,7 @@ namespace cds { namespace container {
         guarded_ptr extract_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Checks whether the list contains \p key
@@ -633,7 +633,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool contains( Q const& key )
         {
-            return find_at( head(), key, intrusive_key_comparator() );
+            return find_at( head(), key, intrusive_key_comparator());
         }
         //@cond
         template <typename Q>
@@ -654,7 +654,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
         //@cond
         template <typename Q, typename Less>
@@ -732,7 +732,7 @@ namespace cds { namespace container {
         template <typename K>
         guarded_ptr get( K const& key )
         {
-            return get_at( head(), key, intrusive_key_comparator() );
+            return get_at( head(), key, intrusive_key_comparator());
         }
 
         /// Finds the key \p val and return the item found
@@ -748,7 +748,7 @@ namespace cds { namespace container {
         guarded_ptr get_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return get_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return get_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Checks if the list is empty
index dfe95d08d582be675a4013f6468408a74e44235a..726d564a543b2dc1763a175072214c85c2f33639 100644 (file)
@@ -273,7 +273,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            iterator it( head() );
+            iterator it( head());
             ++it        ;   // skip dummy head node
             return it;
         }
@@ -287,13 +287,13 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( tail() );
+            return iterator( tail());
         }
 
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it        ;   // skip dummy head node
             return it;
         }
@@ -301,7 +301,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it        ;   // skip dummy head node
             return it;
         }
@@ -309,13 +309,13 @@ namespace cds { namespace container {
         /// Returns an const iterator that addresses the location succeeding the last element in a list
         const_iterator end() const
         {
-            return const_iterator( tail() );
+            return const_iterator( tail());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a list
         const_iterator cend() const
         {
-            return const_iterator( tail() );
+            return const_iterator( tail());
         }
     //@}
 
@@ -532,7 +532,7 @@ namespace cds { namespace container {
         template <typename Q>
         guarded_ptr extract( Q const& key )
         {
-            return extract_at( head(), key, intrusive_key_comparator() );
+            return extract_at( head(), key, intrusive_key_comparator());
         }
 
         /// Extracts the item from the list with comparing functor \p pred
@@ -548,7 +548,7 @@ namespace cds { namespace container {
         guarded_ptr extract_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Checks whether the list contains \p key
@@ -559,7 +559,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool contains( Q const& key )
         {
-            return find_at( head(), key, intrusive_key_comparator() );
+            return find_at( head(), key, intrusive_key_comparator());
         }
         //@cond
         template <typename Q>
@@ -580,7 +580,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
         //@cond
         template <typename Q, typename Less>
@@ -675,7 +675,7 @@ namespace cds { namespace container {
         template <typename Q>
         guarded_ptr get( Q const& key )
         {
-            return get_at( head(), key, intrusive_key_comparator() );
+            return get_at( head(), key, intrusive_key_comparator());
         }
 
         /// Finds the key \p key and return the item found
@@ -691,7 +691,7 @@ namespace cds { namespace container {
         guarded_ptr get_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return get_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return get_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Checks whether the list is empty
@@ -809,7 +809,7 @@ namespace cds { namespace container {
         {
             scoped_node_ptr pNode( alloc_node( std::forward<Q>( key )));
 
-            if ( base_class::insert_at( &refHead, *pNode, [&f](node_type& node){ f( node_to_value(node) ); } )) {
+            if ( base_class::insert_at( &refHead, *pNode, [&f](node_type& node){ f( node_to_value(node)); } )) {
                 pNode.release();
                 return true;
             }
@@ -819,7 +819,7 @@ namespace cds { namespace container {
         template <typename Q, typename Compare, typename Func>
         bool erase_at( head_type& refHead, Q const& key, Compare cmp, Func f )
         {
-            return base_class::erase_at( &refHead, key, cmp, [&f](node_type const& node){ f( node_to_value(node) ); } );
+            return base_class::erase_at( &refHead, key, cmp, [&f](node_type const& node){ f( node_to_value(node)); } );
         }
 
         template <typename Q, typename Compare>
index 72602e10fda9549d185e6d4a1378c15fceb352ef..2d22b8e1e1d8021ce81c68582acb108194cc719a 100644 (file)
@@ -326,7 +326,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( head() );
+            return iterator( head());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a list
@@ -345,13 +345,13 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
 
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a list
@@ -525,7 +525,7 @@ namespace cds { namespace container {
         template <typename K>
         bool erase( K const& key )
         {
-            return erase_at( head(), key, intrusive_key_comparator() );
+            return erase_at( head(), key, intrusive_key_comparator());
         }
 
         /// Deletes the item from the list using \p pred predicate for searching
@@ -539,7 +539,7 @@ namespace cds { namespace container {
         bool erase_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return erase_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return erase_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Deletes \p key from the list
@@ -609,7 +609,7 @@ namespace cds { namespace container {
         template <typename K>
         guarded_ptr extract( K const& key )
         {
-            return extract_at( head(), key, intrusive_key_comparator() );
+            return extract_at( head(), key, intrusive_key_comparator());
         }
 
         /// Extracts the item from the list with comparing functor \p pred
@@ -625,7 +625,7 @@ namespace cds { namespace container {
         guarded_ptr extract_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Checks whether the list contains \p key
@@ -636,7 +636,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool contains( Q const& key )
         {
-            return find_at( head(), key, intrusive_key_comparator() );
+            return find_at( head(), key, intrusive_key_comparator());
         }
         //@cond
         template <typename Q>
@@ -657,7 +657,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
         //@cond
         template <typename Q, typename Less>
@@ -736,7 +736,7 @@ namespace cds { namespace container {
         template <typename K>
         guarded_ptr get( K const& key )
         {
-            return get_at( head(), key, intrusive_key_comparator() );
+            return get_at( head(), key, intrusive_key_comparator());
         }
 
         /// Finds the \p key and return the item found
@@ -752,7 +752,7 @@ namespace cds { namespace container {
         guarded_ptr get_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return get_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return get_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Checks if the list is empty
index 048dba0fdb28641a21f67c6aa8f04a528d982f21..fdf9351dbfd09e65e2f90d71560ef30f230e6697 100644 (file)
@@ -264,7 +264,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( head() );
+            return iterator( head());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a list
@@ -283,13 +283,13 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
 
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a list
@@ -525,7 +525,7 @@ namespace cds { namespace container {
         template <typename Q>
         guarded_ptr extract( Q const& key )
         {
-            return extract_at( head(), key, intrusive_key_comparator() );
+            return extract_at( head(), key, intrusive_key_comparator());
         }
 
         /// Extracts the item from the list with comparing functor \p pred
@@ -541,7 +541,7 @@ namespace cds { namespace container {
         guarded_ptr extract_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Checks whether the list contains \p key
@@ -552,7 +552,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool contains( Q const& key )
         {
-            return find_at( head(), key, intrusive_key_comparator() );
+            return find_at( head(), key, intrusive_key_comparator());
         }
         //@cond
         template <typename Q>
@@ -573,7 +573,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
         //@cond
         template <typename Q, typename Less>
@@ -666,7 +666,7 @@ namespace cds { namespace container {
         template <typename Q>
         guarded_ptr get( Q const& key )
         {
-            return get_at( head(), key, intrusive_key_comparator() );
+            return get_at( head(), key, intrusive_key_comparator());
         }
 
         /// Finds \p key and return the item found
@@ -682,7 +682,7 @@ namespace cds { namespace container {
         guarded_ptr get_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return get_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return get_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Check if the list is empty
@@ -782,7 +782,7 @@ namespace cds { namespace container {
         {
             scoped_node_ptr pNode( alloc_node( std::forward<Q>( key )));
 
-            if ( base_class::insert_at( refHead, *pNode, [&f]( node_type& node ) { f( node_to_value(node) ); } )) {
+            if ( base_class::insert_at( refHead, *pNode, [&f]( node_type& node ) { f( node_to_value(node)); } )) {
                 pNode.release();
                 return true;
             }
@@ -798,7 +798,7 @@ namespace cds { namespace container {
         template <typename Q, typename Compare, typename Func>
         bool erase_at( head_type& refHead, Q const& key, Compare cmp, Func f )
         {
-            return base_class::erase_at( refHead, key, cmp, [&f](node_type const& node){ f( node_to_value(node) ); } );
+            return base_class::erase_at( refHead, key, cmp, [&f](node_type const& node){ f( node_to_value(node)); } );
         }
 
         template <typename Q, typename Compare>
index 868a82d2bf29fa753ca72d8a5aaeed2836fe8fbf..021dd8e76313ce35d3a88f82bdab13c0c2f9d04a 100644 (file)
@@ -208,7 +208,7 @@ namespace cds { namespace container {
         /// Returns a forward iterator addressing the first element in a map
         iterator begin()
         {
-            return iterator( base_class::begin() );
+            return iterator( base_class::begin());
         }
 
         /// Returns a forward const iterator addressing the first element in a map
@@ -220,13 +220,13 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a map
         const_iterator cbegin() const
         {
-            return const_iterator( base_class::cbegin() );
+            return const_iterator( base_class::cbegin());
         }
 
         /// Returns a forward iterator that addresses the location succeeding the last element in a map.
         iterator end()
         {
-            return iterator( base_class::end() );
+            return iterator( base_class::end());
         }
 
         /// Returns a forward const iterator that addresses the location succeeding the last element in a map.
@@ -238,7 +238,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator that addresses the location succeeding the last element in a map.
         const_iterator cend() const
         {
-            return const_iterator( base_class::cend() );
+            return const_iterator( base_class::cend());
         }
     //@}
 
@@ -466,7 +466,7 @@ namespace cds { namespace container {
         template <typename K>
         guarded_ptr extract( K const& key )
         {
-            return base_class::extract_( key, typename base_class::key_comparator() );
+            return base_class::extract_( key, typename base_class::key_comparator());
         }
 
         /// Extracts the item from the map with comparing functor \p pred
@@ -483,7 +483,7 @@ namespace cds { namespace container {
         {
             CDS_UNUSED( pred );
             typedef cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >  wrapped_less;
-            return base_class::extract_( key, cds::opt::details::make_comparator_from_less<wrapped_less>() );
+            return base_class::extract_( key, cds::opt::details::make_comparator_from_less<wrapped_less>());
         }
 
         /// Extracts an item with minimal key from the map
@@ -611,7 +611,7 @@ namespace cds { namespace container {
         bool contains( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() );
+            return base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >());
         }
         //@cond
         template <typename K, typename Less>
@@ -654,7 +654,7 @@ namespace cds { namespace container {
         template <typename K>
         guarded_ptr get( K const& key )
         {
-            return base_class::get_with_( key, typename base_class::key_comparator() );
+            return base_class::get_with_( key, typename base_class::key_comparator());
         }
 
         /// Finds the key \p key and return the item found
index 4389cce0e255d3fa4cbd6b461343782c7a012c8b..18fa118266b834cae769723b8a7360b0728bc0ae 100644 (file)
@@ -237,37 +237,37 @@ namespace cds { namespace container {
         /// Returns a forward iterator addressing the first element in a set
         iterator begin()
         {
-            return iterator( base_class::begin() );
+            return iterator( base_class::begin());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator begin() const
         {
-            return const_iterator( base_class::begin() );
+            return const_iterator( base_class::begin());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( base_class::cbegin() );
+            return const_iterator( base_class::cbegin());
         }
 
         /// Returns a forward iterator that addresses the location succeeding the last element in a set.
         iterator end()
         {
-            return iterator( base_class::end() );
+            return iterator( base_class::end());
         }
 
         /// Returns a forward const iterator that addresses the location succeeding the last element in a set.
         const_iterator end() const
         {
-            return const_iterator( base_class::end() );
+            return const_iterator( base_class::end());
         }
 
         /// Returns a forward const iterator that addresses the location succeeding the last element in a set.
         const_iterator cend() const
         {
-            return const_iterator( base_class::cend() );
+            return const_iterator( base_class::cend());
         }
     //@}
 
@@ -287,7 +287,7 @@ namespace cds { namespace container {
         bool insert( Q const& val )
         {
             scoped_node_ptr sp( node_allocator().New( random_level(), val ));
-            if ( base_class::insert( *sp.get() )) {
+            if ( base_class::insert( *sp.get())) {
                 sp.release();
                 return true;
             }
@@ -377,7 +377,7 @@ namespace cds { namespace container {
         bool emplace( Args&&... args )
         {
             scoped_node_ptr sp( node_allocator().New( random_level(), std::forward<Args>(args)... ));
-            if ( base_class::insert( *sp.get() )) {
+            if ( base_class::insert( *sp.get())) {
                 sp.release();
                 return true;
             }
@@ -409,7 +409,7 @@ namespace cds { namespace container {
         bool erase_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >() );
+            return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >());
         }
 
         /// Delete \p key from the set
@@ -483,7 +483,7 @@ namespace cds { namespace container {
         template <typename Q>
         guarded_ptr extract( Q const& key )
         {
-            return base_class::extract_( key, typename base_class::key_comparator() );
+            return base_class::extract_( key, typename base_class::key_comparator());
         }
 
         /// Extracts the item from the set with comparing functor \p pred
@@ -500,7 +500,7 @@ namespace cds { namespace container {
         {
             CDS_UNUSED( pred );
             typedef cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >  wrapped_less;
-            return base_class::extract_( key, cds::opt::details::make_comparator_from_less<wrapped_less>() );
+            return base_class::extract_( key, cds::opt::details::make_comparator_from_less<wrapped_less>());
         }
 
         /// Extracts an item with minimal key from the set
@@ -692,7 +692,7 @@ namespace cds { namespace container {
         template <typename Q>
         guarded_ptr get( Q const& key )
         {
-            return base_class::get_with_( key, typename base_class::key_comparator() );
+            return base_class::get_with_( key, typename base_class::key_comparator());
         }
 
         /// Finds \p key and return the item found
@@ -719,7 +719,7 @@ namespace cds { namespace container {
             this sequence
             \code
             set.clear();
-            assert( set.empty() );
+            assert( set.empty());
             \endcode
             the assertion could be raised.
 
index 2e419f9c5119642e978730d68744fb69018e44e9..e123b8d89616d1e36a7a8eccab179be54e23ee82 100644 (file)
@@ -287,7 +287,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            iterator it( head() );
+            iterator it( head());
             ++it ;  // skip dummy head
             return it;
         }
@@ -308,14 +308,14 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it ;  // skip dummy head
             return it;
         }
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it ;  // skip dummy head
             return it;
         }
@@ -475,7 +475,7 @@ namespace cds { namespace container {
         template <typename Q>
         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 <typename Q>
@@ -496,7 +496,7 @@ namespace cds { namespace container {
         typename std::enable_if<Sort, iterator>::type contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type() ) );
+            return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type()) );
         }
         //@cond
         template <typename Q, typename Less, bool Sort = c_bSort>
@@ -516,7 +516,7 @@ namespace cds { namespace container {
         typename std::enable_if<!Sort, iterator>::type contains( Q const& key, Equal equal )
         {
             CDS_UNUSED( equal );
-            return node_to_iterator( find_at( head(), key, typename maker::template equal_to_wrapper<Equal>::type() ) );
+            return node_to_iterator( find_at( head(), key, typename maker::template equal_to_wrapper<Equal>::type()) );
         }
         //@cond
         template <typename Q, typename Equal, bool Sort = c_bSort>
index 37c88fcb628e8826b5078bb18d0fb7beecbe5adc..e3cd14f20dbc2a346feec19ef164e5843c9e2fb3 100644 (file)
@@ -236,10 +236,10 @@ namespace cds { namespace container {
             typedef typename base_class::template iterator_type<IsConst>    iterator_base;
 
             iterator_type( head_type const& pNode )
-                : iterator_base( const_cast<head_type *>(&pNode) )
+                : iterator_base( const_cast<head_type *>(&pNode))
             {}
             iterator_type( head_type const * pNode )
-                : iterator_base( const_cast<head_type *>(pNode) )
+                : iterator_base( const_cast<head_type *>(pNode))
             {}
 
             friend class LazyKVList;
@@ -323,7 +323,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            iterator it( head() );
+            iterator it( head());
             ++it ;  // skip dummy head
             return it;
         }
@@ -338,13 +338,13 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( tail() );
+            return iterator( tail());
         }
 
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it;   // skip dummy head
             return it;
         }
@@ -352,7 +352,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it;   // skip dummy head
             return it;
         }
@@ -524,7 +524,7 @@ namespace cds { namespace container {
         template <typename K>
         bool erase( K const& key )
         {
-            return erase_at( head(), key, intrusive_key_comparator() );
+            return erase_at( head(), key, intrusive_key_comparator());
         }
 
         /// Deletes the item from the list using \p pred predicate for searching
@@ -538,7 +538,7 @@ namespace cds { namespace container {
         bool erase_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return erase_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return erase_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Deletes \p key from the list
@@ -634,7 +634,7 @@ namespace cds { namespace container {
         exempt_ptr extract_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper<Less>::type() ));
+            return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper<Less>::type()));
         }
 
         /// Checks whether the list contains \p key
@@ -647,7 +647,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool contains( Q const& key ) const
         {
-            return find_at( head(), key, intrusive_key_comparator() );
+            return find_at( head(), key, intrusive_key_comparator());
         }
         //@cond
         template <typename Q>
@@ -670,7 +670,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred ) const
         {
             CDS_UNUSED( pred );
-            return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
         //@cond
         template <typename Q, typename Less>
index 089477499a7c7164d902f89c5ee3f366b3c6619d..551b53d41fb73f080d70a6694777096357455b11 100644 (file)
@@ -128,7 +128,7 @@ namespace cds { namespace container {
             typedef typename base_class::template iterator_type<IsConst>    iterator_base;
 
             iterator_type( head_type const& pNode )
-                : iterator_base( const_cast<head_type *>(&pNode) )
+                : iterator_base( const_cast<head_type *>(&pNode))
             {}
 
             explicit iterator_type( const iterator_base& it )
@@ -211,7 +211,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            iterator it( head() );
+            iterator it( head());
             ++it    ;   // skip dummy head node
             return it;
         }
@@ -231,7 +231,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it    ;   // skip dummy head node
             return it;
         }
@@ -239,7 +239,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it    ;   // skip dummy head node
             return it;
         }
@@ -285,7 +285,7 @@ namespace cds { namespace container {
         template <typename Q>
         iterator insert( Q&& val )
         {
-            return node_to_iterator( insert_at( head(), std::forward<Q>( val )) );
+            return node_to_iterator( insert_at( head(), std::forward<Q>( val )));
         }
 
         /// Inserts data of type \p value_type created from \p args
@@ -332,7 +332,7 @@ namespace cds { namespace container {
         template <typename Q>
         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 <typename Q>
@@ -353,7 +353,7 @@ namespace cds { namespace container {
         typename std::enable_if<Sort, iterator>::type contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type() ));
+            return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type()));
         }
         //@cond
         template <typename Q, typename Less, bool Sort = c_bSort>
@@ -373,7 +373,7 @@ namespace cds { namespace container {
         typename std::enable_if<!Sort, iterator>::type contains( Q const& key, Equal equal )
         {
             CDS_UNUSED( equal );
-            return node_to_iterator( find_at( head(), key, typename maker::template equal_to_wrapper<Equal>::type() ));
+            return node_to_iterator( find_at( head(), key, typename maker::template equal_to_wrapper<Equal>::type()));
         }
         //@cond
         template <typename Q, typename Equal, bool Sort = c_bSort>
index fa7e6eac60fd7c205bd42ae8bbf356543b3b198f..fea8043c48dc53031ddf795edaa2f848147d7867 100644 (file)
@@ -267,7 +267,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            iterator it( head() );
+            iterator it( head());
             ++it        ;   // skip dummy head node
             return it;
         }
@@ -281,13 +281,13 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( tail() );
+            return iterator( tail());
         }
 
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it        ;   // skip dummy head node
             return it;
         }
@@ -295,7 +295,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            const_iterator it( head() );
+            const_iterator it( head());
             ++it        ;   // skip dummy head node
             return it;
         }
@@ -303,13 +303,13 @@ namespace cds { namespace container {
         /// Returns an const iterator that addresses the location succeeding the last element in a list
         const_iterator end() const
         {
-            return const_iterator( tail() );
+            return const_iterator( tail());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a list
         const_iterator cend() const
         {
-            return const_iterator( tail() );
+            return const_iterator( tail());
         }
     //@}
 
@@ -578,7 +578,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool contains( Q const& key ) const
         {
-            return find_at( head(), key, intrusive_key_comparator() );
+            return find_at( head(), key, intrusive_key_comparator());
         }
         //@cond
         template <typename Q>
@@ -599,7 +599,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred ) const
         {
             CDS_UNUSED( pred );
-            return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
         //@cond
         template <typename Q, typename Less>
@@ -785,7 +785,7 @@ namespace cds { namespace container {
         {
             scoped_node_ptr pNode( alloc_node( std::forward<Q>( key )));
 
-            if ( base_class::insert_at( &refHead, *pNode, [&f](node_type& node){ f( node_to_value(node) ); } )) {
+            if ( base_class::insert_at( &refHead, *pNode, [&f](node_type& node){ f( node_to_value(node)); } )) {
                 pNode.release();
                 return true;
             }
@@ -795,7 +795,7 @@ namespace cds { namespace container {
         template <typename Q, typename Compare, typename Func>
         bool erase_at( head_type& refHead, Q const& key, Compare cmp, Func f )
         {
-            return base_class::erase_at( &refHead, key, cmp, [&f](node_type const& node){ f( node_to_value(node) ); } );
+            return base_class::erase_at( &refHead, key, cmp, [&f](node_type const& node){ f( node_to_value(node)); } );
         }
 
         template <typename Q, typename Compare>
index bc300bb191bb88085d9eead70912c7b35957ba39..43c3e1f14dc070725499e2eeea9f38a85c3dd2e8 100644 (file)
@@ -270,7 +270,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( head() );
+            return iterator( head());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a list
@@ -289,12 +289,12 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a list
@@ -446,7 +446,7 @@ namespace cds { namespace container {
         template <typename Q>
         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 <typename Q>
@@ -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<Less>::type() ) );
+            return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type()) );
         }
         //@cond
         template <typename Q, typename Less>
index 6b6c8ae6289d51cff8d9796fd17cf6c5f239be88..427fde9bf8b8793f94c95fddffc431f42623db14 100644 (file)
@@ -302,7 +302,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( head() );
+            return iterator( head());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a list
@@ -321,12 +321,12 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a list
@@ -539,7 +539,7 @@ namespace cds { namespace container {
         template <typename K>
         bool erase( K const& key )
         {
-            return erase_at( head(), key, intrusive_key_comparator() );
+            return erase_at( head(), key, intrusive_key_comparator());
         }
 
         /// Deletes the item from the list using \p pred predicate for searching
@@ -553,7 +553,7 @@ namespace cds { namespace container {
         bool erase_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return erase_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return erase_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Deletes \p key from the list
@@ -618,7 +618,7 @@ namespace cds { namespace container {
             rcu_michael_list::exempt_ptr p;
 
             // The RCU should NOT be locked when extract() is called!
-            assert( !rcu::is_locked() );
+            assert( !rcu::is_locked());
 
             // extract() call
             p = theList.extract( 10 );
@@ -635,7 +635,7 @@ namespace cds { namespace container {
         template <typename K>
         exempt_ptr extract( K const& key )
         {
-            return exempt_ptr( extract_at( head(), key, intrusive_key_comparator() ));
+            return exempt_ptr( extract_at( head(), key, intrusive_key_comparator()));
         }
 
         /// Extracts an item from the list using \p pred predicate for searching
@@ -649,7 +649,7 @@ namespace cds { namespace container {
         exempt_ptr extract_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper<Less>::type() ));
+            return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper<Less>::type()));
         }
 
         /// Checks whether the list contains \p key
@@ -662,7 +662,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool contains( Q const& key )
         {
-            return find_at( head(), key, intrusive_key_comparator() );
+            return find_at( head(), key, intrusive_key_comparator());
         }
         //@cond
         template <typename Q>
@@ -685,7 +685,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
         //@cond
         template <typename Q, typename Less>
@@ -784,7 +784,7 @@ namespace cds { namespace container {
         raw_ptr get_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return get_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return get_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
 
         /// Checks if the list is empty
index 2c10de8bf0d7b4cdea772b6534046ab2b7b45508..277560b24256cc453708a195f67b683cc2f0ac3d 100644 (file)
@@ -226,7 +226,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( head() );
+            return iterator( head());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a list
@@ -245,13 +245,13 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
 
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a list
@@ -301,7 +301,7 @@ namespace cds { namespace container {
         template <typename Q>
         iterator insert( Q&& val )
         {
-            return node_to_iterator( insert_at( head(), std::forward<Q>( val )) );
+            return node_to_iterator( insert_at( head(), std::forward<Q>( val )));
         }
 
         /// Updates the item
@@ -348,7 +348,7 @@ namespace cds { namespace container {
         template <typename Q>
         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 <typename Q>
@@ -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<Less>::type() ) );
+            return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type()) );
         }
         //@cond
         template <typename Q, typename Less>
index bec47781219493313be7f39f9b4b090e7d2edfe0..6aaf2379f310d4a16fc01e3dd4033b45947dc3be 100644 (file)
@@ -290,7 +290,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( head() );
+            return iterator( head());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a list
@@ -309,13 +309,13 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
 
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            return const_iterator( head() );
+            return const_iterator( head());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a list
@@ -558,7 +558,7 @@ namespace cds { namespace container {
             rcu_michael_list::exempt_ptr p;
 
             // The RCU should NOT be locked when extract() is called!
-            assert( !rcu::is_locked() );
+            assert( !rcu::is_locked());
 
             // extract() call
             p = theList.extract( 10 )
@@ -575,7 +575,7 @@ namespace cds { namespace container {
         template <typename Q>
         exempt_ptr extract( Q const& key )
         {
-            return exempt_ptr( extract_at( head(), key, intrusive_key_comparator() ));
+            return exempt_ptr( extract_at( head(), key, intrusive_key_comparator()));
         }
 
         /// Extracts an item from the list using \p pred predicate for searching
@@ -590,7 +590,7 @@ namespace cds { namespace container {
         exempt_ptr extract_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper<Less>::type() ));
+            return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper<Less>::type()));
         }
 
         /// Checks whether the list contains \p key
@@ -603,7 +603,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool contains( Q const& key )
         {
-            return find_at( head(), key, intrusive_key_comparator() );
+            return find_at( head(), key, intrusive_key_comparator());
         }
         //@cond
         template <typename Q>
@@ -624,7 +624,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type());
         }
         //@cond
         // Deprecatd, use contains()
@@ -804,7 +804,7 @@ namespace cds { namespace container {
         {
             scoped_node_ptr pNode( alloc_node( std::forward<Q>( key )));
 
-            if ( base_class::insert_at( refHead, *pNode, [&f]( node_type& node ) { f( node_to_value(node) ); } )) {
+            if ( base_class::insert_at( refHead, *pNode, [&f]( node_type& node ) { f( node_to_value(node)); } )) {
                 pNode.release();
                 return true;
             }
@@ -820,7 +820,7 @@ namespace cds { namespace container {
         template <typename Q, typename Compare, typename Func>
         bool erase_at( head_type& refHead, Q const& key, Compare cmp, Func f )
         {
-            return base_class::erase_at( refHead, key, cmp, [&f](node_type const& node){ f( node_to_value(node) ); } );
+            return base_class::erase_at( refHead, key, cmp, [&f](node_type const& node){ f( node_to_value(node)); } );
         }
 
         template <typename Q, typename Func>
index 931147035dfdbc4bac1696d915302954479930de..71287e4dd58cdeda8bfb3c592e22fc6c4d73d9b0 100644 (file)
@@ -64,7 +64,7 @@ namespace cds { namespace container {
         \p key_type and an argument of template type \p K must meet the following requirements:
         - \p key_type should be constructible from value of type \p K;
         - the hash functor should be able to calculate correct hash value from argument \p key of type \p K:
-            <tt> hash( key_type(key) ) == hash( key ) </tt>
+            <tt> hash( key_type(key)) == hash( key ) </tt>
         - values of type \p key_type and \p K should be comparable
 
         There are the specializations:
@@ -349,7 +349,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( bucket_begin()->begin(), bucket_begin(), bucket_end() );
+            return iterator( bucket_begin()->begin(), bucket_begin(), bucket_end());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a map
@@ -360,7 +360,7 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( bucket_end()[-1].end(), bucket_end() - 1, bucket_end() );
+            return iterator( bucket_end()[-1].end(), bucket_end() - 1, bucket_end());
         }
 
         /// Returns a forward const iterator addressing the first element in a map
@@ -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<bucket_stat>( it );
@@ -415,7 +415,7 @@ namespace cds { namespace container {
 
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 it->~internal_bucket_type();
-            bucket_table_allocator().deallocate( m_Buckets, bucket_count() );
+            bucket_table_allocator().deallocate( m_Buckets, bucket_count());
         }
 
         /// Inserts new node with key and default value
@@ -768,7 +768,7 @@ namespace cds { namespace container {
         {
             auto& b = bucket( key );
             auto it = b.find( key );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
             return iterator( it, &b, bucket_end());
         }
@@ -807,9 +807,9 @@ namespace cds { namespace container {
         {
             auto& b = bucket( key );
             auto it = b.find_with( key, pred );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
-            return iterator( it, &b, bucket_end() );
+            return iterator( it, &b, bucket_end());
         }
 
         /// Checks whether the map contains \p key
@@ -954,11 +954,11 @@ namespace cds { namespace container {
 
         const_iterator get_const_begin() const
         {
-            return const_iterator( bucket_begin()->cbegin(), bucket_begin(), bucket_end() );
+            return const_iterator( bucket_begin()->cbegin(), bucket_begin(), bucket_end());
         }
         const_iterator get_const_end() const
         {
-            return const_iterator( (bucket_end() - 1)->cend(), bucket_end() - 1, bucket_end() );
+            return const_iterator( (bucket_end() - 1)->cend(), bucket_end() - 1, bucket_end());
         }
 
         template <typename Stat>
index 99fad9eb06b94e5c57720583f6c519a6440ceaaf..e3e010da8756dcd105ed90a20c09f8930d60f7bb 100644 (file)
@@ -249,7 +249,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a set
@@ -260,7 +260,7 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
@@ -315,7 +315,7 @@ namespace cds { namespace container {
             clear();
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 it->~internal_bucket_type();
-            bucket_table_allocator().deallocate( m_Buckets, bucket_count() );
+            bucket_table_allocator().deallocate( m_Buckets, bucket_count());
         }
 
         /// Inserts new node with key and default value
@@ -335,9 +335,9 @@ namespace cds { namespace container {
             internal_bucket_type& refBucket = bucket( key );
             bucket_iterator it = refBucket.insert( key );
 
-            if ( it != refBucket.end() ) {
+            if ( it != refBucket.end()) {
                 ++m_ItemCounter;
-                return iterator( it, &refBucket, m_Buckets + bucket_count() );
+                return iterator( it, &refBucket, m_Buckets + bucket_count());
             }
 
             return end();
@@ -360,9 +360,9 @@ namespace cds { namespace container {
             internal_bucket_type& refBucket = bucket( key );
             bucket_iterator it = refBucket.insert( key, val );
 
-            if ( it != refBucket.end() ) {
+            if ( it != refBucket.end()) {
                 ++m_ItemCounter;
-                return iterator( it, &refBucket, m_Buckets + bucket_count() );
+                return iterator( it, &refBucket, m_Buckets + bucket_count());
             }
 
             return end();
@@ -404,9 +404,9 @@ namespace cds { namespace container {
             internal_bucket_type& refBucket = bucket( key );
             bucket_iterator it = refBucket.insert_with( key, func );
 
-            if ( it != refBucket.end() ) {
+            if ( it != refBucket.end()) {
                 ++m_ItemCounter;
-                return iterator( it, &refBucket, m_Buckets + bucket_count() );
+                return iterator( it, &refBucket, m_Buckets + bucket_count());
             }
 
             return end();
@@ -424,9 +424,9 @@ namespace cds { namespace container {
             internal_bucket_type& refBucket = bucket( key );
             bucket_iterator it = refBucket.emplace( std::forward<K>(key), std::forward<Args>(args)... );
 
-            if ( it != refBucket.end() ) {
+            if ( it != refBucket.end()) {
                 ++m_ItemCounter;
-                return iterator( it, &refBucket, m_Buckets + bucket_count() );
+                return iterator( it, &refBucket, m_Buckets + bucket_count());
             }
 
             return end();
@@ -455,9 +455,9 @@ namespace cds { namespace container {
 
             if ( ret.second  )
                 ++m_ItemCounter;
-            else if ( ret.first == refBucket.end() )
+            else if ( ret.first == refBucket.end())
                 return std::make_pair( end(), false );
-            return std::make_pair( iterator( ret.first, &refBucket, m_Buckets + bucket_count() ), ret.second );
+            return std::make_pair( iterator( ret.first, &refBucket, m_Buckets + bucket_count()), ret.second );
         }
         //@cond
         template <typename K>
@@ -479,8 +479,8 @@ namespace cds { namespace container {
             internal_bucket_type& refBucket = bucket( key );
             bucket_iterator it = refBucket.contains( key );
 
-            if ( it != refBucket.end() )
-                return iterator( it, &refBucket, m_Buckets + bucket_count() );
+            if ( it != refBucket.end())
+                return iterator( it, &refBucket, m_Buckets + bucket_count());
 
             return end();
         }
@@ -506,8 +506,8 @@ namespace cds { namespace container {
             internal_bucket_type& refBucket = bucket( key );
             bucket_iterator it = refBucket.contains( key, pred );
 
-            if ( it != refBucket.end() )
-                return iterator( it, &refBucket, m_Buckets + bucket_count() );
+            if ( it != refBucket.end())
+                return iterator( it, &refBucket, m_Buckets + bucket_count());
 
             return end();
         }
@@ -582,11 +582,11 @@ namespace cds { namespace container {
         //@cond
         const_iterator get_const_begin() const
         {
-            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[0]).begin(), m_Buckets, m_Buckets + bucket_count() );
+            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[0]).begin(), m_Buckets, m_Buckets + bucket_count());
         }
         const_iterator get_const_end() const
         {
-            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[bucket_count() - 1]).end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[bucket_count() - 1]).end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
 
         template <typename Stat>
index cfda210b31fa84b9a8ecf36f87658168c38c96a3..cc0fba5eb8ee687488cd75a32c9b7e52f77f6165 100644 (file)
@@ -61,7 +61,7 @@ namespace cds { namespace container {
         \p key_type and an argument of template type \p K must meet the following requirements:
         - \p key_type should be constructible from value of type \p K;
         - the hash functor should be able to calculate correct hash value from argument \p key of type \p K:
-            <tt> hash( key_type(key) ) == hash( key ) </tt>
+            <tt> hash( key_type(key)) == hash( key ) </tt>
         - values of type \p key_type and \p K should be comparable
 
         <b>How to use</b>
@@ -283,7 +283,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a map
@@ -294,7 +294,7 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
 
         /// Returns a forward const iterator addressing the first element in a map
@@ -349,7 +349,7 @@ namespace cds { namespace container {
             clear();
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 it->~internal_bucket_type();
-            bucket_table_allocator().deallocate( m_Buckets, bucket_count() );
+            bucket_table_allocator().deallocate( m_Buckets, bucket_count());
         }
 
         /// Inserts new node with key and default value
@@ -847,11 +847,11 @@ namespace cds { namespace container {
         //@cond
         const_iterator get_const_begin() const
         {
-            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[0]).begin(), m_Buckets, m_Buckets + bucket_count() );
+            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[0]).begin(), m_Buckets, m_Buckets + bucket_count());
         }
         const_iterator get_const_end() const
         {
-            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[bucket_count() - 1]).end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[bucket_count() - 1]).end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
 
         template <typename Stat>
index c67a7f0bb798dd267106a636942746e4cafbce36..81823a23791e4f6d80c026b658a98ba93d874290 100644 (file)
@@ -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<bucket_stat>( it );
@@ -345,7 +345,7 @@ namespace cds { namespace container {
 
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 it->~internal_bucket_type();
-            bucket_table_allocator().deallocate( m_Buckets, bucket_count() );
+            bucket_table_allocator().deallocate( m_Buckets, bucket_count());
         }
 
         /// Inserts new node
@@ -676,7 +676,7 @@ namespace cds { namespace container {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find( key );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
             return iterator( it, &b, bucket_end());
         }
@@ -687,9 +687,9 @@ namespace cds { namespace container {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find( key );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
-            return iterator( it, &b, bucket_end() );
+            return iterator( it, &b, bucket_end());
         }
         //@endcond
 
@@ -732,9 +732,9 @@ namespace cds { namespace container {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find_with( key, pred );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
-            return iterator( it, &b, bucket_end() );
+            return iterator( it, &b, bucket_end());
         }
         //@cond
         template <typename Q, typename Less>
@@ -743,9 +743,9 @@ namespace cds { namespace container {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find_with( key, pred );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
-            return iterator( it, &b, bucket_end() );
+            return iterator( it, &b, bucket_end());
         }
         //@endcond
 
@@ -907,11 +907,11 @@ namespace cds { namespace container {
 
         const_iterator get_const_begin() const
         {
-            return const_iterator( bucket_begin()->cbegin(), bucket_begin(), bucket_end() );
+            return const_iterator( bucket_begin()->cbegin(), bucket_begin(), bucket_end());
         }
         const_iterator get_const_end() const
         {
-            return const_iterator(( bucket_end() -1 )->cend(), bucket_end() - 1, bucket_end() );
+            return const_iterator(( bucket_end() -1 )->cend(), bucket_end() - 1, bucket_end());
         }
 
         template <typename Stat>
index 3e3231dc7d9ec10886aeee5cb2c7ebd5ef0715a1..a921ff4349a3f0e356d0fc70d7eaec1682b016fe 100644 (file)
@@ -172,7 +172,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a set
@@ -183,7 +183,7 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
@@ -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<bucket_stat>( it );
@@ -237,7 +237,7 @@ namespace cds { namespace container {
             clear();
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 it->~internal_bucket_type();
-            bucket_table_allocator().deallocate( m_Buckets, bucket_count() );
+            bucket_table_allocator().deallocate( m_Buckets, bucket_count());
         }
 
         /// Inserts new node
@@ -253,9 +253,9 @@ namespace cds { namespace container {
             internal_bucket_type& refBucket = bucket( val );
             bucket_iterator it = refBucket.insert( val );
 
-            if ( it != refBucket.end() ) {
+            if ( it != refBucket.end()) {
                 ++m_ItemCounter;
-                return iterator( it, &refBucket, m_Buckets + bucket_count() );
+                return iterator( it, &refBucket, m_Buckets + bucket_count());
             }
 
             return end();
@@ -271,9 +271,9 @@ namespace cds { namespace container {
             typename internal_bucket_type::node_type * pNode = internal_bucket_type::alloc_node( std::forward<Args>( args )... );
             internal_bucket_type& refBucket = bucket( internal_bucket_type::node_to_value( *pNode ));
             bucket_iterator it = refBucket.insert_node( pNode );
-            if ( it != refBucket.end() ) {
+            if ( it != refBucket.end()) {
                 ++m_ItemCounter;
-                return iterator( it, &refBucket, m_Buckets + bucket_count() );
+                return iterator( it, &refBucket, m_Buckets + bucket_count());
             }
 
             return end();
@@ -300,10 +300,10 @@ namespace cds { namespace container {
             internal_bucket_type& refBucket = bucket( val );
             std::pair<bucket_iterator, bool> ret = refBucket.update( val, bAllowInsert );
 
-            if ( ret.first != refBucket.end() ) {
+            if ( ret.first != refBucket.end()) {
                 if ( ret.second )
                     ++m_ItemCounter;
-                return std::make_pair( iterator( ret.first, &refBucket, m_Buckets + bucket_count() ), ret.second );
+                return std::make_pair( iterator( ret.first, &refBucket, m_Buckets + bucket_count()), ret.second );
             }
             return std::make_pair( end(), ret.second );
         }
@@ -330,8 +330,8 @@ namespace cds { namespace container {
         {
             internal_bucket_type& refBucket = bucket( key );
             bucket_iterator it = refBucket.contains( key );
-            if ( it != refBucket.end() )
-                return iterator( it, &refBucket, m_Buckets + bucket_count() );
+            if ( it != refBucket.end())
+                return iterator( it, &refBucket, m_Buckets + bucket_count());
 
             return end();
         }
@@ -355,8 +355,8 @@ namespace cds { namespace container {
         {
             internal_bucket_type& refBucket = bucket( key );
             bucket_iterator it = refBucket.contains( key, pred );
-            if ( it != refBucket.end() )
-                return iterator( it, &refBucket, m_Buckets + bucket_count() );
+            if ( it != refBucket.end())
+                return iterator( it, &refBucket, m_Buckets + bucket_count());
 
             return end();
         }
@@ -443,11 +443,11 @@ namespace cds { namespace container {
 
         const_iterator get_const_begin() const
         {
-            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[0]).begin(), m_Buckets, m_Buckets + bucket_count() );
+            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[0]).begin(), m_Buckets, m_Buckets + bucket_count());
         }
         const_iterator get_const_end() const
         {
-            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[bucket_count() - 1]).end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[bucket_count() - 1]).end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
         //@endcond
     };
index 7b5249cf2d9977206147b01cdd41fe808571311b..9733f4c9fa8bf5c00f029b34620cb7a70c46fc7d 100644 (file)
@@ -249,7 +249,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a set
@@ -260,7 +260,7 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
@@ -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<bucket_stat>( it );
@@ -315,7 +315,7 @@ namespace cds { namespace container {
 
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 it->~internal_bucket_type();
-            bucket_table_allocator().deallocate( m_Buckets, bucket_count() );
+            bucket_table_allocator().deallocate( m_Buckets, bucket_count());
 
         }
 
@@ -425,7 +425,7 @@ namespace cds { namespace container {
         bool emplace( Args&&... args )
         {
             typename internal_bucket_type::node_type * pNode = internal_bucket_type::alloc_node( std::forward<Args>( args )... );
-            bool bRet = bucket( internal_bucket_type::node_to_value( *pNode ) ).insert_node( pNode );
+            bool bRet = bucket( internal_bucket_type::node_to_value( *pNode )).insert_node( pNode );
             if ( bRet )
                 ++m_ItemCounter;
             return bRet;
@@ -809,11 +809,11 @@ namespace cds { namespace container {
 
         const_iterator get_const_begin() const
         {
-            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[0]).begin(), m_Buckets, m_Buckets + bucket_count() );
+            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[0]).begin(), m_Buckets, m_Buckets + bucket_count());
         }
         const_iterator get_const_end() const
         {
-            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[bucket_count() - 1]).end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return const_iterator( const_cast<internal_bucket_type const&>(m_Buckets[bucket_count() - 1]).end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
         //@endcond
     };
index bcd491f7e7eb6852995d522d7144a7726f9ee92e..bf2d7729f135ebe8abb1d251eba20edec5982e41 100644 (file)
@@ -159,7 +159,7 @@ namespace cds { namespace container {
         */
         bool enqueue( value_type const& val )
         {
-            scoped_node_ptr p( alloc_node(val) );
+            scoped_node_ptr p( alloc_node(val));
             if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
@@ -171,7 +171,7 @@ namespace cds { namespace container {
         bool enqueue( value_type&& val )
         {
             scoped_node_ptr p( alloc_node_move( std::move( val )));
-            if ( base_class::enqueue( *p ) ) {
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
@@ -192,7 +192,7 @@ namespace cds { namespace container {
         template <typename Func>
         bool enqueue_with( Func f )
         {
-            scoped_node_ptr p( alloc_node() );
+            scoped_node_ptr p( alloc_node());
             f( p->m_value );
             if ( base_class::enqueue( *p )) {
                 p.release();
@@ -205,8 +205,8 @@ namespace cds { namespace container {
         template <typename... Args>
         bool emplace( Args&&... args )
         {
-            scoped_node_ptr p( alloc_node_move( std::forward<Args>( args )... ) );
-            if ( base_class::enqueue( *p ) ) {
+            scoped_node_ptr p( alloc_node_move( std::forward<Args>( args )... ));
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
index 6cafacb295c69b3100b788228531af7219f68b5b..160cead2c3cbdfc1339a972aa75bc0ff3f208b01 100644 (file)
@@ -189,7 +189,7 @@ namespace cds { namespace container {
         bool push( value_type const& val )
         {
             scoped_ptr pVal( cxx_allocator().New( val ));
-            if ( base_class::push( *(pVal.get()) )) {
+            if ( base_class::push( *(pVal.get()))) {
                 pVal.release();
                 return true;
             }
@@ -209,7 +209,7 @@ namespace cds { namespace container {
         template <typename Func>
         bool push_with( Func f )
         {
-            scoped_ptr pVal( cxx_allocator().New() );
+            scoped_ptr pVal( cxx_allocator().New());
             f( *pVal );
             if ( base_class::push( *pVal )) {
                 pVal.release();
@@ -229,7 +229,7 @@ namespace cds { namespace container {
         bool emplace( Args&&... args )
         {
             scoped_ptr pVal( cxx_allocator().MoveNew( std::forward<Args>(args)... ));
-            if ( base_class::push( *(pVal.get()) )) {
+            if ( base_class::push( *(pVal.get()))) {
                 pVal.release();
                 return true;
             }
index ba97d588d95f9454d05a0abed410af46cdea366d..b79cff66732d9acb5915b51f3cf620976ef1140c 100644 (file)
@@ -275,8 +275,8 @@ namespace cds { namespace container {
         */
         bool enqueue( value_type const& val )
         {
-            scoped_node_ptr p( alloc_node(val) );
-            if ( base_class::enqueue( *p ) ) {
+            scoped_node_ptr p( alloc_node(val));
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
@@ -287,7 +287,7 @@ namespace cds { namespace container {
         bool enqueue( value_type&& val )
         {
             scoped_node_ptr p( alloc_node_move( std::move( val )));
-            if ( base_class::enqueue( *p ) ) {
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
@@ -307,7 +307,7 @@ namespace cds { namespace container {
         template <typename Func>
         bool enqueue_with( Func f )
         {
-            scoped_node_ptr p( alloc_node() );
+            scoped_node_ptr p( alloc_node());
             f( p->m_value );
             if ( base_class::enqueue( *p )) {
                 p.release();
@@ -320,8 +320,8 @@ namespace cds { namespace container {
         template <typename... Args>
         bool emplace( Args&&... args )
         {
-            scoped_node_ptr p( alloc_node_move( std::forward<Args>( args )... ) );
-            if ( base_class::enqueue( *p ) ) {
+            scoped_node_ptr p( alloc_node_move( std::forward<Args>( args )... ));
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
index 1506f6f08e8baf5213720b76f308dbd985edcd91..1b29f9dfe0d651012793e01e8a0d2401f823cfbd 100644 (file)
@@ -287,7 +287,7 @@ namespace cds { namespace container {
         bool enqueue( value_type&& val )
         {
             scoped_node_ptr p( alloc_node_move( std::move( val )));
-            if ( base_class::enqueue( *p ) ) {
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
@@ -307,7 +307,7 @@ namespace cds { namespace container {
         template <typename Func>
         bool enqueue_with( Func f )
         {
-            scoped_node_ptr p( alloc_node() );
+            scoped_node_ptr p( alloc_node());
             f( p->m_value );
             if ( base_class::enqueue( *p )) {
                 p.release();
@@ -374,7 +374,7 @@ namespace cds { namespace container {
         bool dequeue_with( Func f )
         {
             typename base_class::dequeue_result res;
-            if ( base_class::do_dequeue( res ) ) {
+            if ( base_class::do_dequeue( res )) {
                 f( node_traits::to_value_ptr( *res.pNext )->m_value );
 
                 base_class::dispose_result( res );
index 5332e3118a6c0a91b01cb9a6d33eb17a1d8d66fd..028a08b7042293a8473d6ab5fc4e284fc1b00f32 100644 (file)
@@ -245,7 +245,7 @@ namespace cds { namespace container {
         bool enqueue( value_type const& data )
         {
             scoped_node_ptr p( alloc_node( data ));
-            if ( enqueue_node( p.get() )) {
+            if ( enqueue_node( p.get())) {
                 p.release();
                 return true;
             }
@@ -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;
             }
@@ -276,9 +276,9 @@ namespace cds { namespace container {
         template <typename Func>
         bool enqueue_with( Func f )
         {
-            scoped_node_ptr p( alloc_node() );
+            scoped_node_ptr p( alloc_node());
             f( p->m_value );
-            if ( enqueue_node( p.get() )) {
+            if ( enqueue_node( p.get())) {
                 p.release();
                 return true;
             }
@@ -290,7 +290,7 @@ namespace cds { namespace container {
         bool emplace( Args&&... args )
         {
             scoped_node_ptr p( alloc_node_move( std::forward<Args>(args)... ));
-            if ( enqueue_node( p.get() )) {
+            if ( enqueue_node( p.get())) {
                 p.release();
                 return true;
             }
index fe6977ba2bd79f82ba93611bd6a91fec7312b308..89c6eb244226f7d922e14417f22b7014cf9bac4e 100644 (file)
@@ -273,8 +273,8 @@ namespace cds { namespace container {
         */
         bool enqueue( value_type const& val )
         {
-            scoped_node_ptr p( alloc_node(val) );
-            if ( base_class::enqueue( *p ) ) {
+            scoped_node_ptr p( alloc_node(val));
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
@@ -285,7 +285,7 @@ namespace cds { namespace container {
         bool enqueue( value_type&& val )
         {
             scoped_node_ptr p( alloc_node_move( std::move( val )));
-            if ( base_class::enqueue( *p ) ) {
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
@@ -305,9 +305,9 @@ namespace cds { namespace container {
         template <typename Func>
         bool enqueue_with( Func f )
         {
-            scoped_node_ptr p( alloc_node() );
+            scoped_node_ptr p( alloc_node());
             f( *p );
-            if ( base_class::enqueue( *p ) ) {
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
@@ -338,7 +338,7 @@ namespace cds { namespace container {
         template <typename... Args>
         bool emplace( Args&&... args )
         {
-            scoped_node_ptr p( alloc_node_move( std::forward<Args>(args)... ) );
+            scoped_node_ptr p( alloc_node_move( std::forward<Args>(args)... ));
             if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
index 73fd275dcca135b65ab8bc1c96c847c88b3e0347..388cf46b4748b8f661b67af68fdf239b7fbdabe3 100644 (file)
@@ -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
@@ -248,8 +248,8 @@ namespace cds { namespace container {
         iterator insert_with( K const& key, Func func )
         {
             iterator it = insert( key );
-            if ( it != end() )
-                func( (*it) );
+            if ( it != end())
+                func( (*it));
             return it;
         }
 
@@ -278,7 +278,7 @@ namespace cds { namespace container {
         std::pair<iterator, bool> update( K const& key, bool bInsert = true )
         {
             //TODO: pass arguments by reference (make_pair makes copy)
-            return base_class::update( std::make_pair( key_type( key ), mapped_type() ), bInsert );
+            return base_class::update( std::make_pair( key_type( key ), mapped_type()), bInsert );
         }
         //@cond
         template <typename K>
index 2e8d2666ad4924b53f59a7826ae8c5bf800beb20..0470477d30c64b569edf803549d03876f74876dd 100644 (file)
@@ -231,7 +231,7 @@ namespace cds { namespace container {
         /// Returns a forward iterator addressing the first element in a map
         iterator begin()
         {
-            return iterator( base_class::begin() );
+            return iterator( base_class::begin());
         }
 
         /// Returns a forward const iterator addressing the first element in a map
@@ -242,13 +242,13 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a map
         const_iterator cbegin() const
         {
-            return const_iterator( base_class::cbegin() );
+            return const_iterator( base_class::cbegin());
         }
 
         /// Returns a forward iterator that addresses the location succeeding the last element in a map.
         iterator end()
         {
-            return iterator( base_class::end() );
+            return iterator( base_class::end());
         }
 
         /// Returns a forward const iterator that addresses the location succeeding the last element in a map.
@@ -259,7 +259,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator that addresses the location succeeding the last element in a map.
         const_iterator cend() const
         {
-            return const_iterator( base_class::cend() );
+            return const_iterator( base_class::cend());
         }
     //@}
 
@@ -612,7 +612,7 @@ namespace cds { namespace container {
         bool contains( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() );
+            return base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >());
         }
         //@cond
         template <typename K, typename Less>
@@ -671,7 +671,7 @@ namespace cds { namespace container {
         raw_ptr get_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return raw_ptr( base_class::get_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() ));
+            return raw_ptr( base_class::get_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >()));
         }
 
         /// Clears the map (not atomic)
index 7581734e891198a9f0cfd2986274c4fe87a94cfb..5f7636156fcee3418579e3db88c7c9f6a0d32534 100644 (file)
@@ -215,36 +215,36 @@ namespace cds { namespace container {
         /// Returns a forward iterator addressing the first element in a set
         iterator begin()
         {
-            return iterator( base_class::begin() );
+            return iterator( base_class::begin());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator begin() const
         {
-            return const_iterator( base_class::begin() );
+            return const_iterator( base_class::begin());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( base_class::cbegin() );
+            return const_iterator( base_class::cbegin());
         }
 
         /// Returns a forward iterator that addresses the location succeeding the last element in a set.
         iterator end()
         {
-            return iterator( base_class::end() );
+            return iterator( base_class::end());
         }
 
         /// Returns a forward const iterator that addresses the location succeeding the last element in a set.
         const_iterator end() const
         {
-            return const_iterator( base_class::end() );
+            return const_iterator( base_class::end());
         }
         /// Returns a forward const iterator that addresses the location succeeding the last element in a set.
         const_iterator cend() const
         {
-            return const_iterator( base_class::cend() );
+            return const_iterator( base_class::cend());
         }
     //@}
 
@@ -278,8 +278,8 @@ namespace cds { namespace container {
         iterator insert( const Q& val )
         {
             scoped_node_ptr sp( node_allocator().New( base_class::random_level(), val ));
-            if ( base_class::insert( *sp.get() )) {
-                return node_to_iterator( sp.release() );
+            if ( base_class::insert( *sp.get())) {
+                return node_to_iterator( sp.release());
             }
             return end();
         }
@@ -292,8 +292,8 @@ namespace cds { namespace container {
         iterator emplace( Args&&... args )
         {
             scoped_node_ptr sp( node_allocator().New( base_class::random_level(), std::forward<Args>(args)... ));
-            if ( base_class::insert( *sp.get() )) {
-                return node_to_iterator( sp.release() );
+            if ( base_class::insert( *sp.get())) {
+                return node_to_iterator( sp.release());
             }
             return end();
         }
@@ -362,7 +362,7 @@ namespace cds { namespace container {
         iterator contains( Q const& key, Less pred ) const
         {
             CDS_UNUSED( pred );
-            node_type * pNode = base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, key_accessor>() );
+            node_type * pNode = base_class::contains( key, cds::details::predicate_wrapper< node_type, Less, key_accessor>());
             if ( pNode )
                 return node_to_iterator( pNode );
             return base_class::nonconst_end();
index 1f2043be802af34c636cbc84b1702c13436077ed..edbfc3b796e8de074955bbc07bf5285dab64ec34 100644 (file)
@@ -278,37 +278,37 @@ namespace cds { namespace container {
         /// Returns a forward iterator addressing the first element in a set
         iterator begin()
         {
-            return iterator( base_class::begin() );
+            return iterator( base_class::begin());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator begin() const
         {
-            return const_iterator( base_class::begin() );
+            return const_iterator( base_class::begin());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( base_class::cbegin() );
+            return const_iterator( base_class::cbegin());
         }
 
         /// Returns a forward iterator that addresses the location succeeding the last element in a set.
         iterator end()
         {
-            return iterator( base_class::end() );
+            return iterator( base_class::end());
         }
 
         /// Returns a forward const iterator that addresses the location succeeding the last element in a set.
         const_iterator end() const
         {
-            return const_iterator( base_class::end() );
+            return const_iterator( base_class::end());
         }
 
         /// Returns a forward const iterator that addresses the location succeeding the last element in a set.
         const_iterator cend() const
         {
-            return const_iterator( base_class::cend() );
+            return const_iterator( base_class::cend());
         }
     //@}
 
@@ -330,7 +330,7 @@ namespace cds { namespace container {
         bool insert( Q const& val )
         {
             scoped_node_ptr sp( node_allocator().New( random_level(), val ));
-            if ( base_class::insert( *sp.get() )) {
+            if ( base_class::insert( *sp.get())) {
                 sp.release();
                 return true;
             }
@@ -421,7 +421,7 @@ namespace cds { namespace container {
         bool emplace( Args&&... args )
         {
             scoped_node_ptr sp( node_allocator().New( random_level(), std::forward<Args>(args)... ));
-            if ( base_class::insert( *sp.get() )) {
+            if ( base_class::insert( *sp.get())) {
                 sp.release();
                 return true;
             }
@@ -726,7 +726,7 @@ namespace cds { namespace container {
         raw_ptr get_with( Q const& val, Less pred )
         {
             CDS_UNUSED( pred );
-            return raw_ptr( base_class::get_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >() ));
+            return raw_ptr( base_class::get_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >()));
         }
 
         /// Clears the set (non-atomic).
@@ -736,7 +736,7 @@ namespace cds { namespace container {
             this sequence
             \code
             set.clear();
-            assert( set.empty() );
+            assert( set.empty());
             \endcode
             the assertion could be raised.
 
index 4295ef8f30312e27f91e7fa774425d2ab22c024e..45711480b827c72cca108a1976de1040ab60baa6 100644 (file)
@@ -305,7 +305,7 @@ namespace cds { namespace container {
         template <typename K>
         bool insert( K&& key )
         {
-            return base_class::emplace( key_type( std::forward<K>( key )), mapped_type() );
+            return base_class::emplace( key_type( std::forward<K>( key )), mapped_type());
         }
 
         /// Inserts new node
@@ -424,7 +424,7 @@ namespace cds { namespace container {
 #endif
         update( K&& key, Func func, bool bAllowInsert = true )
         {
-            typedef decltype( std::make_pair( key_type( std::forward<K>( key )), mapped_type() )) arg_pair_type;
+            typedef decltype( std::make_pair( key_type( std::forward<K>( key )), mapped_type())) arg_pair_type;
 
             return base_class::update( std::make_pair( key_type( key ), mapped_type()),
                 [&func]( bool bNew, value_type& item, arg_pair_type const& /*val*/ ) {
@@ -667,7 +667,7 @@ namespace cds { namespace container {
         find_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::find_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
+            return base_class::find_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>());
         }
 
         /// Checks whether the map contains \p key
index b23bacee381879c0f8b22b67ad921a5f52739b53..82f9237542fbbb1b7058bd1a4cfa4388d849e8aa 100644 (file)
@@ -213,7 +213,7 @@ namespace cds { namespace container {
         iterator insert( K const& key )
         {
             //TODO: pass arguments by reference (make_pair makes copy)
-            return base_class::emplace( key_type( key ), mapped_type() );
+            return base_class::emplace( key_type( key ), mapped_type());
         }
 
         /// Inserts new node
@@ -265,8 +265,8 @@ namespace cds { namespace container {
         iterator insert_with( const K& key, Func func )
         {
             iterator it = insert( key );
-            if ( it != end() )
-                func( (*it) );
+            if ( it != end())
+                func( (*it));
             return it;
         }
 
@@ -297,7 +297,7 @@ namespace cds { namespace container {
         std::pair<iterator, bool> update( K const& key, bool bAllowInsert = true )
         {
             //TODO: pass arguments by reference (make_pair makes copy)
-            return base_class::update( std::make_pair( key_type( key ), mapped_type() ), bAllowInsert );
+            return base_class::update( std::make_pair( key_type( key ), mapped_type()), bAllowInsert );
         }
         //@cond
         template <typename K>
@@ -337,7 +337,7 @@ namespace cds { namespace container {
         iterator contains( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
+            return base_class::contains( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>());
         }
         //@cond
         template <typename K, typename Less>
index acb4675aefc1608343f5a5193cb3bf300111f7db..9dc68aa8820fe668d3e8a8a8b8c269c160daae1a 100644 (file)
@@ -299,7 +299,7 @@ namespace cds { namespace container {
         template <typename K>
         bool insert( K const& key )
         {
-            return base_class::emplace( key_type( key ), mapped_type() );
+            return base_class::emplace( key_type( key ), mapped_type());
         }
 
         /// Inserts new node
@@ -357,7 +357,7 @@ namespace cds { namespace container {
         bool insert_with( K const& key, Func func )
         {
             //TODO: pass arguments by reference (make_pair makes copy)
-            return base_class::insert( std::make_pair( key_type( key ), mapped_type() ), func );
+            return base_class::insert( std::make_pair( key_type( key ), mapped_type()), func );
         }
 
         /// For key \p key inserts data of type \p mapped_type created in-place from \p args
@@ -409,9 +409,9 @@ namespace cds { namespace container {
         std::pair<bool, bool> update( K const& key, Func func, bool bAllowInsert = true )
         {
             //TODO: pass arguments by reference (make_pair makes copy)
-            typedef decltype( std::make_pair( key_type( key ), mapped_type() )) arg_pair_type;
+            typedef decltype( std::make_pair( key_type( key ), mapped_type())) arg_pair_type;
 
-            return base_class::update( std::make_pair( key_type( key ), mapped_type() ),
+            return base_class::update( std::make_pair( key_type( key ), mapped_type()),
                 [&func]( bool bNew, value_type& item, arg_pair_type const& /*val*/ ) {
                     func( bNew, item );
                 },
@@ -450,7 +450,7 @@ namespace cds { namespace container {
         bool erase_with( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::erase_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
+            return base_class::erase_with( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>());
         }
 
         /// Deletes \p key from the map
@@ -619,7 +619,7 @@ namespace cds { namespace container {
         bool contains( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
+            return base_class::contains( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>());
         }
         //@cond
         template <typename K, typename Less>
index f67609e5f472b302dbb48565ef2c9bba49e43d71..acb24adb779d94e9b98952d6ef4589342b0411c3 100644 (file)
@@ -457,7 +457,7 @@ namespace cds { namespace container {
 #endif
         upsert( Q&& val, bool bAllowInsert = true )
         {
-            scoped_node_ptr pNode( alloc_node( val ) );
+            scoped_node_ptr pNode( alloc_node( val ));
 
             auto bRet = base_class::upsert( *pNode, bAllowInsert );
 
@@ -535,7 +535,7 @@ namespace cds { namespace container {
         >::type
         update( Q const& val, Func func, bool bAllowInsert = true )
         {
-            scoped_node_ptr pNode( alloc_node( val ) );
+            scoped_node_ptr pNode( alloc_node( val ));
 
             auto bRet = base_class::update( *pNode,
                 [&func]( node_type& item, node_type* old ) {
@@ -927,7 +927,7 @@ namespace cds { namespace container {
         typename std::enable_if< std::is_same<Q,Q>::value && is_iterable_list< ordered_list >::value, iterator>::type
         find_iterator_( Q& val )
         {
-            return iterator( base_class::find( val ) );
+            return iterator( base_class::find( val ));
         }
 
         template <typename Q, typename Less, typename Func>
@@ -943,7 +943,7 @@ namespace cds { namespace container {
         find_iterator_with_( Q& val, Less pred )
         {
             CDS_UNUSED( pred );
-            return iterator( base_class::find_with( val, typename maker::template predicate_wrapper<Less>::type() ));
+            return iterator( base_class::find_with( val, typename maker::template predicate_wrapper<Less>::type()));
         }
 
         struct node_disposer {
@@ -959,7 +959,7 @@ namespace cds { namespace container {
             assert( pNode != nullptr );
             scoped_node_ptr p( pNode );
 
-            if ( base_class::insert( *pNode ) ) {
+            if ( base_class::insert( *pNode )) {
                 p.release();
                 return true;
             }
index a8cf7f9b8b584a3e6aaf8136a755857f544e08d7..33b85e7104c40664a9db313f14ed158eac9181fa 100644 (file)
@@ -256,7 +256,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( base_class::begin() );
+            return iterator( base_class::begin());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a set
@@ -267,7 +267,7 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( base_class::end() );
+            return iterator( base_class::end());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
@@ -278,7 +278,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( base_class::cbegin() );
+            return const_iterator( base_class::cbegin());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a set
@@ -289,7 +289,7 @@ namespace cds { namespace container {
         /// Returns an const iterator that addresses the location succeeding the last element in a set
         const_iterator cend() const
         {
-            return const_iterator( base_class::cend() );
+            return const_iterator( base_class::cend());
         }
     //@}
 
@@ -301,7 +301,7 @@ namespace cds { namespace container {
             scoped_node_ptr p(pNode);
 
             iterator it( base_class::insert_( *pNode ));
-            if ( it != end() ) {
+            if ( it != end()) {
                 p.release();
                 return it;
             }
@@ -322,7 +322,7 @@ namespace cds { namespace container {
         template <typename Q>
         iterator insert( const Q& val )
         {
-            return insert_node( alloc_node( val ) );
+            return insert_node( alloc_node( val ));
         }
 
         /// Inserts data of type \p value_type created from \p args
@@ -332,7 +332,7 @@ namespace cds { namespace container {
         template <typename... Args>
         iterator emplace( Args&&... args )
         {
-            return insert_node( alloc_node( std::forward<Args>(args)... ) );
+            return insert_node( alloc_node( std::forward<Args>(args)... ));
         }
 
         /// Updates the item
@@ -407,7 +407,7 @@ namespace cds { namespace container {
         iterator contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return iterator( base_class::find_with_( key, typename maker::template predicate_wrapper<Less>::type() ));
+            return iterator( base_class::find_with_( key, typename maker::template predicate_wrapper<Less>::type()));
         }
         //@cond
         // eprecated, use contains()
index 91a9fc7f242fc3acc924f30d6abff112c680113a..49d11e2d545ebcb988e3773d6827857dcc0acc4b 100644 (file)
@@ -356,7 +356,7 @@ namespace cds { namespace container {
             assert( pNode != nullptr );
             scoped_node_ptr p(pNode);
 
-            if ( base_class::insert( *pNode ) ) {
+            if ( base_class::insert( *pNode )) {
                 p.release();
                 return true;
             }
@@ -507,7 +507,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( base_class::begin() );
+            return iterator( base_class::begin());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a set
@@ -518,7 +518,7 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( base_class::end() );
+            return iterator( base_class::end());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
@@ -529,7 +529,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( base_class::cbegin() );
+            return const_iterator( base_class::cbegin());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a set
@@ -540,7 +540,7 @@ namespace cds { namespace container {
         /// Returns an const iterator that addresses the location succeeding the last element in a set
         const_iterator cend() const
         {
-            return const_iterator( base_class::cend() );
+            return const_iterator( base_class::cend());
         }
     //@}
 
@@ -561,7 +561,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool insert( Q const& val )
         {
-            return insert_node( alloc_node( val ) );
+            return insert_node( alloc_node( val ));
         }
 
         /// Inserts new node
@@ -713,7 +713,7 @@ namespace cds { namespace container {
         bool erase_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-             return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type() );
+             return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type());
         }
 
         /// Deletes \p key from the set
@@ -797,7 +797,7 @@ namespace cds { namespace container {
         template <typename Q>
         exempt_ptr extract( Q const& key )
         {
-            return exempt_ptr( base_class::extract_( key, key_comparator() ));
+            return exempt_ptr( base_class::extract_( key, key_comparator()));
         }
 
         /// Extracts an item from the set using \p pred predicate for searching
@@ -905,7 +905,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, typename maker::template predicate_wrapper<Less>::type() );
+            return base_class::contains( key, typename maker::template predicate_wrapper<Less>::type());
         }
         //@cond
         template <typename Q, typename Less>
index 7aa03e12c93042ce21bf2ee34a19eb2aad3c07ef..46ecd8959ad67b26e096dd24b79af31f7bed28f0 100644 (file)
@@ -339,7 +339,7 @@ namespace cds { namespace container {
                                 std::list<std::pair<const Key, T> >::iterator itInsert,
                                 std::list<std::pair<const Key, T> >::iterator itWhat )
                             {
-                                std::pair<Key, T> newVal( itWhat->first, T() );
+                                std::pair<Key, T> newVal( itWhat->first, T());
                                 std::swap( list.insert( itInsert, newVal )->second, itWhat->second );
                             }
                         } \endcode
@@ -351,7 +351,7 @@ namespace cds { namespace container {
                                 std::list<std::pair<const Key, T> >::iterator itInsert,
                                 std::list<std::pair<const Key, T> >::iterator itWhat )
                             {
-                                list.insert( itInsert, std::move( *itWhat ) );
+                                list.insert( itInsert, std::move( *itWhat ));
                             }
                         } \endcode
                     </td>
@@ -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
                                 ));
                             }
@@ -414,7 +414,7 @@ namespace cds { namespace container {
                                 bc::slist<std::pair<const Key, T> >::iterator itInsert,
                                 bc::slist<std::pair<const Key, T> >::iterator itWhat )
                             {
-                                std::pair<Key, T> newVal( itWhat->first, T() );
+                                std::pair<Key, T> newVal( itWhat->first, T());
                                 std::swap( list.insert( itInsert, newVal )->second, itWhat->second );
                             }
                         } \endcode
@@ -426,7 +426,7 @@ namespace cds { namespace container {
                                 bc::slist<std::pair<const Key, T> >::iterator itInsert,
                                 bc::slist<std::pair<const Key, T> >::iterator itWhat )
                             {
-                                list.insert_after( itInsert, std::move( *itWhat ) );
+                                list.insert_after( itInsert, std::move( *itWhat ));
                             }
                         } \endcode
                     </td>
@@ -566,7 +566,7 @@ template <class Container, typename... Options>
         StripedMap(
             size_t nCapacity    ///< Initial size of bucket table and lock array. Must be power of two, the minimum is 16.
             ,resizing_policy&& resizingPolicy  ///< Resizing policy
-            ) : base_class( nCapacity, std::forward<resizing_policy>(resizingPolicy) )
+            ) : base_class( nCapacity, std::forward<resizing_policy>(resizingPolicy))
         {}
 
         /// Destructor destroys internal data
@@ -858,7 +858,7 @@ template <class Container, typename... Options>
         bool contains( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >() );
+            return base_class::contains( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >());
         }
         //@cond
         template <typename K, typename Less
index 217f8d95030ee35bfc2a0732e727e5560b091cd1..798fdde3bad0528d263b45ef3b04f329a2fbd4d2 100644 (file)
@@ -70,7 +70,7 @@ namespace cds { namespace container {
 
             void operator()( list_type& list, iterator itInsert, iterator itWhat )
             {
-                pair_type newVal( itWhat->first, typename pair_type::second_type() );
+                pair_type newVal( itWhat->first, typename pair_type::second_type());
                 itInsert = list.insert( itInsert, newVal );
                 std::swap( itInsert->second, itWhat->second );
             }
@@ -86,7 +86,7 @@ namespace cds { namespace container {
 
             void operator()( list_type& list, iterator itInsert, iterator itWhat )
             {
-                list.insert( itInsert, std::move( *itWhat ) );
+                list.insert( itInsert, std::move( *itWhat ));
             }
         };
     } // namespace striped_set
@@ -164,10 +164,10 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( const Q& key, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate());
                 if ( it == m_List.end() || key_comparator()( key, it->first ) != 0 ) {
                     //value_type newItem( key );
-                    it = m_List.insert( it, value_type( key_type( key ), mapped_type()) );
+                    it = m_List.insert( it, value_type( key_type( key ), mapped_type()));
                     f( *it );
 
                     return true;
@@ -181,7 +181,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool emplace( K&& key, Args&&... args )
             {
                 value_type val( key_type( std::forward<K>( key )), mapped_type( std::forward<Args>( args )... ));
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val.first, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val.first, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val.first, it->first ) != 0 ) {
                     m_List.emplace( it, std::move( val ));
                     return true;
@@ -192,13 +192,13 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             std::pair<bool, bool> update( const Q& key, Func func, bool bAllowInsert )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate());
                 if ( it == m_List.end() || key_comparator()( key, it->first ) != 0 ) {
                     // insert new
                     if ( !bAllowInsert )
                         return std::make_pair( false, false );
 
-                    it = m_List.insert( it, value_type( key_type( key ), mapped_type() ));
+                    it = m_List.insert( it, value_type( key_type( key ), mapped_type()));
                     func( true, *it );
 
                     return std::make_pair( true, true );
@@ -213,7 +213,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool erase( Q const& key, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate());
                 if ( it == m_List.end() || key_comparator()( key, it->first ) != 0 )
                     return false;
 
@@ -228,7 +228,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool erase( Q const& key, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, pred );
-                if ( it == m_List.end() || pred( key, it->first ) || pred(it->first, key) )
+                if ( it == m_List.end() || pred( key, it->first ) || pred(it->first, key))
                     return false;
 
                 // key exists
@@ -241,7 +241,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool find( Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val, it->first ) != 0 )
                     return false;
 
@@ -254,7 +254,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool find( Q& val, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, pred );
-                if ( it == m_List.end() || pred( val, it->first ) || pred( it->first, val ) )
+                if ( it == m_List.end() || pred( val, it->first ) || pred( it->first, val ))
                     return false;
 
                 // key exists
@@ -275,7 +275,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), *itWhat, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), *itWhat, find_predicate());
                 assert( it == m_List.end() || key_comparator()( itWhat->first, it->first ) != 0 );
 
                 copy_item()( m_List, it, itWhat );
index 6e9380256909bd4cd19d0d77e6117a6c2dcb3fad..904f900058d1865f8cde3c1f6d11e639d76919d6 100644 (file)
@@ -69,7 +69,7 @@ namespace cds { namespace container {
 
             void operator()( list_type& list, iterator itInsert, iterator itWhat )
             {
-                pair_type newVal( itWhat->first, typename pair_type::mapped_type() );
+                pair_type newVal( itWhat->first, typename pair_type::mapped_type());
                 itInsert = list.insert_after( itInsert, newVal );
                 std::swap( itInsert->second, itWhat->second );
             }
@@ -85,7 +85,7 @@ namespace cds { namespace container {
 
             void operator()( list_type& list, iterator itInsert, iterator itWhat )
             {
-                list.insert_after( itInsert, std::move( *itWhat ) );
+                list.insert_after( itInsert, std::move( *itWhat ));
             }
         };
     } // namespace striped_set
@@ -178,7 +178,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             {
                 std::pair< iterator, bool > pos = find_prev_item( key );
                 if ( !pos.second ) {
-                    pos.first = m_List.insert_after( pos.first, value_type( key_type( key ), mapped_type() ));
+                    pos.first = m_List.insert_after( pos.first, value_type( key_type( key ), mapped_type()));
                     f( *pos.first );
                     return true;
                 }
@@ -207,13 +207,13 @@ namespace cds { namespace intrusive { namespace striped_set {
                     if ( !bAllowInsert )
                         return std::make_pair( false, false );
 
-                    pos.first = m_List.insert_after( pos.first, value_type( key_type( key ), mapped_type() ));
+                    pos.first = m_List.insert_after( pos.first, value_type( key_type( key ), mapped_type()));
                     func( true, *pos.first );
                     return std::make_pair( true, true );
                 }
                 else {
                     // already exists
-                    func( false, *(++pos.first) );
+                    func( false, *(++pos.first));
                     return std::make_pair( true, false );
                 }
             }
@@ -227,7 +227,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
                 // key exists
                 iterator it = pos.first;
-                f( *(++it) );
+                f( *(++it));
                 m_List.erase_after( pos.first );
 
                 return true;
@@ -242,7 +242,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
                 // key exists
                 iterator it = pos.first;
-                f( *(++it) );
+                f( *(++it));
                 m_List.erase_after( pos.first );
 
                 return true;
index 4ab0a8d209f914e6a0a606da660de05ce46cf900..3f07addcae734bd5fc2b7f7090485a7b96179b98 100644 (file)
@@ -62,7 +62,7 @@ namespace cds { namespace container {
 
             void operator()( map_type& map, iterator itWhat )
             {
-                pair_type pair( itWhat->first, typename pair_type::second_type() );
+                pair_type pair( itWhat->first, typename pair_type::second_type());
                 std::pair<iterator, bool> res = map.insert( pair );
                 assert( res.second );
                 std::swap( res.first->second, itWhat->second );
@@ -79,7 +79,7 @@ namespace cds { namespace container {
 
             void operator()( map_type& map, iterator itWhat )
             {
-                map.insert( std::move( *itWhat ) );
+                map.insert( std::move( *itWhat ));
             }
         };
     }   // namespace striped_set
@@ -132,9 +132,9 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( const Q& key, Func f )
             {
-                std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type() ));
+                std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type()));
                 if ( res.second )
-                    f( const_cast<value_type&>(*res.first) );
+                    f( const_cast<value_type&>(*res.first));
                 return res.second;
             }
 
@@ -149,13 +149,13 @@ namespace cds { namespace intrusive { namespace striped_set {
             std::pair<bool, bool> update( const Q& key, Func func, bool bAllowInsert )
             {
                 if ( bAllowInsert ) {
-                    std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type() ) );
+                    std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type()) );
                     func( res.second, const_cast<value_type&>(*res.first));
                     return std::make_pair( true, res.second );
                 }
                 else {
                     auto it = m_Map.find( key_type( key ));
-                    if ( it == end() )
+                    if ( it == end())
                         return std::make_pair( false, false );
                     func( false, *it );
                     return std::make_pair( true, false );
@@ -166,9 +166,9 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool erase( const Q& key, Func f )
             {
                 iterator it = m_Map.find( key_type( key ));
-                if ( it == m_Map.end() )
+                if ( it == m_Map.end())
                     return false;
-                f( const_cast<value_type&>(*it) );
+                f( const_cast<value_type&>(*it));
                 m_Map.erase( it );
                 return true;
             }
@@ -177,7 +177,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool find( Q& key, Func f )
             {
                 iterator it = m_Map.find( key_type( key ));
-                if ( it == m_Map.end() )
+                if ( it == m_Map.end())
                     return false;
                 f( const_cast<value_type&>(*it), key );
                 return true;
@@ -195,7 +195,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                assert( m_Map.find( itWhat->first ) == m_Map.end() );
+                assert( m_Map.find( itWhat->first ) == m_Map.end());
                 copy_item()( m_Map, itWhat );
             }
 
index 2d658e0f1505fd604debd1f9b48005904869e63c..10e6a06463b84f3efe9298ed47263aff4bbbca28 100644 (file)
@@ -70,7 +70,7 @@ namespace cds { namespace container {
 
             void operator()( list_type& list, iterator itInsert, iterator itWhat )
             {
-                pair_type newVal( itWhat->first, typename pair_type::second_type() );
+                pair_type newVal( itWhat->first, typename pair_type::second_type());
                 itInsert = list.insert( itInsert, newVal );
                 std::swap( itInsert->second, itWhat->second );
             }
@@ -86,7 +86,7 @@ namespace cds { namespace container {
 
             void operator()( list_type& list, iterator itInsert, iterator itWhat )
             {
-                list.insert( itInsert, std::move( *itWhat ) );
+                list.insert( itInsert, std::move( *itWhat ));
             }
         };
     } // namespace striped_set
@@ -175,9 +175,9 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( const Q& key, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate());
                 if ( it == m_List.end() || key_comparator()( key, it->first ) != 0 ) {
-                    it = m_List.insert( it, value_type( key_type( key ), mapped_type()) );
+                    it = m_List.insert( it, value_type( key_type( key ), mapped_type()));
                     f( *it );
 
 #           if !defined(CDS_STD_LIST_SIZE_CXX11_CONFORM)
@@ -194,7 +194,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool emplace( K&& key, Args&&... args )
             {
                 value_type val( key_type( std::forward<K>( key )), mapped_type( std::forward<Args>( args )... ));
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val.first, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val.first, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val.first, it->first ) != 0 ) {
                     it = m_List.emplace( it, std::move( val ));
 
@@ -209,13 +209,13 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             std::pair<bool, bool> update( const Q& key, Func func, bool bAllowInsert )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate());
                 if ( it == m_List.end() || key_comparator()( key, it->first ) != 0 ) {
                     // insert new
                     if ( !bAllowInsert )
                         return std::make_pair( false, false );
 
-                    it = m_List.insert( it, value_type( key_type( key ), mapped_type() ));
+                    it = m_List.insert( it, value_type( key_type( key ), mapped_type()));
                     func( true, *it );
 #           if !defined(CDS_STD_LIST_SIZE_CXX11_CONFORM)
                     ++m_nSize;
@@ -232,7 +232,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool erase( Q const& key, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate());
                 if ( it == m_List.end() || key_comparator()( key, it->first ) != 0 )
                     return false;
 
@@ -250,7 +250,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool erase( Q const& key, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, pred );
-                if ( it == m_List.end() || pred( key, it->first ) || pred( it->first, key ) )
+                if ( it == m_List.end() || pred( key, it->first ) || pred( it->first, key ))
                     return false;
 
                 // key exists
@@ -266,7 +266,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool find( Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val, it->first ) != 0 )
                     return false;
 
@@ -279,7 +279,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool find( Q& val, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, pred );
-                if ( it == m_List.end() || pred( val, it->first ) || pred( it->first, val ) )
+                if ( it == m_List.end() || pred( val, it->first ) || pred( it->first, val ))
                     return false;
 
                 // key exists
@@ -299,7 +299,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), *itWhat, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), *itWhat, find_predicate());
                 assert( it == m_List.end() || key_comparator()( itWhat->first, it->first ) != 0 );
 
                 copy_item()( m_List, it, itWhat );
index b1693c8805dfa27befac3b2ea9b930a6e12fcb86..9eeca8c015dc97a43fe02b896ff55e7d796bfff0 100644 (file)
@@ -62,7 +62,7 @@ namespace cds { namespace container {
 
             void operator()( map_type& map, iterator itWhat )
             {
-                std::pair< typename map_type::iterator, bool > ret = map.insert( pair_type( itWhat->first, typename pair_type::second_type() ));
+                std::pair< typename map_type::iterator, bool > ret = map.insert( pair_type( itWhat->first, typename pair_type::second_type()));
                 assert( ret.second )    ;   // successful insertion
                 std::swap( ret.first->second, itWhat->second );
             }
@@ -78,7 +78,7 @@ namespace cds { namespace container {
 
             void operator()( map_type& map, iterator itWhat  )
             {
-                map.insert( std::move( *itWhat ) );
+                map.insert( std::move( *itWhat ));
             }
         };
     }   // namespace striped_set
@@ -132,7 +132,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( const Q& key, Func f )
             {
-                std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type() ) );
+                std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type()) );
                 if ( res.second )
                     f( *res.first );
                 return res.second;
@@ -149,13 +149,13 @@ namespace cds { namespace intrusive { namespace striped_set {
             std::pair<bool, bool> update( const Q& key, Func func, bool bAllowInsert )
             {
                 if ( bAllowInsert ) {
-                    std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type() ));
+                    std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type()));
                     func( res.second, *res.first );
                     return std::make_pair( true, res.second );
                 }
                 else {
                     auto it = m_Map.find( key_type( key ));
-                    if ( it == end() )
+                    if ( it == end())
                         return std::make_pair( false, false );
                     func( false, *it );
                     return std::make_pair( true, false );
@@ -166,7 +166,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool erase( const Q& key, Func f )
             {
                 iterator it = m_Map.find( key_type( key ));
-                if ( it == m_Map.end() )
+                if ( it == m_Map.end())
                     return false;
                 f( *it );
                 m_Map.erase( it );
@@ -177,7 +177,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool find( Q& key, Func f )
             {
                 iterator it = m_Map.find( key_type( key ));
-                if ( it == m_Map.end() )
+                if ( it == m_Map.end())
                     return false;
                 f( *it, key );
                 return true;
@@ -196,7 +196,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                assert( m_Map.find( itWhat->first ) == m_Map.end() );
+                assert( m_Map.find( itWhat->first ) == m_Map.end());
                 copy_item()( m_Map, itWhat );
             }
 
index 977c2833440dd6131f02ade6b6b022f6246626f6..87f33878795a827f0a2b1cfc83f7f428a61d08a3 100644 (file)
@@ -351,7 +351,7 @@ namespace cds { namespace container {
                         struct swap_item {
                             void operator()( std::list<T>& list, std::list<T>::iterator itInsert, std::list<T>::iterator itWhat )
                             {
-                                std::swap( *list.insert( itInsert, T() ), *itWhat );
+                                std::swap( *list.insert( itInsert, T()), *itWhat );
                             }
                         } \endcode
 
@@ -359,7 +359,7 @@ namespace cds { namespace container {
                         struct move_item {
                             void operator()( std::list<T>& list, std::list<T>::iterator itInsert, std::list<T>::iterator itWhat )
                             {
-                                list.insert( itInsert, std::move( *itWhat ) );
+                                list.insert( itInsert, std::move( *itWhat ));
                             }
                         } \endcode
                     </td>
@@ -403,7 +403,7 @@ namespace cds { namespace container {
                         struct swap_item {
                             void operator()( bc::slist<T>& list, bc::slist<T>::iterator itInsert, bc::slist<T>::iterator itWhat )
                             {
-                                std::swap( *list.insert_after( itInsert, T() ), *itWhat );
+                                std::swap( *list.insert_after( itInsert, T()), *itWhat );
                             }
                         } \endcode
 
@@ -411,7 +411,7 @@ namespace cds { namespace container {
                         struct move_item {
                             void operator()( bc::slist<T>& list, bc::slist<T>::iterator itInsert, bc::slist<T>::iterator itWhat )
                             {
-                                list.insert_after( itInsert, std::move( *itWhat ) );
+                                list.insert_after( itInsert, std::move( *itWhat ));
                             }
                         } \endcode
                     </td>
@@ -553,7 +553,7 @@ namespace cds { namespace container {
             ,resizing_policy&& resizingPolicy  ///< Resizing policy
         )
 
-            : base_class( nCapacity, std::forward<resizing_policy>(resizingPolicy) )
+            : base_class( nCapacity, std::forward<resizing_policy>(resizingPolicy))
         {}
 
         /// Destructor destroys internal data
index dd2c13081baeda3ee52f848a94b98972f396e2ee..26faff5b75214dd8891399dea76c610bf8a5fcb9 100644 (file)
@@ -260,7 +260,7 @@ namespace cds { namespace container {
 
                     void operator()( set_type& set, iterator itWhat )
                     {
-                        set.insert( std::move( *itWhat ) );
+                        set.insert( std::move( *itWhat ));
                     }
                 };
             };
@@ -306,9 +306,9 @@ namespace cds { namespace container {
                 template <typename Q, typename Func>
                 bool insert( const Q& val, Func f )
                 {
-                    std::pair<iterator, bool> res = m_Set.insert( value_type(val) );
+                    std::pair<iterator, bool> res = m_Set.insert( value_type(val));
                     if ( res.second )
-                        f( const_cast<value_type&>(*res.first) );
+                        f( const_cast<value_type&>(*res.first));
                     return res.second;
                 }
 
@@ -323,13 +323,13 @@ namespace cds { namespace container {
                 std::pair<bool, bool> update( const Q& val, Func func, bool bAllowInsert )
                 {
                     if ( bAllowInsert ) {
-                        std::pair<iterator, bool> res = m_Set.insert( value_type(val) );
+                        std::pair<iterator, bool> res = m_Set.insert( value_type(val));
                         func( res.second, const_cast<value_type&>(*res.first), val );
                         return std::make_pair( true, res.second );
                     }
                     else {
                         auto it = m_Set.find( value_type( val ));
-                        if ( it == m_Set.end() )
+                        if ( it == m_Set.end())
                             return std::make_pair( false, false );
                         func( false, const_cast<value_type&>(*it), val );
                         return std::make_pair( true, false );
@@ -339,10 +339,10 @@ namespace cds { namespace container {
                 template <typename Q, typename Func>
                 bool erase( const Q& key, Func f )
                 {
-                    const_iterator it = m_Set.find( value_type(key) );
-                    if ( it == m_Set.end() )
+                    const_iterator it = m_Set.find( value_type(key));
+                    if ( it == m_Set.end())
                         return false;
-                    f( const_cast<value_type&>(*it) );
+                    f( const_cast<value_type&>(*it));
                     m_Set.erase( it );
                     return true;
                 }
@@ -350,8 +350,8 @@ namespace cds { namespace container {
                 template <typename Q, typename Func>
                 bool find( Q& val, Func f )
                 {
-                    iterator it = m_Set.find( value_type(val) );
-                    if ( it == m_Set.end() )
+                    iterator it = m_Set.find( value_type(val));
+                    if ( it == m_Set.end())
                         return false;
                     f( const_cast<value_type&>(*it), val );
                     return true;
@@ -369,7 +369,7 @@ namespace cds { namespace container {
 
                 void move_item( adapted_container& /*from*/, iterator itWhat )
                 {
-                    assert( m_Set.find( *itWhat ) == m_Set.end() );
+                    assert( m_Set.find( *itWhat ) == m_Set.end());
                     copy_item()( m_Set, itWhat );
                 }
 
@@ -399,7 +399,7 @@ namespace cds { namespace container {
 
                     void operator()( map_type& map, iterator itWhat )
                     {
-                        std::pair< iterator, bool > ret = map.insert( pair_type( itWhat->first, typename pair_type::second_type() ));
+                        std::pair< iterator, bool > ret = map.insert( pair_type( itWhat->first, typename pair_type::second_type()));
                         assert( ret.second )    ;   // successful insertion
                         std::swap( ret.first->second, itWhat->second );
                     }
@@ -412,7 +412,7 @@ namespace cds { namespace container {
 
                     void operator()( map_type& map, iterator itWhat  )
                     {
-                        map.insert( std::move( *itWhat ) );
+                        map.insert( std::move( *itWhat ));
                     }
                 };
             };
@@ -452,7 +452,7 @@ namespace cds { namespace container {
                 template <typename Q, typename Func>
                 bool insert( const Q& key, Func f )
                 {
-                    std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type() ) );
+                    std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type()) );
                     if ( res.second )
                         f( *res.first );
                     return res.second;
@@ -469,13 +469,13 @@ namespace cds { namespace container {
                 std::pair<bool, bool> update( const Q& key, Func func, bool bAllowInsert )
                 {
                     if ( bAllowInsert ) {
-                        std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type() ));
+                        std::pair<iterator, bool> res = m_Map.insert( value_type( key_type( key ), mapped_type()));
                         func( res.second, *res.first );
                         return std::make_pair( true, res.second );
                     }
                     else {
                         auto it = m_Map.find( key_type( key ));
-                        if ( it == end() )
+                        if ( it == end())
                             return std::make_pair( false, false );
                         func( false, *it );
                         return std::make_pair( true, false );
@@ -486,7 +486,7 @@ namespace cds { namespace container {
                 bool erase( const Q& key, Func f )
                 {
                     iterator it = m_Map.find( key_type( key ));
-                    if ( it == m_Map.end() )
+                    if ( it == m_Map.end())
                         return false;
                     f( *it );
                     m_Map.erase( it );
@@ -497,7 +497,7 @@ namespace cds { namespace container {
                 bool find( Q& val, Func f )
                 {
                     iterator it = m_Map.find( key_type( val ));
-                    if ( it == m_Map.end() )
+                    if ( it == m_Map.end())
                         return false;
                     f( *it, val );
                     return true;
@@ -515,7 +515,7 @@ namespace cds { namespace container {
 
                 void move_item( adapted_container& /*from*/, iterator itWhat )
                 {
-                    assert( m_Map.find( itWhat->first ) == m_Map.end() );
+                    assert( m_Map.find( itWhat->first ) == m_Map.end());
                     copy_item()( m_Map, itWhat );
                 }
 
index dd49b2ec5bedb9318447ade359eb6915a5c92981..3647c88fcb20799507793c01fe4b99a36fb9fdcb 100644 (file)
@@ -82,7 +82,7 @@ namespace cds { namespace container {
 
             void operator()( list_type& list, iterator itInsert, iterator itWhat )
             {
-                list.insert( itInsert, std::move( *itWhat ) );
+                list.insert( itInsert, std::move( *itWhat ));
             }
         };
     }   // namespace striped_set
@@ -158,7 +158,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( Q const& val, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val, *it ) != 0 ) {
                     value_type newItem( val );
                     it = m_List.insert( it, newItem );
@@ -175,9 +175,9 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool emplace( Args&&... args )
             {
                 value_type val( std::forward<Args>(args)... );
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val, *it ) != 0 ) {
-                    m_List.emplace( it, std::move( val ) );
+                    m_List.emplace( it, std::move( val ));
                     return true;
                 }
                 return false;
@@ -186,7 +186,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             std::pair<bool, bool> update( Q const& val, Func func, bool bAllowInsert )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val, *it ) != 0 ) {
                     // insert new
                     if ( !bAllowInsert )
@@ -207,7 +207,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool erase( Q const& key, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate());
                 if ( it == m_List.end() || key_comparator()( key, *it ) != 0 )
                     return false;
 
@@ -222,7 +222,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool erase( Q const& key, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, pred );
-                if ( it == m_List.end() || pred( key, *it ) || pred( *it, key ) )
+                if ( it == m_List.end() || pred( key, *it ) || pred( *it, key ))
                     return false;
 
                 // key exists
@@ -235,7 +235,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool find( Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val, *it ) != 0 )
                     return false;
 
@@ -248,7 +248,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool find( Q& val, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, pred );
-                if ( it == m_List.end() || pred( val, *it ) || pred( *it, val ) )
+                if ( it == m_List.end() || pred( val, *it ) || pred( *it, val ))
                     return false;
 
                 // key exists
@@ -269,7 +269,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), *itWhat, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), *itWhat, find_predicate());
                 assert( it == m_List.end() || key_comparator()( *itWhat, *it ) != 0 );
 
                 copy_item()( m_List, it, itWhat );
index 04c0ba237ef81588d0362cb7d08f32a97f96e158..9da3702ed3fbc96ad98d56143fc327400bb00f98 100644 (file)
@@ -76,7 +76,7 @@ namespace cds { namespace container {
 
             void operator()( list_type& list, iterator itInsert, iterator itWhat )
             {
-                list.insert_after( itInsert, std::move( *itWhat ) );
+                list.insert_after( itInsert, std::move( *itWhat ));
             }
         };
 
@@ -145,7 +145,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 for ( iterator it = m_List.begin(); it != itEnd; ++it ) {
                     if ( pred( key, *it ))
                         itPrev = it;
-                    else if ( pred( *it, key ) )
+                    else if ( pred( *it, key ))
                         break;
                     else
                         return std::make_pair( itPrev, true );
@@ -185,7 +185,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 value_type val( std::forward<Args>(args)... );
                 std::pair< iterator, bool > pos = find_prev_item( val );
                 if ( !pos.second ) {
-                    m_List.emplace_after( pos.first, std::move( val ) );
+                    m_List.emplace_after( pos.first, std::move( val ));
                     return true;
                 }
                 return false;
@@ -221,7 +221,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
                 // key exists
                 iterator it = pos.first;
-                f( *(++it) );
+                f( *(++it));
                 m_List.erase_after( pos.first );
 
                 return true;
@@ -236,7 +236,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
                 // key exists
                 iterator it = pos.first;
-                f( *(++it) );
+                f( *(++it));
                 m_List.erase_after( pos.first );
 
                 return true;
index a5201c2c1f78df9de36f8e4787f127ce7029fe91..b83508b535601699c02bfbb34f5f95796d2f50a7 100644 (file)
@@ -156,7 +156,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( const Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 ) {
                     value_type newItem( val );
                     it = m_Vector.insert( it, newItem );
@@ -170,9 +170,9 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool emplace( Args&&... args )
             {
                 value_type val( std::forward<Args>(args)... );
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 ) {
-                    it = m_Vector.emplace( it, std::move( val ) );
+                    it = m_Vector.emplace( it, std::move( val ));
                     return true;
                 }
                 return false;
@@ -181,7 +181,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             std::pair<bool, bool> update( const Q& val, Func func, bool bAllowInsert )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 ) {
                     // insert new
                     if ( !bAllowInsert )
@@ -202,7 +202,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool erase( const Q& key, Func f )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), key, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( key, *it ) != 0 )
                     return false;
 
@@ -216,7 +216,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool erase( const Q& key, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), key, pred );
-                if ( it == m_Vector.end() || pred( key, *it ) || pred( *it, key ) )
+                if ( it == m_Vector.end() || pred( key, *it ) || pred( *it, key ))
                     return false;
 
                 // key exists
@@ -228,7 +228,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool find( Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 )
                     return false;
 
@@ -241,7 +241,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool find( Q& val, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, pred );
-                if ( it == m_Vector.end() || pred( val, *it ) || pred( *it, val ) )
+                if ( it == m_Vector.end() || pred( val, *it ) || pred( *it, val ))
                     return false;
 
                 // key exists
@@ -262,7 +262,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), *itWhat, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), *itWhat, find_predicate());
                 assert( it == m_Vector.end() || key_comparator()( *itWhat, *it ) != 0 );
 
                 copy_item()( m_Vector, it, itWhat );
index 21a6d32e05fbb8590f09b56048ec97208c6bf424..94927d9fdb85c840733974174472c4540a993a1b 100644 (file)
@@ -156,7 +156,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( const Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 ) {
                     value_type newItem( val );
                     it = m_Vector.insert( it, newItem );
@@ -170,9 +170,9 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool emplace( Args&&... args )
             {
                 value_type val( std::forward<Args>(args)... );
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 ) {
-                    it = m_Vector.emplace( it, std::move( val ) );
+                    it = m_Vector.emplace( it, std::move( val ));
                     return true;
                 }
                 return false;
@@ -181,7 +181,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             std::pair<bool, bool> update( const Q& val, Func func, bool bAllowInsert )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 ) {
                     // insert new
                     if ( !bAllowInsert )
@@ -202,7 +202,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool erase( const Q& key, Func f )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), key, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( key, *it ) != 0 )
                     return false;
 
@@ -216,7 +216,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool erase( Q const& key, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), key, pred );
-                if ( it == m_Vector.end() || pred( key, *it ) || pred( *it, key ) )
+                if ( it == m_Vector.end() || pred( key, *it ) || pred( *it, key ))
                     return false;
 
                 // key exists
@@ -228,7 +228,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool find( Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 )
                     return false;
 
@@ -241,7 +241,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool find( Q& val, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, pred );
-                if ( it == m_Vector.end() || pred( val, *it ) || pred( *it, val ) )
+                if ( it == m_Vector.end() || pred( val, *it ) || pred( *it, val ))
                     return false;
 
                 // key exists
@@ -262,7 +262,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), *itWhat, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), *itWhat, find_predicate());
                 assert( it == m_Vector.end() || key_comparator()( *itWhat, *it ) != 0 );
 
                 copy_item()( m_Vector, it, itWhat );
index 14c300d642a250bd2374880c8c526a8c7db4c856..ca3342eb51ccf703b8227c63f4ce2d543fe68383 100644 (file)
@@ -64,7 +64,7 @@ namespace cds { namespace container {
 
             void operator()( set_type& set, iterator itWhat )
             {
-                set.insert( std::move( *itWhat ) );
+                set.insert( std::move( *itWhat ));
             }
         };
 
@@ -115,9 +115,9 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( const Q& val, Func f )
             {
-                std::pair<iterator, bool> res = m_Set.insert( value_type(val) );
+                std::pair<iterator, bool> res = m_Set.insert( value_type(val));
                 if ( res.second )
-                    f( const_cast<value_type&>(*res.first) );
+                    f( const_cast<value_type&>(*res.first));
                 return res.second;
             }
 
@@ -132,13 +132,13 @@ namespace cds { namespace intrusive { namespace striped_set {
             std::pair<bool, bool> update( const Q& val, Func func, bool bAllowInsert )
             {
                 if ( bAllowInsert ) {
-                    std::pair<iterator, bool> res = m_Set.insert( value_type(val) );
+                    std::pair<iterator, bool> res = m_Set.insert( value_type(val));
                     func( res.second, const_cast<value_type&>(*res.first), val );
                     return std::make_pair( true, res.second );
                 }
                 else {
                     auto it = m_Set.find( value_type(val));
-                    if ( it == m_Set.end() )
+                    if ( it == m_Set.end())
                         return std::make_pair( false, false );
 
                     func( false, const_cast<value_type&>(*it), val );
@@ -149,10 +149,10 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool erase( const Q& key, Func f )
             {
-                const_iterator it = m_Set.find( value_type(key) );
-                if ( it == m_Set.end() )
+                const_iterator it = m_Set.find( value_type(key));
+                if ( it == m_Set.end())
                     return false;
-                f( const_cast<value_type&>(*it) );
+                f( const_cast<value_type&>(*it));
                 m_Set.erase( it );
                 return true;
             }
@@ -160,8 +160,8 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool find( Q& val, Func f )
             {
-                iterator it = m_Set.find( value_type(val) );
-                if ( it == m_Set.end() )
+                iterator it = m_Set.find( value_type(val));
+                if ( it == m_Set.end())
                     return false;
                 f( const_cast<value_type&>(*it), val );
                 return true;
@@ -180,7 +180,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                assert( m_Set.find( *itWhat ) == m_Set.end() );
+                assert( m_Set.find( *itWhat ) == m_Set.end());
                 copy_item()( m_Set, itWhat );
             }
 
index 93b9fa0e2ae89a1d34b51ca8a3e0974796d4bca0..491f6fc02f1d6211680c5c866b65149a7cf49340 100644 (file)
@@ -82,7 +82,7 @@ namespace cds { namespace container {
 
             void operator()( list_type& list, iterator itInsert, iterator itWhat )
             {
-                list.insert( itInsert, std::move( *itWhat ) );
+                list.insert( itInsert, std::move( *itWhat ));
             }
         };
     }   // namespace striped_set
@@ -169,7 +169,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( const Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val, *it ) != 0 ) {
                     value_type newItem( val );
                     it = m_List.insert( it, newItem );
@@ -189,9 +189,9 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool emplace( Args&&... args )
             {
                 value_type val(std::forward<Args>(args)...);
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val, *it ) != 0 ) {
-                    it = m_List.emplace( it, std::move( val ) );
+                    it = m_List.emplace( it, std::move( val ));
 #           if !defined(CDS_STD_LIST_SIZE_CXX11_CONFORM)
                     ++m_nSize;
 #           endif
@@ -203,7 +203,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             std::pair<bool, bool> update( const Q& val, Func func, bool bAllowInsert )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val, *it ) != 0 ) {
                     // insert new
                     if ( !bAllowInsert )
@@ -227,7 +227,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool erase( const Q& key, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, find_predicate());
                 if ( it == m_List.end() || key_comparator()( key, *it ) != 0 )
                     return false;
 
@@ -245,7 +245,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool erase( Q const& key, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_List.begin(), m_List.end(), key, pred );
-                if ( it == m_List.end() || pred( key, *it ) || pred( *it, key ) )
+                if ( it == m_List.end() || pred( key, *it ) || pred( *it, key ))
                     return false;
 
                 // key exists
@@ -261,7 +261,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool find( Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, find_predicate());
                 if ( it == m_List.end() || key_comparator()( val, *it ) != 0 )
                     return false;
 
@@ -274,7 +274,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool find( Q& val, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_List.begin(), m_List.end(), val, pred );
-                if ( it == m_List.end() || pred( val, *it ) || pred( *it, val ) )
+                if ( it == m_List.end() || pred( val, *it ) || pred( *it, val ))
                     return false;
 
                 // key exists
@@ -295,7 +295,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                iterator it = std::lower_bound( m_List.begin(), m_List.end(), *itWhat, find_predicate() );
+                iterator it = std::lower_bound( m_List.begin(), m_List.end(), *itWhat, find_predicate());
                 assert( it == m_List.end() || key_comparator()( *itWhat, *it ) != 0 );
 
                 copy_item()( m_List, it, itWhat );
index 31cb883c9cb83889085818f022aaa0e16cba8d8f..95ace96fbde698d2db956cba372d5adbdc7e30cd 100644 (file)
@@ -64,7 +64,7 @@ namespace cds { namespace container {
 
             void operator()( set_type& set, iterator itWhat )
             {
-                set.insert( std::move( *itWhat ) );
+                set.insert( std::move( *itWhat ));
             }
         };
     }   // namespace striped_set
@@ -116,9 +116,9 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( const Q& val, Func f )
             {
-                std::pair<iterator, bool> res = m_Set.insert( value_type(val) );
+                std::pair<iterator, bool> res = m_Set.insert( value_type(val));
                 if ( res.second )
-                    f( const_cast<value_type&>(*res.first) );
+                    f( const_cast<value_type&>(*res.first));
                 return res.second;
             }
 
@@ -133,13 +133,13 @@ namespace cds { namespace intrusive { namespace striped_set {
             std::pair<bool, bool> update( const Q& val, Func func, bool bAllowInsert )
             {
                 if ( bAllowInsert ) {
-                    std::pair<iterator, bool> res = m_Set.insert( value_type(val) );
+                    std::pair<iterator, bool> res = m_Set.insert( value_type(val));
                     func( res.second, const_cast<value_type&>(*res.first), val );
                     return std::make_pair( true, res.second );
                 }
                 else {
                     auto it = m_Set.find(value_type(val));
-                    if ( it == m_Set.end() )
+                    if ( it == m_Set.end())
                         return std::make_pair( false, false );
                     func( false, const_cast<value_type&>(*it), val );
                     return std::make_pair( true, false );
@@ -149,10 +149,10 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool erase( const Q& key, Func f )
             {
-                iterator it = m_Set.find( value_type(key) );
-                if ( it == m_Set.end() )
+                iterator it = m_Set.find( value_type(key));
+                if ( it == m_Set.end())
                     return false;
-                f( const_cast<value_type&>(*it) );
+                f( const_cast<value_type&>(*it));
                 m_Set.erase( it );
                 return true;
             }
@@ -160,8 +160,8 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool find( Q& val, Func f )
             {
-                iterator it = m_Set.find( value_type(val) );
-                if ( it == m_Set.end() )
+                iterator it = m_Set.find( value_type(val));
+                if ( it == m_Set.end())
                     return false;
                 f( const_cast<value_type&>(*it), val );
                 return true;
@@ -179,7 +179,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                assert( m_Set.find( *itWhat ) == m_Set.end() );
+                assert( m_Set.find( *itWhat ) == m_Set.end());
                 copy_item()( m_Set, itWhat );
             }
 
index 35a886ec66e17fe506657b78966111eac421a90f..1656088c283336335f8d9d7bde0351548cea24a0 100644 (file)
@@ -153,7 +153,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool insert( const Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 ) {
                     value_type newItem( val );
                     it = m_Vector.insert( it, newItem );
@@ -173,9 +173,9 @@ namespace cds { namespace intrusive { namespace striped_set {
 #else
                 value_type val( std::forward<Args>(args)... );
 #endif
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 ) {
-                    it = m_Vector.emplace( it, std::move( val ) );
+                    it = m_Vector.emplace( it, std::move( val ));
                     return true;
                 }
                 return false;
@@ -184,7 +184,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             std::pair<bool, bool> update( const Q& val, Func func, bool bAllowInsert )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 ) {
                     // insert new
                     if ( !bAllowInsert )
@@ -205,7 +205,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool erase( const Q& key, Func f )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), key, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), key, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( key, *it ) != 0 )
                     return false;
 
@@ -219,7 +219,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool erase( const Q& key, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), key, pred );
-                if ( it == m_Vector.end() || pred( key, *it ) || pred( *it, key ) )
+                if ( it == m_Vector.end() || pred( key, *it ) || pred( *it, key ))
                     return false;
 
                 // key exists
@@ -231,7 +231,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             template <typename Q, typename Func>
             bool find( Q& val, Func f )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, find_predicate());
                 if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 )
                     return false;
 
@@ -244,7 +244,7 @@ namespace cds { namespace intrusive { namespace striped_set {
             bool find( Q& val, Less pred, Func f )
             {
                 iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), val, pred );
-                if ( it == m_Vector.end() || pred( val, *it ) || pred( *it, val ) )
+                if ( it == m_Vector.end() || pred( val, *it ) || pred( *it, val ))
                     return false;
 
                 // key exists
@@ -265,7 +265,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
             void move_item( adapted_container& /*from*/, iterator itWhat )
             {
-                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), *itWhat, find_predicate() );
+                iterator it = std::lower_bound( m_Vector.begin(), m_Vector.end(), *itWhat, find_predicate());
                 assert( it == m_Vector.end() || key_comparator()( *itWhat, *it ) != 0 );
 
                 copy_item()( m_Vector, it, itWhat );
index acf23be58d30a34b716875ee552a9177961edd56..741b31ba69868b47a8ff6be75a61819764fc5d35 100644 (file)
@@ -290,7 +290,7 @@ namespace cds { namespace container {
         bool enqueue( value_type&& val )
         {
             scoped_node_ptr p( alloc_node_move( std::move( val )));
-            if ( base_class::enqueue( *p ) ) {
+            if ( base_class::enqueue( *p )) {
                 p.release();
                 return true;
             }
@@ -310,7 +310,7 @@ namespace cds { namespace container {
         template <typename Func>
         bool enqueue_with( Func f )
         {
-            scoped_node_ptr p( alloc_node() );
+            scoped_node_ptr p( alloc_node());
             f( *p );
             if ( base_class::enqueue( *p )) {
                 p.release();
index d8439236d36aa689bee488f8895becc290bf7d0a..d9365949bc9916a7fe6a15027ebca16c48b79ecd 100644 (file)
@@ -282,7 +282,7 @@ namespace cds { namespace container {
                 }
                 else if (dif < 0) {
                     // Queue full?
-                    if ( pos - m_posDequeue.load( memory_model::memory_order_relaxed ) == capacity() )
+                    if ( pos - m_posDequeue.load( memory_model::memory_order_relaxed ) == capacity())
                         return false;   // queue full
                     bkoff();
                     pos = m_posEnqueue.load( memory_model::memory_order_relaxed );
@@ -483,7 +483,7 @@ namespace cds { namespace container {
         void clear()
         {
             value_type v;
-            while ( pop(v) );
+            while ( pop(v));
         }
 
         /// Returns queue's item count
index 1eddfa6e7394103ba647de5d5c9761db6acc8a17..2ebd656e6f70bc097be13f0cfa919869b5b0295d 100644 (file)
@@ -41,7 +41,7 @@ namespace cds { namespace details {
         equal to another type alignment. For example, the following declaration produces an error in Microsoft Visual Studio 2008 compiler:
         \code
             typedef double  my_double;
-            typedef __declspec(align( __alignof(my_double) )) int   aligned_int;
+            typedef __declspec(align( __alignof(my_double))) int   aligned_int;
         \endcode
         In MS VS, the __declspec(align(N)) construction requires that N must be a integer constant (1, 2, 4 and so on)
         but not an integer constant expression.
index 945432f461b5c6ae62e58294b0813c916e43a182..002e79e3b9bb9aec2db6942525b1ef9276ef0546 100644 (file)
@@ -75,7 +75,7 @@ namespace cds { namespace bitop {
             --m_nCounter;
             int nBit;
             for ( nBit = m_nHighBit - 1; nBit >= 0; --nBit ) {
-                if ( cds::bitop::complement( m_nReversed, nBit ) )
+                if ( cds::bitop::complement( m_nReversed, nBit ))
                     break;
             }
             if ( nBit < 0 ) {
index e5eedd0d64d029876637970d7ece11aba20a455d..3eae7964a81491a8fa012859156a9c2b518fbcae 100644 (file)
@@ -164,7 +164,7 @@ namespace cds {
                 return 0;
             if ( x & 0xffffffffu )
                 return lsb32( (uint32_t) x );
-            return lsb32( (uint32_t) (x >> 32) ) + 32;
+            return lsb32( (uint32_t) (x >> 32)) + 32;
         }
 #endif
 
@@ -198,7 +198,7 @@ namespace cds {
         static inline uint64_t rbo64( uint64_t x )
         {
             //                      Low 32bit                                          Hight 32bit
-            return ( static_cast<uint64_t>(rbo32( (uint32_t) x )) << 32 ) | ( static_cast<uint64_t>( rbo32( (uint32_t) (x >> 32) )));
+            return ( static_cast<uint64_t>(rbo32( (uint32_t) x )) << 32 ) | ( static_cast<uint64_t>( rbo32( (uint32_t) (x >> 32))));
         }
 #endif
 
@@ -225,7 +225,7 @@ namespace cds {
 #        ifdef cds_beans_zbc64_DEFINED
             return 64 - zbc64( x );
 #        else
-            return sbc32( (uint32_t) (x >> 32) ) + sbc32( (uint32_t) x );
+            return sbc32( (uint32_t) (x >> 32)) + sbc32( (uint32_t) x );
 #        endif
         }
 #endif
index 88751b6205ef1af509de796b098e2dd565200a90..127963471a4e217f1430561cbcc0efc9dae596d4 100644 (file)
@@ -77,24 +77,24 @@ namespace cds {
             explicit bounded_array(
                 size_t nCapacity            ///< capacity
             )
-            : m_arr( allocator_impl().NewArray( nCapacity ) )
+            : m_arr( allocator_impl().NewArray( nCapacity ))
             , m_nCapacity( nCapacity )
             {}
 
             ~bounded_array()
             {
-                allocator_impl().Delete( m_arr, capacity() );
+                allocator_impl().Delete( m_arr, capacity());
             }
 
             const value_type& operator []( size_t nItem ) const
             {
-                assert( nItem < capacity() );
+                assert( nItem < capacity());
                 return m_arr[nItem];
             }
 
             value_type& operator []( size_t nItem )
             {
-                assert( nItem < capacity() );
+                assert( nItem < capacity());
                 return m_arr[nItem];
             }
 
index b83701bba1e43e54c772eb63972fcff339856e7f..671b69614fc4e009c62d4ff5d92b392da1661c8c 100644 (file)
     int plugin_entry_point()
     {
         // Attach the thread if it is not attached yet
-        if ( !cds::threading::Manager::isThreadAttached() )
+        if ( !cds::threading::Manager::isThreadAttached())
             cds::threading::Manager::attachThread();
 
         // Do some work with HP-related containers
index 1a02c038b796c82cc2dedbaa55ca93b5c809a695..de43ea7368311d7a332ea3ea48706c5be71204f7 100644 (file)
@@ -162,7 +162,7 @@ namespace cds {
             marked_ptr& operator &=( int nBits ) CDS_NOEXCEPT
             {
                 assert( (nBits & pointer_bitmask) == 0 );
-                m_ptr = to_ptr( to_int() & (pointer_bitmask | nBits) );
+                m_ptr = to_ptr( to_int() & (pointer_bitmask | nBits));
                 return *this;
             }
 
@@ -365,7 +365,7 @@ CDS_CXX11_ATOMIC_BEGIN_NAMESPACE
         {}
 
         CDS_CONSTEXPR explicit atomic(marked_ptr val) CDS_NOEXCEPT
-            : m_atomic( val.all() )
+            : m_atomic( val.all())
         {}
         CDS_CONSTEXPR explicit atomic(T * p) CDS_NOEXCEPT
             : m_atomic( p )
index 79a655b2b2370caa1d15bd17139cbce4e19094e0..927476575c04f635ebd056df05d100b8ad34fc89 100644 (file)
@@ -318,7 +318,7 @@ namespace cds { namespace gc {
                     do {
                         pLast->m_pNext.store( pHead, atomics::memory_order_relaxed );
                         // pHead is changed by compare_exchange_weak
-                    } while ( !m_pHead.compare_exchange_weak( pHead, pFirst, atomics::memory_order_release, atomics::memory_order_relaxed ) );
+                    } while ( !m_pHead.compare_exchange_weak( pHead, pFirst, atomics::memory_order_release, atomics::memory_order_relaxed ));
 
                     return m_nItemCount.fetch_add( nSize, atomics::memory_order_relaxed ) + 1;
                 }
@@ -668,15 +668,15 @@ namespace cds { namespace gc {
             /**@anchor dhp_gc_retirePtr
             */
             template <typename T>
-            void retirePtr( T * p, void (* pFunc)(T *) )
+            void retirePtr( T * p, void (* pFunc)(T *))
             {
-                retirePtr( retired_ptr( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ) ) );
+                retirePtr( retired_ptr( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc )) );
             }
 
             /// Places retired pointer \p into thread's array of retired pointer for deferred reclamation
             void retirePtr( retired_ptr const& p )
             {
-                if ( m_RetiredBuffer.push( m_RetiredAllocator.alloc(p)) >= m_nLiberateThreshold.load(atomics::memory_order_relaxed) )
+                if ( m_RetiredBuffer.push( m_RetiredAllocator.alloc(p)) >= m_nLiberateThreshold.load(atomics::memory_order_relaxed))
                     scan();
             }
 
@@ -736,7 +736,7 @@ namespace cds { namespace gc {
         public:
             /// Default constructor
             ThreadGC()
-                : m_gc( GarbageCollector::instance() )
+                : m_gc( GarbageCollector::instance())
                 , m_pList( nullptr )
                 , m_pFree( nullptr )
             {}
@@ -852,7 +852,7 @@ namespace cds { namespace gc {
 
             /// Places retired pointer \p and its deleter \p pFunc into list of retired pointer for deferred reclamation
             template <typename T>
-            void retirePtr( T * p, void (* pFunc)(T *) )
+            void retirePtr( T * p, void (* pFunc)(T *))
             {
                 m_gc.retirePtr( p, pFunc );
             }
index 9855a227396b5c7fadfb8d56b1189bfd3854e286..cfd68b9348a6b2f9101faf09283483617a43e765 100644 (file)
@@ -134,19 +134,19 @@ namespace cds {
                 /// Set vector size. Uses internally
                 void size( size_t nSize )
                 {
-                    assert( nSize <= capacity() );
+                    assert( nSize <= capacity());
                     m_nSize = nSize;
                 }
 
                 /// Pushes retired pointer to the vector
                 void push( retired_ptr const& p )
                 {
-                    assert( m_nSize < capacity() );
+                    assert( m_nSize < capacity());
                     m_arr[ m_nSize ] = p;
                     ++m_nSize;
                 }
 
-                /// Checks if the vector is full (size() == capacity() )
+                /// Checks if the vector is full (size() == capacity())
                 bool isFull() const CDS_NOEXCEPT
                 {
                     return m_nSize >= capacity();
@@ -307,7 +307,7 @@ namespace cds {
                 ~hplist_node()
                 {
                     assert( m_idOwner.load( atomics::memory_order_relaxed ) == OS::c_NullThreadId );
-                    assert( m_bFree.load(atomics::memory_order_relaxed) );
+                    assert( m_bFree.load(atomics::memory_order_relaxed));
                 }
                 //@endcond
             };
@@ -553,7 +553,7 @@ namespace cds {
         public:
             /// Default constructor
             ThreadGC()
-                : m_HzpManager( GarbageCollector::instance() ),
+                : m_HzpManager( GarbageCollector::instance()),
                 m_pHzpRec( nullptr )
             {}
 
@@ -617,7 +617,7 @@ namespace cds {
 
             /// Places retired pointer \p and its deleter \p pFunc into thread's array of retired pointer for deferred reclamation
             template <typename T>
-            void retirePtr( T * p, void (* pFunc)(T *) )
+            void retirePtr( T * p, void (* pFunc)(T *))
             {
                 retirePtr( details::retired_ptr( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc )));
             }
@@ -627,7 +627,7 @@ namespace cds {
             {
                 m_pHzpRec->m_arrRetired.push( p );
 
-                if ( m_pHzpRec->m_arrRetired.isFull() ) {
+                if ( m_pHzpRec->m_arrRetired.isFull()) {
                     // Max of retired pointer count is reached. Do scan
                     scan();
                 }
@@ -657,12 +657,12 @@ namespace cds {
     namespace gc { namespace hp { namespace details {
 
         inline retired_vector::retired_vector( const cds::gc::hp::GarbageCollector& HzpMgr )
-            : m_arr( HzpMgr.getMaxRetiredPtrCount() ),
+            : m_arr( HzpMgr.getMaxRetiredPtrCount()),
             m_nSize(0)
         {}
 
         inline hp_record::hp_record( const cds::gc::hp::GarbageCollector& HzpMgr )
-            : m_hzp( HzpMgr.getHazardPointerCount() )
+            : m_hzp( HzpMgr.getHazardPointerCount())
             , m_arrRetired( HzpMgr )
             , m_nSync( 0 )
         {}
index 27b864166efeae6dbb078a527c4d1142bde75716..6ad47ca44ca9b9178ce0f3053f296f5b816592c4 100644 (file)
@@ -195,7 +195,7 @@ namespace cds {
 
             hp_guard* release( size_t nIndex ) CDS_NOEXCEPT
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
 
                 hp_guard* p = m_arr[ nIndex ];
                 m_arr[ nIndex ] = nullptr;
@@ -249,7 +249,7 @@ namespace cds {
             /// Dtor
             ~hp_allocator()
             {
-                allocator_impl().Delete( m_arrHazardPtr, capacity() );
+                allocator_impl().Delete( m_arrHazardPtr, capacity());
             }
 
             /// Get capacity of array
@@ -342,7 +342,7 @@ namespace cds {
             /// Returns i-th hazard pointer
             hp_guard& operator []( size_t i ) CDS_NOEXCEPT
             {
-                assert( i < capacity() );
+                assert( i < capacity());
                 return m_arrHazardPtr[i];
             }
 
index 636f099bebf8393cbc661df0bbe6d7b1e9a2e1ff..03e7c1a8e963846e830bce8b32e55be4f8f85314 100644 (file)
@@ -96,7 +96,7 @@ namespace cds { namespace gc {
                 assert( m_p );
                 m_funcFree( m_p );
 
-                CDS_STRICT_DO( clear() );
+                CDS_STRICT_DO( clear());
             }
 
             /// Checks if the retired pointer is not empty
index ba4e41727fc9af43e94bf6a445c5497cf06f3d8d..e4a46ad571e5e2e57abb7f49c70af46a501ffc55 100644 (file)
@@ -241,7 +241,7 @@ namespace cds { namespace gc {
                         value_type * operator()( T * p );
                     };
                 \endcode
-                Really, the result of <tt> f( toGuard.load() ) </tt> is assigned to the hazard pointer.
+                Really, the result of <tt> f( toGuard.load()) </tt> is assigned to the hazard pointer.
             */
             template <typename T, class Func>
             T protect( atomics::atomic<T> const& toGuard, Func f )
@@ -250,7 +250,7 @@ namespace cds { namespace gc {
                 T pRet;
                 do {
                     pRet = pCur;
-                    assign( f( pCur ) );
+                    assign( f( pCur ));
                     pCur = toGuard.load(atomics::memory_order_acquire);
                 } while ( pRet != pCur );
                 return pCur;
@@ -287,13 +287,13 @@ namespace cds { namespace gc {
             template <typename T, int BITMASK>
             T* assign( cds::details::marked_ptr<T, BITMASK> p )
             {
-                return assign( p.ptr() );
+                return assign( p.ptr());
             }
 
             /// Copy from \p src guard to \p this guard
             void copy( Guard const& src )
             {
-                assign( src.get_native() );
+                assign( src.get_native());
             }
 
             /// Clears value of the guard
@@ -307,7 +307,7 @@ namespace cds { namespace gc {
             template <typename T>
             T * get() const
             {
-                return reinterpret_cast<T *>( get_native() );
+                return reinterpret_cast<T *>( get_native());
             }
 
             /// Gets native guarded pointer stored
@@ -390,7 +390,7 @@ namespace cds { namespace gc {
             {
                 T pRet;
                 do {
-                    pRet = assign( nIndex, toGuard.load(atomics::memory_order_acquire) );
+                    pRet = assign( nIndex, toGuard.load(atomics::memory_order_acquire));
                 } while ( pRet != toGuard.load(atomics::memory_order_relaxed));
 
                 return pRet;
@@ -411,14 +411,14 @@ namespace cds { namespace gc {
                         value_type * operator()( T * p );
                     };
                 \endcode
-                Actually, the result of <tt> f( toGuard.load() ) </tt> is assigned to the hazard pointer.
+                Actually, the result of <tt> f( toGuard.load()) </tt> is assigned to the hazard pointer.
             */
             template <typename T, class Func>
             T protect( size_t nIndex, atomics::atomic<T> const& toGuard, Func f )
             {
                 T pRet;
                 do {
-                    assign( nIndex, f( pRet = toGuard.load(atomics::memory_order_acquire) ));
+                    assign( nIndex, f( pRet = toGuard.load(atomics::memory_order_acquire)));
                 } while ( pRet != toGuard.load(atomics::memory_order_relaxed));
 
                 return pRet;
@@ -447,13 +447,13 @@ namespace cds { namespace gc {
             template <typename T, int Bitmask>
             T * assign( size_t nIndex, cds::details::marked_ptr<T, Bitmask> p )
             {
-                return assign( nIndex, p.ptr() );
+                return assign( nIndex, p.ptr());
             }
 
             /// Copy guarded value from \p src guard to slot at index \p nIndex
             void copy( size_t nIndex, Guard const& src )
             {
-                assign( nIndex, src.get_native() );
+                assign( nIndex, src.get_native());
             }
 
             /// Copy guarded value from slot \p nSrcIndex to slot at index \p nDestIndex
@@ -465,7 +465,7 @@ namespace cds { namespace gc {
             /// Clear value of the slot \p nIndex
             void clear( size_t nIndex )
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
                 assert( m_arr[nIndex] != nullptr );
 
                 m_arr[nIndex]->pPost.store( nullptr, atomics::memory_order_release );
@@ -475,13 +475,13 @@ namespace cds { namespace gc {
             template <typename T>
             T * get( size_t nIndex ) const
             {
-                return reinterpret_cast<T *>( get_native( nIndex ) );
+                return reinterpret_cast<T *>( get_native( nIndex ));
             }
 
             /// Get native guarded pointer stored
             guarded_pointer get_native( size_t nIndex ) const
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
                 assert( m_arr[nIndex] != nullptr );
 
                 return m_arr[nIndex]->pPost.load( atomics::memory_order_acquire );
@@ -490,7 +490,7 @@ namespace cds { namespace gc {
             //@cond
             dhp::details::guard_data* release( size_t nIndex ) CDS_NOEXCEPT
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
 
                 dhp::details::guard_data* ret = m_arr[ nIndex ];
                 m_arr[nIndex] = nullptr;
@@ -609,7 +609,7 @@ namespace cds { namespace gc {
 
             /// Ctor from \p Guard
             explicit guarded_ptr( Guard&& g ) CDS_NOEXCEPT
-                : m_guard( g.release() )
+                : m_guard( g.release())
             {}
 
             /// The guarded pointer is not copy-constructible
@@ -634,7 +634,7 @@ namespace cds { namespace gc {
             /// Move-assignment from \p Guard
             guarded_ptr& operator=( Guard&& g ) CDS_NOEXCEPT
             {
-                std::swap( m_guard, g.guard_ref() );
+                std::swap( m_guard, g.guard_ref());
                 return *this;
             }
 
@@ -644,7 +644,7 @@ namespace cds { namespace gc {
             /// Returns a pointer to guarded value
             value_type * operator ->() const CDS_NOEXCEPT
             {
-                assert( !empty() );
+                assert( !empty());
                 return value_cast()( reinterpret_cast<guarded_type *>(m_guard->get()));
             }
 
@@ -658,7 +658,7 @@ namespace cds { namespace gc {
             /// Returns const reference to guarded value
             value_type const& operator *() const CDS_NOEXCEPT
             {
-                assert( !empty() );
+                assert( !empty());
                 return *value_cast()(reinterpret_cast<guarded_type *>(m_guard->get()));
             }
 
@@ -781,7 +781,7 @@ namespace cds { namespace gc {
             Deleting the pointer is the function \p pFunc call.
         */
         template <typename T>
-        static void retire( T * p, void (* pFunc)(T *) )
+        static void retire( T * p, void (* pFunc)(T *))
         {
             dhp::GarbageCollector::instance().retirePtr( p, pFunc );
         }
index 7f5c5bb459bbd490b9e12a017eab4462c64e5f3a..70a68df77baadb58dc9b5a75c82d7c91308aa39d 100644 (file)
@@ -72,7 +72,7 @@ namespace cds { namespace gc {
         )
         : m_bPersistent( bPersistent )
     {
-        if ( !cds::threading::Manager::isThreadAttached() )
+        if ( !cds::threading::Manager::isThreadAttached())
             cds::threading::Manager::attachThread();
     }
 
index 0ecd01088145d99863bbfbb8a05e0539cfcac6dd..601fc01ccedddd5d7af542b234b805cc7f40de93 100644 (file)
@@ -243,7 +243,7 @@ namespace cds { namespace gc {
                         value_type * operator()( T * p );
                     };
                 \endcode
-                Actually, the result of <tt> f( toGuard.load() ) </tt> is assigned to the hazard pointer.
+                Actually, the result of <tt> f( toGuard.load()) </tt> is assigned to the hazard pointer.
 
                 @warning The guad object should be in linked state, otherwise the result is undefined
             */
@@ -256,7 +256,7 @@ namespace cds { namespace gc {
                 T pRet;
                 do {
                     pRet = pCur;
-                    assign( f( pCur ) );
+                    assign( f( pCur ));
                     pCur = toGuard.load(atomics::memory_order_acquire);
                 } while ( pRet != pCur );
                 return pCur;
@@ -283,7 +283,7 @@ namespace cds { namespace gc {
             /// Copy a value guarded from \p src guard to \p this guard (valid only in linked state)
             void copy( Guard const& src )
             {
-                assign( src.get_native() );
+                assign( src.get_native());
             }
 
             /// Store marked pointer \p p to the guard
@@ -309,7 +309,7 @@ namespace cds { namespace gc {
             template <typename T>
             T * get() const
             {
-                return reinterpret_cast<T *>( get_native() );
+                return reinterpret_cast<T *>( get_native());
             }
 
             /// Get native hazard pointer stored (valid only in linked state)
@@ -392,7 +392,7 @@ namespace cds { namespace gc {
 
                 T pRet;
                 do {
-                    pRet = assign( nIndex, toGuard.load(atomics::memory_order_acquire) );
+                    pRet = assign( nIndex, toGuard.load(atomics::memory_order_acquire));
                 } while ( pRet != toGuard.load(atomics::memory_order_acquire));
 
                 return pRet;
@@ -413,16 +413,16 @@ namespace cds { namespace gc {
                         value_type * operator()( T * p );
                     };
                 \endcode
-                Really, the result of <tt> f( toGuard.load() ) </tt> is assigned to the hazard pointer.
+                Really, the result of <tt> f( toGuard.load()) </tt> is assigned to the hazard pointer.
             */
             template <typename T, class Func>
             T protect( size_t nIndex, atomics::atomic<T> const& toGuard, Func f )
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
 
                 T pRet;
                 do {
-                    assign( nIndex, f( pRet = toGuard.load(atomics::memory_order_acquire) ));
+                    assign( nIndex, f( pRet = toGuard.load(atomics::memory_order_acquire)));
                 } while ( pRet != toGuard.load(atomics::memory_order_acquire));
 
                 return pRet;
@@ -443,13 +443,13 @@ namespace cds { namespace gc {
             template <typename T, int BITMASK>
             T * assign( size_t nIndex, cds::details::marked_ptr<T, BITMASK> p )
             {
-                return assign( nIndex, p.ptr() );
+                return assign( nIndex, p.ptr());
             }
 
             /// Copy guarded value from \p src guard to slot at index \p nIndex
             void copy( size_t nIndex, Guard const& src )
             {
-                assign( nIndex, src.get_native() );
+                assign( nIndex, src.get_native());
             }
 
             /// Copy guarded value from slot \p nSrcIndex to slot at index \p nDestIndex
@@ -468,13 +468,13 @@ namespace cds { namespace gc {
             template <typename T>
             T * get( size_t nIndex ) const
             {
-                return reinterpret_cast<T *>( get_native( nIndex ) );
+                return reinterpret_cast<T *>( get_native( nIndex ));
             }
 
             /// Get native hazard pointer stored
             guarded_pointer get_native( size_t nIndex ) const
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
                 return m_arr[nIndex]->get();
             }
 
@@ -597,7 +597,7 @@ namespace cds { namespace gc {
 
             /// Ctor from \p Guard
             explicit guarded_ptr( Guard&& g ) CDS_NOEXCEPT
-                : m_pGuard( g.release() )
+                : m_pGuard( g.release())
             {}
 
             /// The guarded pointer is not copy-constructible
@@ -622,7 +622,7 @@ namespace cds { namespace gc {
             /// Move-assignment from \p Guard
             guarded_ptr& operator=( Guard&& g ) CDS_NOEXCEPT
             {
-                std::swap( m_pGuard, g.guard_ref() );
+                std::swap( m_pGuard, g.guard_ref());
                 return *this;
             }
 
@@ -632,7 +632,7 @@ namespace cds { namespace gc {
             /// Returns a pointer to guarded value
             value_type * operator ->() const CDS_NOEXCEPT
             {
-                assert( !empty() );
+                assert( !empty());
                 return value_cast()( reinterpret_cast<guarded_type *>(m_pGuard->get()));
             }
 
@@ -646,7 +646,7 @@ namespace cds { namespace gc {
             /// Returns const reference to guarded value
             value_type const& operator *() const CDS_NOEXCEPT
             {
-                assert( !empty() );
+                assert( !empty());
                 return *value_cast()(reinterpret_cast<guarded_type *>(m_pGuard->get()));
             }
 
@@ -792,7 +792,7 @@ namespace cds { namespace gc {
             Deleting the pointer is the function \p pFunc call.
         */
         template <typename T>
-        static void retire( T * p, void (* pFunc)(T *) );   // inline in hp_impl.h
+        static void retire( T * p, void (* pFunc)(T *));   // inline in hp_impl.h
 
         /// Retire pointer \p p with functor of type \p Disposer
         /**
@@ -857,7 +857,7 @@ namespace cds { namespace gc {
             scan_type nScanType     ///< new scan strategy
         )
         {
-            hp::GarbageCollector::instance().setScanType( static_cast<hp::scan_type>(nScanType) );
+            hp::GarbageCollector::instance().setScanType( static_cast<hp::scan_type>(nScanType));
         }
 
         /// Checks if Hazard Pointer GC is constructed and may be used
index 995a8bd082080fa4c37b01fdd8b2ba39f28cddb0..3639888038c2b616c32a689a480dff2740779aaa 100644 (file)
@@ -49,7 +49,7 @@ namespace cds { namespace gc {
         )
         : m_bPersistent( bPersistent )
     {
-        if ( !threading::Manager::isThreadAttached() )
+        if ( !threading::Manager::isThreadAttached())
             threading::Manager::attachThread();
     }
 
@@ -120,7 +120,7 @@ namespace cds { namespace gc {
     template <typename T>
     inline T * HP::GuardArray<Count>::assign( size_t nIndex, T* p )
     {
-        assert( nIndex < capacity() );
+        assert( nIndex < capacity());
 
         m_arr.set(nIndex, p);
         hp::get_thread_gc().sync();
@@ -128,7 +128,7 @@ namespace cds { namespace gc {
     }
 
     template <typename T>
-    inline void HP::retire( T * p, void (* pFunc)(T *) )
+    inline void HP::retire( T * p, void (* pFunc)(T *))
     {
         cds::threading::getGC<HP>().retirePtr( p, pFunc );
     }
index 7b76d6bca28dc974bd76a2d3ce5ad3cfdd9ee8eb..bf7fac3a6721172548a6f3f43a43a5353fb2ea52 100644 (file)
@@ -65,7 +65,7 @@ namespace cds {
     {
         CDS_UNUSED( nFeatureFlags );
 
-        if ( cds::details::init_first_call() )
+        if ( cds::details::init_first_call())
         {
             cds::OS::topology::init();
             cds::threading::ThreadData::s_nProcCount = cds::OS::topology::processor_count();
@@ -85,7 +85,7 @@ namespace cds {
     */
     static inline void Terminate()
     {
-        if ( cds::details::fini_last_call() ) {
+        if ( cds::details::fini_last_call()) {
             cds::threading::Manager::fini();
 
             cds::OS::topology::fini();
index da98cc0d0528d1a62dc97a3f1650121b187b73c1..a279bd56d515c34ef313b9807e01dbced5c53f18 100644 (file)
@@ -413,10 +413,10 @@ namespace cds { namespace intrusive {
             {
             public:
                 // placeholder ctor
-                lock_array(): lock_array_type( typename lock_array_type::select_cell_policy(2) ) {}
+                lock_array(): lock_array_type( typename lock_array_type::select_cell_policy(2)) {}
 
                 // real ctor
-                lock_array( size_t nCapacity ): lock_array_type( nCapacity, typename lock_array_type::select_cell_policy(nCapacity) ) {}
+                lock_array( size_t nCapacity ): lock_array_type( nCapacity, typename lock_array_type::select_cell_policy(nCapacity)) {}
             };
 
             class scoped_lock: public std::unique_lock< lock_array_type >
@@ -469,7 +469,7 @@ namespace cds { namespace intrusive {
                     if ( m_bLocked ) {
                         m_guard[0] = &(policy.m_Locks[0].at(nCell));
                         for ( unsigned int i = 1; i < c_nArity; ++i ) {
-                            m_guard[i] = &( policy.m_Locks[i].at( policy.m_Locks[i].lock( arrHash[i] )) );
+                            m_guard[i] = &( policy.m_Locks[i].at( policy.m_Locks[i].lock( arrHash[i] )));
                         }
                     }
                     else {
@@ -703,7 +703,7 @@ namespace cds { namespace intrusive {
 
             lock_array_ptr create_lock_array( size_t nCapacity )
             {
-                return lock_array_ptr( lock_array_allocator().New( nCapacity ), lock_array_disposer() );
+                return lock_array_ptr( lock_array_allocator().New( nCapacity ), lock_array_disposer());
             }
 
             void acquire( size_t const * arrHash, lock_array_ptr * pLockArr, lock_type ** parrLock )
@@ -723,7 +723,7 @@ namespace cds { namespace intrusive {
                     // wait while resizing
                     while ( true ) {
                         who = m_Owner.load( atomics::memory_order_acquire );
-                        if ( !( who & 1 ) || (who >> 1) == (me & c_nOwnerMask) )
+                        if ( !( who & 1 ) || (who >> 1) == (me & c_nOwnerMask))
                             break;
                         bkoff();
                         m_Stat.onCellWaitResizing();
@@ -743,7 +743,7 @@ namespace cds { namespace intrusive {
                         }
 
                         who = m_Owner.load( atomics::memory_order_acquire );
-                        if ( ( !(who & 1) || (who >> 1) == (me & c_nOwnerMask) ) && m_arrLocks[0] == pLockArr[0] ) {
+                        if ( ( !(who & 1) || (who >> 1) == (me & c_nOwnerMask)) && m_arrLocks[0] == pLockArr[0] ) {
                             m_Stat.onCellLock();
                             return;
                         }
@@ -778,7 +778,7 @@ namespace cds { namespace intrusive {
                 parrLock[0] = &(m_arrLocks[0]->at(nCell));
 
                 for ( unsigned int i = 1; i < c_nArity; ++i ) {
-                    parrLock[i] = &( m_arrLocks[i]->at( m_arrLocks[i]->lock( arrHash[i] & nMask)) );
+                    parrLock[i] = &( m_arrLocks[i]->at( m_arrLocks[i]->lock( arrHash[i] & nMask)));
                 }
 
                 m_Stat.onSecondCellLock();
@@ -1335,7 +1335,7 @@ namespace cds { namespace intrusive {
                 {
                     node_type * pPrev = itPrev.pNode;
                     node_type * pWhat = itWhat.pNode;
-                    assert( (!pPrev && pWhat == pHead) || (pPrev && pPrev->m_pNext == pWhat) );
+                    assert( (!pPrev && pWhat == pHead) || (pPrev && pPrev->m_pNext == pWhat));
 
                     if ( pPrev )
                         pPrev->m_pNext = pWhat->m_pNext;
@@ -1993,7 +1993,7 @@ namespace cds { namespace intrusive {
 
         void allocate_bucket_tables( size_t nSize )
         {
-            assert( cds::beans::is_power2( nSize ) );
+            assert( cds::beans::is_power2( nSize ));
 
             m_nBucketMask = nSize - 1;
             bucket_table_allocator alloc;
@@ -2041,7 +2041,7 @@ namespace cds { namespace intrusive {
                 unsigned int nTable = contains( arrPos, arrHash, val, pred );
                 if ( nTable != c_nUndefTable ) {
                     node_type& node = *arrPos[nTable].itFound;
-                    f( *node_traits::to_value_ptr(node) );
+                    f( *node_traits::to_value_ptr(node));
                     bucket( nTable, arrHash[nTable]).remove( arrPos[nTable].itPrev, arrPos[nTable].itFound );
                     --m_ItemCounter;
                     m_Stat.onEraseSuccess();
@@ -2094,14 +2094,14 @@ namespace cds { namespace intrusive {
                         return true;
                     }
 
-                    pVal = node_traits::to_value_ptr( *refBucket.begin() );
+                    pVal = node_traits::to_value_ptr( *refBucket.begin());
                     copy_hash( arrHash, *pVal );
 
                     scoped_cell_trylock guard2( m_MutexPolicy, arrHash );
-                    if ( !guard2.locked() )
+                    if ( !guard2.locked())
                         continue ;  // try one more time
 
-                    refBucket.remove( typename bucket_entry::iterator(), refBucket.begin() );
+                    refBucket.remove( typename bucket_entry::iterator(), refBucket.begin());
 
                     unsigned int i = (nTable + 1) % c_nArity;
 
@@ -2110,7 +2110,7 @@ namespace cds { namespace intrusive {
                         bucket_entry& bkt = bucket( i, arrHash[i] );
                         if ( bkt.size() < m_nProbesetThreshold ) {
                             position pos;
-                            contains_action::find( bkt, pos, i, arrHash[i], *pVal, key_predicate() ) ; // must return false!
+                            contains_action::find( bkt, pos, i, arrHash[i], *pVal, key_predicate()) ; // must return false!
                             bkt.insert_after( pos.itPrev, node_traits::to_node_ptr( pVal ));
                             m_Stat.onSuccessRelocateRound();
                             return true;
@@ -2124,7 +2124,7 @@ namespace cds { namespace intrusive {
                         bucket_entry& bkt = bucket( i, arrHash[i] );
                         if ( bkt.size() < m_nProbesetSize ) {
                             position pos;
-                            contains_action::find( bkt, pos, i, arrHash[i], *pVal, key_predicate() ) ; // must return false!
+                            contains_action::find( bkt, pos, i, arrHash[i], *pVal, key_predicate()) ; // must return false!
                             bkt.insert_after( pos.itPrev, node_traits::to_node_ptr( pVal ));
                             nTable = i;
                             memcpy( arrGoalHash, arrHash, sizeof(arrHash));
@@ -2154,7 +2154,7 @@ namespace cds { namespace intrusive {
             {
                 scoped_resize_lock guard( m_MutexPolicy );
 
-                if ( nOldCapacity != bucket_count() ) {
+                if ( nOldCapacity != bucket_count()) {
                     m_Stat.onFalseResizeCall();
                     return;
                 }
@@ -2179,7 +2179,7 @@ namespace cds { namespace intrusive {
 
                             value_type& val = *node_traits::to_value_ptr( *it );
                             copy_hash( arrHash, val );
-                            contains( arrPos, arrHash, val, key_predicate() ) ; // must return c_nUndefTable
+                            contains( arrPos, arrHash, val, key_predicate()) ; // must return c_nUndefTable
 
                             for ( unsigned int i = 0; i < c_nArity; ++i ) {
                                 bucket_entry& refBucket = bucket( i, arrHash[i] );
@@ -2195,7 +2195,7 @@ namespace cds { namespace intrusive {
                                 if ( refBucket.size() < m_nProbesetSize ) {
                                     refBucket.insert_after( arrPos[i].itPrev, &*it );
                                     assert( refBucket.size() > 1 );
-                                    copy_hash( arrHash, *node_traits::to_value_ptr( *refBucket.begin()) );
+                                    copy_hash( arrHash, *node_traits::to_value_ptr( *refBucket.begin()));
                                     m_Stat.onResizeRelocateCall();
                                     relocate( i, arrHash );
                                     break;
@@ -2231,7 +2231,7 @@ namespace cds { namespace intrusive {
             Probe set threshold = probe set size - 1
         */
         CuckooSet()
-            : m_nProbesetSize( calc_probeset_size(0) )
+            : m_nProbesetSize( calc_probeset_size(0))
             , m_nProbesetThreshold( m_nProbesetSize - 1 )
             , m_MutexPolicy( c_nDefaultInitialSize )
         {
@@ -2251,7 +2251,7 @@ namespace cds { namespace intrusive {
             , unsigned int nProbesetSize        ///< probe set size
             , unsigned int nProbesetThreshold = 0   ///< probe set threshold, <tt>nProbesetThreshold < nProbesetSize</tt>. If 0, <tt>nProbesetThreshold = nProbesetSize - 1</tt>
         )
-            : m_nProbesetSize( calc_probeset_size(nProbesetSize) )
+            : m_nProbesetSize( calc_probeset_size(nProbesetSize))
             , m_nProbesetThreshold( nProbesetThreshold ? nProbesetThreshold : m_nProbesetSize - 1 )
             , m_MutexPolicy( cds::beans::ceil2(nInitialSize ? nInitialSize : c_nDefaultInitialSize ))
         {
@@ -2268,7 +2268,7 @@ namespace cds { namespace intrusive {
         CuckooSet(
             hash_tuple_type const& h    ///< hash functor tuple of type <tt>std::tuple<H1, H2, ... Hn></tt> where <tt> n == \ref c_nArity </tt>
         )
-            : m_nProbesetSize( calc_probeset_size(0) )
+            : m_nProbesetSize( calc_probeset_size(0))
             , m_nProbesetThreshold( m_nProbesetSize -1 )
             , m_Hash( h )
             , m_MutexPolicy( c_nDefaultInitialSize )
@@ -2290,7 +2290,7 @@ namespace cds { namespace intrusive {
             , unsigned int nProbesetThreshold   ///< probe set threshold, <tt>nProbesetThreshold < nProbesetSize</tt>. If 0, <tt>nProbesetThreshold = nProbesetSize - 1</tt>
             , hash_tuple_type const& h    ///< hash functor tuple of type <tt>std::tuple<H1, H2, ... Hn></tt> where <tt> n == \ref c_nArity </tt>
         )
-            : m_nProbesetSize( calc_probeset_size(nProbesetSize) )
+            : m_nProbesetSize( calc_probeset_size(nProbesetSize))
             , m_nProbesetThreshold( nProbesetThreshold ? nProbesetThreshold : m_nProbesetSize - 1)
             , m_Hash( h )
             , m_MutexPolicy( cds::beans::ceil2(nInitialSize ? nInitialSize : c_nDefaultInitialSize ))
@@ -2308,9 +2308,9 @@ namespace cds { namespace intrusive {
         CuckooSet(
             hash_tuple_type&& h     ///< hash functor tuple of type <tt>std::tuple<H1, H2, ... Hn></tt> where <tt> n == \ref c_nArity </tt>
         )
-            : m_nProbesetSize( calc_probeset_size(0) )
+            : m_nProbesetSize( calc_probeset_size(0))
             , m_nProbesetThreshold( m_nProbesetSize / 2 )
-            , m_Hash( std::forward<hash_tuple_type>(h) )
+            , m_Hash( std::forward<hash_tuple_type>(h))
             , m_MutexPolicy( c_nDefaultInitialSize )
         {
             check_common_constraints();
@@ -2330,9 +2330,9 @@ namespace cds { namespace intrusive {
             , unsigned int nProbesetThreshold   ///< probe set threshold, <tt>nProbesetThreshold < nProbesetSize</tt>. If 0, <tt>nProbesetThreshold = nProbesetSize - 1</tt>
             , hash_tuple_type&& h    ///< hash functor tuple of type <tt>std::tuple<H1, H2, ... Hn></tt> where <tt> n == \ref c_nArity </tt>
         )
-            : m_nProbesetSize( calc_probeset_size(nProbesetSize) )
+            : m_nProbesetSize( calc_probeset_size(nProbesetSize))
             , m_nProbesetThreshold( nProbesetThreshold ? nProbesetThreshold : m_nProbesetSize - 1)
-            , m_Hash( std::forward<hash_tuple_type>(h) )
+            , m_Hash( std::forward<hash_tuple_type>(h))
             , m_MutexPolicy( cds::beans::ceil2(nInitialSize ? nInitialSize : c_nDefaultInitialSize ))
         {
             check_common_constraints();
@@ -2389,7 +2389,7 @@ namespace cds { namespace intrusive {
                 {
                     scoped_cell_lock guard( m_MutexPolicy, arrHash );
 
-                    if ( contains( arrPos, arrHash, val, key_predicate() ) != c_nUndefTable ) {
+                    if ( contains( arrPos, arrHash, val, key_predicate()) != c_nUndefTable ) {
                         m_Stat.onInsertFailed();
                         return false;
                     }
@@ -2413,7 +2413,7 @@ namespace cds { namespace intrusive {
                             ++m_ItemCounter;
                             nGoalTable = i;
                             assert( refBucket.size() > 1 );
-                            copy_hash( arrHash, *node_traits::to_value_ptr( *refBucket.begin()) );
+                            copy_hash( arrHash, *node_traits::to_value_ptr( *refBucket.begin()));
                             goto do_relocate;
                         }
                     }
@@ -2475,7 +2475,7 @@ namespace cds { namespace intrusive {
                 {
                     scoped_cell_lock guard( m_MutexPolicy, arrHash );
 
-                    unsigned int nTable = contains( arrPos, arrHash, val, key_predicate() );
+                    unsigned int nTable = contains( arrPos, arrHash, val, key_predicate());
                     if ( nTable != c_nUndefTable ) {
                         func( false, *node_traits::to_value_ptr( *arrPos[nTable].itFound ), val );
                         m_Stat.onUpdateExist();
@@ -2507,7 +2507,7 @@ namespace cds { namespace intrusive {
                             ++m_ItemCounter;
                             nGoalTable = i;
                             assert( refBucket.size() > 1 );
-                            copy_hash( arrHash, *node_traits::to_value_ptr( *refBucket.begin()) );
+                            copy_hash( arrHash, *node_traits::to_value_ptr( *refBucket.begin()));
                             goto do_relocate;
                         }
                     }
@@ -2555,7 +2555,7 @@ namespace cds { namespace intrusive {
             {
                 scoped_cell_lock guard( m_MutexPolicy, arrHash );
 
-                unsigned int nTable = contains( arrPos, arrHash, val, key_predicate() );
+                unsigned int nTable = contains( arrPos, arrHash, val, key_predicate());
                 if ( nTable != c_nUndefTable && node_traits::to_value_ptr(*arrPos[nTable].itFound) == &val ) {
                     bucket( nTable, arrHash[nTable]).remove( arrPos[nTable].itPrev, arrPos[nTable].itFound );
                     --m_ItemCounter;
@@ -2740,7 +2740,7 @@ namespace cds { namespace intrusive {
         */
         void clear()
         {
-            clear_and_dispose( disposer() );
+            clear_and_dispose( disposer());
         }
 
         /// Clears the set and calls \p disposer for each item
index 551ef3e81319a75decaa8fd7696916d9ad174c81..a3398f3b3777c25eefaede2ae77e69c2a4683f4a 100644 (file)
@@ -240,14 +240,14 @@ namespace cds { namespace intrusive {
                 : base_class( true )
                 , m_pLeft( nullptr )
                 , m_pRight( nullptr )
-                , m_pUpdate( update_ptr() )
+                , m_pUpdate( update_ptr())
                 , m_nEmptyUpdate(0)
             {}
 
             //@cond
             update_ptr null_update_desc()
             {
-                return update_ptr( reinterpret_cast<update_desc_type *>( (++m_nEmptyUpdate << 2) & 0xFFFF ) );
+                return update_ptr( reinterpret_cast<update_desc_type *>( (++m_nEmptyUpdate << 2) & 0xFFFF ));
             }
 
             base_class * get_child( bool bRight, atomics::memory_order mo ) const
@@ -629,9 +629,9 @@ namespace cds { namespace intrusive {
                 template <typename LeafNode>
                 int operator()( internal_node<key_type, LeafNode> const& n1, internal_node<key_type, LeafNode> const& n2 ) const
                 {
-                    if ( n1.infinite_key() )
+                    if ( n1.infinite_key())
                         return n2.infinite_key() ? n1.infinite_key() - n2.infinite_key() : 1;
-                    else if ( n2.infinite_key() )
+                    else if ( n2.infinite_key())
                         return -1;
                     return operator()( n1.m_Key, n2.m_Key );
                 }
@@ -639,7 +639,7 @@ namespace cds { namespace intrusive {
                 template <typename LeafNode, typename Q>
                 int operator()( internal_node<key_type, LeafNode> const& n, Q const& v ) const
                 {
-                    if ( n.infinite_key() )
+                    if ( n.infinite_key())
                         return 1;
                     return operator()( n.m_Key, v );
                 }
@@ -647,7 +647,7 @@ namespace cds { namespace intrusive {
                 template <typename LeafNode, typename Q>
                 int operator()( Q const& v, internal_node<key_type, LeafNode> const& n ) const
                 {
-                    if ( n.infinite_key() )
+                    if ( n.infinite_key())
                         return -1;
                     return operator()( v, n.m_Key );
                 }
@@ -655,7 +655,7 @@ namespace cds { namespace intrusive {
                 template <typename GC, typename Tag>
                 int operator()( node<GC, Tag> const& n1, node<GC, Tag> const& n2 ) const
                 {
-                    if ( n1.infinite_key() != n2.infinite_key() )
+                    if ( n1.infinite_key() != n2.infinite_key())
                         return n1.infinite_key() - n2.infinite_key();
                     return operator()( *node_traits::to_value_ptr( n1 ), *node_traits::to_value_ptr( n2 ));
                 }
@@ -663,7 +663,7 @@ namespace cds { namespace intrusive {
                 template <typename GC, typename Tag, typename Q>
                 int operator()( node<GC, Tag> const& n, Q const& v ) const
                 {
-                    if ( n.infinite_key() )
+                    if ( n.infinite_key())
                         return 1;
                     return operator()( *node_traits::to_value_ptr( n ), v );
                 }
@@ -671,24 +671,24 @@ namespace cds { namespace intrusive {
                 template <typename GC, typename Tag, typename Q>
                 int operator()( Q const& v, node<GC, Tag> const& n ) const
                 {
-                    if ( n.infinite_key() )
+                    if ( n.infinite_key())
                         return -1;
-                    return operator()( v, *node_traits::to_value_ptr( n ) );
+                    return operator()( v, *node_traits::to_value_ptr( n ));
                 }
 
                 template <typename GC>
                 int operator()( base_node<GC> const& n1, base_node<GC> const& n2 ) const
                 {
-                    if ( n1.infinite_key() != n2.infinite_key() )
+                    if ( n1.infinite_key() != n2.infinite_key())
                         return n1.infinite_key() - n2.infinite_key();
-                    if ( n1.is_leaf() ) {
-                        if ( n2.is_leaf() )
+                    if ( n1.is_leaf()) {
+                        if ( n2.is_leaf())
                             return operator()( node_traits::to_leaf_node( n1 ), node_traits::to_leaf_node( n2 ));
                         else
                             return operator()( node_traits::to_leaf_node( n1 ), node_traits::to_internal_node( n2 ));
                     }
 
-                    if ( n2.is_leaf() )
+                    if ( n2.is_leaf())
                         return operator()( node_traits::to_internal_node( n1 ), node_traits::to_leaf_node( n2 ));
                     else
                         return operator()( node_traits::to_internal_node( n1 ), node_traits::to_internal_node( n2 ));
@@ -699,7 +699,7 @@ namespace cds { namespace intrusive {
                 {
                     if ( n.infinite_key())
                         return 1;
-                    if ( n.is_leaf() )
+                    if ( n.is_leaf())
                         return operator()( node_traits::to_leaf_node( n ), v );
                     return operator()( node_traits::to_internal_node( n ), v );
                 }
@@ -713,7 +713,7 @@ namespace cds { namespace intrusive {
                 template <typename GC, typename LeafNode >
                 int operator()( base_node<GC> const& i, internal_node<key_type, LeafNode> const& n ) const
                 {
-                    if ( i.is_leaf() )
+                    if ( i.is_leaf())
                         return operator()( static_cast<LeafNode const&>(i), n );
                     return operator()( static_cast<internal_node<key_type, LeafNode> const&>(i), n );
                 }
@@ -727,8 +727,8 @@ namespace cds { namespace intrusive {
                 template <typename GC, typename Tag >
                 int operator()( node<GC, Tag> const& n, internal_node<key_type, node<GC, Tag> > const& i ) const
                 {
-                    if ( !n.infinite_key() ) {
-                        if ( i.infinite_key() )
+                    if ( !n.infinite_key()) {
+                        if ( i.infinite_key())
                             return -1;
                         return operator()( n, i.m_Key );
                     }
index aa135fdf5d3f7824b95a8a9f7f57aad6d50d4313..7abd08e6a751469b983c52fc25ae62fb88803d24 100644 (file)
@@ -134,11 +134,11 @@ namespace cds { namespace intrusive {
                 void next()
                 {
                     if ( m_pCurBucket < m_pEndBucket ) {
-                        if ( ++m_itList != m_pCurBucket->end() )
+                        if ( ++m_itList != m_pCurBucket->end())
                             return;
                         while ( ++m_pCurBucket < m_pEndBucket ) {
                             m_itList = m_pCurBucket->begin();
-                            if ( m_itList != m_pCurBucket->end() )
+                            if ( m_itList != m_pCurBucket->end())
                                 return;
                         }
                     }
@@ -162,7 +162,7 @@ namespace cds { namespace intrusive {
                     , m_itList( it )
                     , m_pEndBucket( pLast )
                 {
-                    if ( it == pFirst->end() )
+                    if ( it == pFirst->end())
                         next();
                 }
 
index 51de4129d85fd19eee82f9eeb49a02ba80f0e76b..a3c0ea230830813f1b6825b96cb9e529b212ca72 100644 (file)
@@ -107,8 +107,8 @@ namespace cds { namespace intrusive {
             /// Access to element of next pointer array
             atomic_marked_ptr& next( unsigned int nLevel )
             {
-                assert( nLevel < height() );
-                assert( nLevel == 0 || (nLevel > 0 && m_arrNext != nullptr) );
+                assert( nLevel < height());
+                assert( nLevel == 0 || (nLevel > 0 && m_arrNext != nullptr));
 
 #           ifdef CDS_THREAD_SANITIZER_ENABLED
                 // TSan false positive: m_arrNext is read-only array
@@ -124,7 +124,7 @@ namespace cds { namespace intrusive {
             /// Access to element of next pointer array (const version)
             atomic_marked_ptr const& next( unsigned int nLevel ) const
             {
-                assert( nLevel < height() );
+                assert( nLevel < height());
                 assert( nLevel == 0 || nLevel > 0 && m_arrNext != nullptr );
 
 #           ifdef CDS_THREAD_SANITIZER_ENABLED
@@ -686,7 +686,7 @@ namespace cds { namespace intrusive {
                 static node_type * make_tower( node_type * pNode, unsigned int nHeight )
                 {
                     if ( nHeight > 1 )
-                        pNode->make_tower( nHeight, tower_allocator().NewArray( nHeight - 1, nullptr ) );
+                        pNode->make_tower( nHeight, tower_allocator().NewArray( nHeight - 1, nullptr ));
                     return pNode;
                 }
 
index 44b7d349c729fcc982eab01b334de46fb98ff576..d24ddb3fce52e8379326d5f2c2fc06466508df33 100644 (file)
@@ -54,14 +54,14 @@ namespace cds { namespace intrusive {
             hash_node()
                 : m_nHash( 0 )
             {
-                assert( is_dummy() );
+                assert( is_dummy());
             }
 
             /// Initializes dummy node with \p nHash value
             hash_node( size_t nHash )
                 : m_nHash( nHash )
             {
-                assert( is_dummy() );
+                assert( is_dummy());
             }
 
             /// Checks if the node is dummy node
@@ -88,14 +88,14 @@ namespace cds { namespace intrusive {
             node()
                 : hash_node(0)
             {
-                assert( is_dummy() );
+                assert( is_dummy());
             }
 
             /// Initializes dummy node with \p nHash value
             node( size_t nHash )
                 : hash_node( nHash )
             {
-                assert( is_dummy() );
+                assert( is_dummy());
             }
 
             /// Checks if the node is dummy node
@@ -114,14 +114,14 @@ namespace cds { namespace intrusive {
             node()
                 : hash_node( 0 )
             {
-                assert( is_dummy() );
+                assert( is_dummy());
             }
 
             /// Initializes dummy node with \p nHash value
             node( size_t nHash )
                 : hash_node( nHash )
             {
-                assert( is_dummy() );
+                assert( is_dummy());
             }
 
             /// Checks if the node is dummy node
@@ -416,11 +416,11 @@ namespace cds { namespace intrusive {
                 size_t nLoadFactor        ///< Load factor
                 )
                 : m_nLoadFactor( nLoadFactor > 0 ? nLoadFactor : (size_t) 1 )
-                , m_nCapacity( cds::beans::ceil2( nItemCount / m_nLoadFactor ) )
+                , m_nCapacity( cds::beans::ceil2( nItemCount / m_nLoadFactor ))
                 , m_nAuxNodeAllocated( 0 )
             {
                 // m_nCapacity must be power of 2
-                assert( cds::beans::is_power2( m_nCapacity ) );
+                assert( cds::beans::is_power2( m_nCapacity ));
                 allocate_table();
             }
 
@@ -433,14 +433,14 @@ namespace cds { namespace intrusive {
             /// Returns head node of bucket \p nBucket
             aux_node_type * bucket( size_t nBucket ) const
             {
-                assert( nBucket < capacity() );
+                assert( nBucket < capacity());
                 return m_Table[ nBucket ].load(memory_model::memory_order_acquire);
             }
 
             /// Set \p pNode as a head of bucket \p nBucket
             void bucket( size_t nBucket, aux_node_type * pNode )
             {
-                assert( nBucket < capacity() );
+                assert( nBucket < capacity());
                 assert( bucket( nBucket ) == nullptr );
 
                 m_Table[ nBucket ].store( pNode, memory_model::memory_order_release );
@@ -449,10 +449,10 @@ namespace cds { namespace intrusive {
             /// Allocates auxiliary node; can return \p nullptr if the table exhausted
             aux_node_type* alloc_aux_node()
             {
-                if ( m_nAuxNodeAllocated.load( memory_model::memory_order_relaxed ) < capacity() ) {
+                if ( m_nAuxNodeAllocated.load( memory_model::memory_order_relaxed ) < capacity()) {
                     // alloc next free node from m_auxNode
                     size_t const idx = m_nAuxNodeAllocated.fetch_add( 1, memory_model::memory_order_relaxed );
-                    if ( idx < capacity() )
+                    if ( idx < capacity())
                         return new( &m_auxNode[idx] ) aux_node_type();
                 }
 
@@ -560,7 +560,7 @@ namespace cds { namespace intrusive {
                 metrics()
                     : nSegmentCount( 1024 )
                     , nSegmentSize( 512 )
-                    , nSegmentSizeLog2( cds::beans::log2( nSegmentSize ) )
+                    , nSegmentSizeLog2( cds::beans::log2( nSegmentSize ))
                     , nLoadFactor( 1 )
                     , nCapacity( nSegmentCount * nSegmentSize )
                 {}
@@ -670,7 +670,7 @@ namespace cds { namespace intrusive {
                     aux_node_segment* new_aux_segment = allocate_aux_segment();
                     new_aux_segment->aux_node_count.fetch_add( 1, memory_model::memory_order_relaxed );
                     if ( m_auxNodeList.compare_exchange_strong( aux_segment, new_aux_segment, memory_model::memory_order_relaxed, atomics::memory_order_relaxed ))
-                        return new( new_aux_segment->segment() ) aux_node_type();
+                        return new( new_aux_segment->segment()) aux_node_type();
 
                     free_aux_segment( new_aux_segment );
                 }
@@ -761,11 +761,11 @@ namespace cds { namespace intrusive {
             void init()
             {
                 // m_nSegmentSize must be 2**N
-                assert( cds::beans::is_power2( m_metrics.nSegmentSize ) );
+                assert( cds::beans::is_power2( m_metrics.nSegmentSize ));
                 assert( (((size_t)1) << m_metrics.nSegmentSizeLog2) == m_metrics.nSegmentSize );
 
                 // m_nSegmentCount must be 2**K
-                assert( cds::beans::is_power2( m_metrics.nSegmentCount ) );
+                assert( cds::beans::is_power2( m_metrics.nSegmentCount ));
 
                 m_Segments = allocate_table();
                 m_auxNodeList = allocate_aux_segment();
@@ -837,12 +837,12 @@ namespace cds { namespace intrusive {
                         if ( n1->m_nHash != n2->m_nHash )
                             return n1->m_nHash < n2->m_nHash ? -1 : 1;
 
-                        if ( n1->is_dummy() ) {
-                            assert( n2->is_dummy() );
+                        if ( n1->is_dummy()) {
+                            assert( n2->is_dummy());
                             return 0;
                         }
 
-                        assert( !n1->is_dummy() && !n2->is_dummy() );
+                        assert( !n1->is_dummy() && !n2->is_dummy());
 
                         return native_key_comparator()(v1, v2);
                     }
@@ -854,7 +854,7 @@ namespace cds { namespace intrusive {
                         if ( n->m_nHash != q.nHash )
                             return n->m_nHash < q.nHash ? -1 : 1;
 
-                        assert( !n->is_dummy() );
+                        assert( !n->is_dummy());
                         return native_key_comparator()(v, q.val);
                     }
 
@@ -870,7 +870,7 @@ namespace cds { namespace intrusive {
                     void operator()( value_type * v )
                     {
                         splitlist_node_type * p = static_cast<splitlist_node_type *>(native_node_traits::to_node_ptr( v ));
-                        if ( !p->is_dummy() )
+                        if ( !p->is_dummy())
                             native_disposer()(v);
                     }
                 };
@@ -913,25 +913,25 @@ namespace cds { namespace intrusive {
                     /// Convert node reference to value pointer
                     static value_type * to_value_ptr( node_type&  n )
                     {
-                        return base_class::to_value_ptr( static_cast<base_node_type &>(n) );
+                        return base_class::to_value_ptr( static_cast<base_node_type &>(n));
                     }
 
                     /// Convert node pointer to value pointer
                     static value_type * to_value_ptr( node_type *  n )
                     {
-                        return base_class::to_value_ptr( static_cast<base_node_type *>(n) );
+                        return base_class::to_value_ptr( static_cast<base_node_type *>(n));
                     }
 
                     /// Convert node reference to value pointer (const version)
                     static const value_type * to_value_ptr( node_type const & n )
                     {
-                        return base_class::to_value_ptr( static_cast<base_node_type const &>(n) );
+                        return base_class::to_value_ptr( static_cast<base_node_type const &>(n));
                     }
 
                     /// Convert node pointer to value pointer (const version)
                     static const value_type * to_value_ptr( node_type const * n )
                     {
-                        return base_class::to_value_ptr( static_cast<base_node_type const *>(n) );
+                        return base_class::to_value_ptr( static_cast<base_node_type const *>(n));
                     }
                 };
 
@@ -947,7 +947,7 @@ namespace cds { namespace intrusive {
                         if ( n->m_nHash != q.nHash )
                             return n->m_nHash < q.nHash ? -1 : 1;
 
-                        assert( !n->is_dummy() );
+                        assert( !n->is_dummy());
                         return base_class()(v, q.val);
                     }
 
@@ -958,7 +958,7 @@ namespace cds { namespace intrusive {
                         if ( n->m_nHash != q.nHash )
                             return q.nHash < n->m_nHash ? -1 : 1;
 
-                        assert( !n->is_dummy() );
+                        assert( !n->is_dummy());
                         return base_class()(q.val, v);
                     }
 
@@ -995,12 +995,12 @@ namespace cds { namespace intrusive {
                         if ( n1.m_nHash != n2.m_nHash )
                             return n1.m_nHash < n2.m_nHash ? -1 : 1;
 
-                        if ( n1.is_dummy() ) {
-                            assert( n2.is_dummy() );
+                        if ( n1.is_dummy()) {
+                            assert( n2.is_dummy());
                             return 0;
                         }
 
-                        assert( !n1.is_dummy() && !n2.is_dummy() );
+                        assert( !n1.is_dummy() && !n2.is_dummy());
 
                         return native_key_comparator()(v1, v2);
                     }
@@ -1012,7 +1012,7 @@ namespace cds { namespace intrusive {
                         if ( n.m_nHash != q.nHash )
                             return n.m_nHash < q.nHash ? -1 : 1;
 
-                        assert( !n.is_dummy() );
+                        assert( !n.is_dummy());
                         return native_key_comparator()(v, q.val);
                     }
 
@@ -1028,7 +1028,7 @@ namespace cds { namespace intrusive {
                     void operator()( value_type * v )
                     {
                         hash_node* p = static_cast<hash_node*>( v );
-                        if ( !p->is_dummy() )
+                        if ( !p->is_dummy())
                             native_disposer()(v);
                     }
                 };
@@ -1083,7 +1083,7 @@ namespace cds { namespace intrusive {
                         if ( n.m_nHash != q.nHash )
                             return n.m_nHash < q.nHash ? -1 : 1;
 
-                        assert( !n.is_dummy() );
+                        assert( !n.is_dummy());
                         return base_class()(v, q.val);
                     }
 
@@ -1094,7 +1094,7 @@ namespace cds { namespace intrusive {
                         if ( n.m_nHash != q.nHash )
                             return q.nHash < n.m_nHash ? -1 : 1;
 
-                        assert( !n.is_dummy() );
+                        assert( !n.is_dummy());
                         return base_class()(q.val, v);
                     }
 
@@ -1163,7 +1163,7 @@ namespace cds { namespace intrusive {
                     , m_itEnd( itEnd )
                 {
                     // skip dummy nodes
-                    while ( m_itCur != m_itEnd && node_traits::to_node_ptr( *m_itCur )->is_dummy() )
+                    while ( m_itCur != m_itEnd && node_traits::to_node_ptr( *m_itCur )->is_dummy())
                         ++m_itCur;
                 }
 
@@ -1183,7 +1183,7 @@ namespace cds { namespace intrusive {
                     if ( m_itCur != m_itEnd ) {
                         do {
                             ++m_itCur;
-                        } while ( m_itCur != m_itEnd && node_traits::to_node_ptr( *m_itCur )->is_dummy() );
+                        } while ( m_itCur != m_itEnd && node_traits::to_node_ptr( *m_itCur )->is_dummy());
                     }
                     return *this;
                 }
index 7a11ada94ed39bdfee8f420e1d4c53a91373eab2..23b0bb4f614e61081591bf39a01309cc6215754d 100644 (file)
@@ -187,7 +187,7 @@ namespace cds { namespace intrusive {
             else
                 m_FlatCombining.combine( op_enq, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onEnqueue();
             return true;
@@ -213,7 +213,7 @@ namespace cds { namespace intrusive {
             else
                 m_FlatCombining.combine( op_deq, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
 
             m_FlatCombining.internal_statistics().onDequeue( pRec->bEmpty );
@@ -240,7 +240,7 @@ namespace cds { namespace intrusive {
             else
                 m_FlatCombining.combine( bDispose ? op_clear_and_dispose : op_clear, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
         }
 
@@ -289,10 +289,10 @@ namespace cds { namespace intrusive {
             // All TSan warnings are false positive
             CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
 
-            switch ( pRec->op() ) {
+            switch ( pRec->op()) {
             case op_enq:
                 assert( pRec->pVal );
-                m_Queue.push_back( *(pRec->pVal ) );
+                m_Queue.push_back( *(pRec->pVal ));
                 break;
             case op_deq:
                 pRec->bEmpty = m_Queue.empty();
@@ -305,7 +305,7 @@ namespace cds { namespace intrusive {
                 m_Queue.clear();
                 break;
             case op_clear_and_dispose:
-                m_Queue.clear_and_dispose( disposer() );
+                m_Queue.clear_and_dispose( disposer());
                 break;
             default:
                 assert(false);
@@ -323,10 +323,10 @@ namespace cds { namespace intrusive {
 
             typedef typename fc_kernel::iterator fc_iterator;
             for ( fc_iterator it = itBegin, itPrev = itEnd; it != itEnd; ++it ) {
-                switch ( it->op() ) {
+                switch ( it->op()) {
                 case op_enq:
                 case op_deq:
-                    if ( m_Queue.empty() ) {
+                    if ( m_Queue.empty()) {
                         if ( itPrev != itEnd && collide( *itPrev, *it ))
                             itPrev = itEnd;
                         else
@@ -343,9 +343,9 @@ namespace cds { namespace intrusive {
         //@cond
         bool collide( fc_record& rec1, fc_record& rec2 )
         {
-            assert( m_Queue.empty() );
+            assert( m_Queue.empty());
 
-            switch ( rec1.op() ) {
+            switch ( rec1.op()) {
                 case op_enq:
                     if ( rec2.op() == op_deq ) {
                         assert(rec1.pVal);
index fd4d804d398ed54217d0e7a182d6a93b55a39600..7e634cfb61009571830e031ec2cf14023ac59e75 100644 (file)
@@ -188,7 +188,7 @@ namespace cds { namespace intrusive {
             else
                 m_FlatCombining.combine( op_push, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
             m_FlatCombining.internal_statistics().onPush();
             return true;
@@ -205,7 +205,7 @@ namespace cds { namespace intrusive {
             else
                 m_FlatCombining.combine( op_pop, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
 
             m_FlatCombining.internal_statistics().onPop( pRec->bEmpty );
@@ -226,7 +226,7 @@ namespace cds { namespace intrusive {
             else
                 m_FlatCombining.combine( bDispose ? op_clear_and_dispose : op_clear, pRec, *this );
 
-            assert( pRec->is_done() );
+            assert( pRec->is_done());
             m_FlatCombining.release_record( pRec );
         }
 
@@ -274,10 +274,10 @@ namespace cds { namespace intrusive {
 
             // this function is called under FC mutex, so switch TSan off
             CDS_TSAN_ANNOTATE_IGNORE_RW_BEGIN;
-            switch ( pRec->op() ) {
+            switch ( pRec->op()) {
             case op_push:
                 assert( pRec->pVal );
-                m_Stack.push_front( *(pRec->pVal ) );
+                m_Stack.push_front( *(pRec->pVal ));
                 break;
             case op_pop:
                 pRec->bEmpty = m_Stack.empty();
@@ -290,7 +290,7 @@ namespace cds { namespace intrusive {
                 m_Stack.clear();
                 break;
             case op_clear_and_dispose:
-                m_Stack.clear_and_dispose( disposer() );
+                m_Stack.clear_and_dispose( disposer());
                 break;
             default:
                 assert(false);
@@ -307,7 +307,7 @@ namespace cds { namespace intrusive {
 
             typedef typename fc_kernel::iterator fc_iterator;
             for ( fc_iterator it = itBegin, itPrev = itEnd; it != itEnd; ++it ) {
-                switch ( it->op() ) {
+                switch ( it->op()) {
                 case op_push:
                 case op_pop:
                     if ( itPrev != itEnd && collide( *itPrev, *it ))
@@ -325,7 +325,7 @@ namespace cds { namespace intrusive {
         //@cond
         bool collide( fc_record& rec1, fc_record& rec2 )
         {
-            switch ( rec1.op() ) {
+            switch ( rec1.op()) {
                 case op_push:
                     if ( rec2.op() == op_pop ) {
                         assert(rec1.pVal);
index 0a27bd8c0151cb0b0dc213b5ce3965e6a97fce94..4bbcfa9e8ec36ae468a9bbf8f4a0dac785872188 100644 (file)
@@ -115,7 +115,7 @@ namespace cds { namespace intrusive {
         */
         ~FreeList()
         {
-            assert( empty() );
+            assert( empty());
         }
 
         /// Puts \p pNode to the free list
index ef80887b7e07b4266270615e16d0b0f5aaf61f6a..1f86a279af751fad5e041e34b1d92508b848a12c 100644 (file)
@@ -49,7 +49,7 @@ namespace cds { namespace intrusive {
         to put that item into the cache if its corresponding slot is empty. The slot is calculated by
         current thread id:
         \code
-        int slot = std::hash<std::thread::id>()( std::this_thread::get_id() ) & (CacheSize - 1);
+        int slot = std::hash<std::thread::id>()( std::this_thread::get_id()) & (CacheSize - 1);
         \endcode
 
         When getting the free-list checks the corresponding cache slot. If it is not empty, its
@@ -133,7 +133,7 @@ namespace cds { namespace intrusive {
         /// Checks whether the free list is empty
         bool empty() const
         {
-            if ( !m_freeList.empty() )
+            if ( !m_freeList.empty())
                 return false;
 
             for ( auto& cell : m_cache ) {
@@ -175,7 +175,7 @@ namespace cds { namespace intrusive {
         //@cond
         size_t get_hash()
         {
-            return std::hash<std::thread::id>()( std::this_thread::get_id() ) & (c_cache_size - 1);
+            return std::hash<std::thread::id>()( std::this_thread::get_id()) & (c_cache_size - 1);
         }
         //@endcond
     private:
index 63e76c0b7f4ef6ba3d384594a383198516566eb8..a73408389b1bd229f3f18cac3f1b07a925ccdc13 100644 (file)
@@ -130,7 +130,7 @@ namespace cds { namespace intrusive {
         */
         ~TaggedFreeList()
         {
-            assert( empty() );
+            assert( empty());
         }
 
         /// Puts \p pNode to the free list
index 51c407598735bc4e4f1096d0e4276bcc650af09b..0321fbb962932df83fbafeaf86d89e9dbe0cc540 100644 (file)
@@ -168,13 +168,13 @@ namespace cds { namespace intrusive {
         {
             static internal_node const& to_internal_node( tree_node const& n )
             {
-                assert( n.is_internal() );
+                assert( n.is_internal());
                 return static_cast<internal_node const&>( n );
             }
 
             static leaf_node const& to_leaf_node( tree_node const& n )
             {
-                assert( n.is_leaf() );
+                assert( n.is_leaf());
                 return static_cast<leaf_node const&>( n );
             }
         };
@@ -282,7 +282,7 @@ namespace cds { namespace intrusive {
 
         void retire_node( tree_node * pNode ) const
         {
-            if ( pNode->is_leaf() ) {
+            if ( pNode->is_leaf()) {
                 assert( static_cast<leaf_node *>( pNode ) != &m_LeafInf1 );
                 assert( static_cast<leaf_node *>( pNode ) != &m_LeafInf2 );
 
@@ -366,8 +366,8 @@ namespace cds { namespace intrusive {
             back_off bkoff;
 
             for ( ;; ) {
-                if ( search( res, val, node_compare() )) {
-                    if ( pNewInternal.get() )
+                if ( search( res, val, node_compare())) {
+                    if ( pNewInternal.get())
                         m_Stat.onInternalNodeDeleted() ;    // unique_internal_node_ptr deletes internal node
                     m_Stat.onInsertFailed();
                     return false;
@@ -375,8 +375,8 @@ namespace cds { namespace intrusive {
 
                 if ( res.updGrandParent.bits() == update_desc::Clean && res.updParent.bits() == update_desc::Clean ) {
 
-                    if ( !pNewInternal.get() )
-                        pNewInternal.reset( alloc_internal_node() );
+                    if ( !pNewInternal.get())
+                        pNewInternal.reset( alloc_internal_node());
 
                     if ( try_insert( val, pNewInternal.get(), res )) {
                         f( val );
@@ -433,9 +433,9 @@ namespace cds { namespace intrusive {
             back_off bkoff;
 
             for ( ;; ) {
-                if ( search( res, val, node_compare() )) {
+                if ( search( res, val, node_compare())) {
                     func( false, *node_traits::to_value_ptr( res.pLeaf ), val );
-                    if ( pNewInternal.get() )
+                    if ( pNewInternal.get())
                         m_Stat.onInternalNodeDeleted() ;    // unique_internal_node_ptr deletes internal node
                     m_Stat.onUpdateExist();
                     return std::make_pair( true, false );
@@ -445,8 +445,8 @@ namespace cds { namespace intrusive {
                     if ( !bAllowInsert )
                         return std::make_pair( false, false );
 
-                    if ( !pNewInternal.get() )
-                        pNewInternal.reset( alloc_internal_node() );
+                    if ( !pNewInternal.get())
+                        pNewInternal.reset( alloc_internal_node());
 
                     if ( try_insert( val, pNewInternal.get(), res )) {
                         func( true, val, val );
@@ -662,7 +662,7 @@ namespace cds { namespace intrusive {
         bool contains( Q const& key ) const
         {
             search_result    res;
-            if ( search( res, key, node_compare() )) {
+            if ( search( res, key, node_compare())) {
                 m_Stat.onFindSuccess();
                 return true;
             }
@@ -697,7 +697,7 @@ namespace cds { namespace intrusive {
             > compare_functor;
 
             search_result    res;
-            if ( search( res, key, compare_functor() )) {
+            if ( search( res, key, compare_functor())) {
                 m_Stat.onFindSuccess();
                 return true;
             }
@@ -807,7 +807,7 @@ namespace cds { namespace intrusive {
             this sequence
             \code
             tree.clear();
-            assert( tree.empty() );
+            assert( tree.empty());
             \endcode
             the assertion could be raised.
 
@@ -834,7 +834,7 @@ namespace cds { namespace intrusive {
                 tree_node *     pLeaf = const_cast<internal_node *>( &m_Root );
 
                 // Get leftmost leaf
-                while ( pLeaf->is_internal() ) {
+                while ( pLeaf->is_internal()) {
                     pGrandParent = pParent;
                     pParent = static_cast<internal_node *>( pLeaf );
                     pLeaf = pParent->m_pLeft.load( memory_model::memory_order_relaxed );
@@ -848,10 +848,10 @@ namespace cds { namespace intrusive {
                 // Remove leftmost leaf and its parent node
                 assert( pGrandParent );
                 assert( pParent );
-                assert( pLeaf->is_leaf() );
+                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<leaf_node *>( pLeaf ) ) );
+                free_leaf_node( node_traits::to_value_ptr( static_cast<leaf_node *>( pLeaf )) );
                 free_internal_node( pParent );
             }
         }
@@ -900,11 +900,11 @@ namespace cds { namespace intrusive {
                 && node_compare()( *pLeft, *pRight ) < 0 )
             {
                 bool bRet = true;
-                if ( pLeft->is_internal() )
-                    bRet = check_consistency( static_cast<internal_node *>( pLeft ) );
+                if ( pLeft->is_internal())
+                    bRet = check_consistency( static_cast<internal_node *>( pLeft ));
                 assert( bRet );
 
-                if ( bRet && pRight->is_internal() )
+                if ( bRet && pRight->is_internal())
                     bRet = bRet && check_consistency( static_cast<internal_node *>( pRight ));
                 assert( bRet );
 
@@ -972,7 +972,7 @@ namespace cds { namespace intrusive {
             updParent = nullptr;
             bRightLeaf = false;
             tree_node * pLeaf = const_cast<internal_node *>( &m_Root );
-            while ( pLeaf->is_internal() ) {
+            while ( pLeaf->is_internal()) {
                 res.guards.copy( search_result::Guard_GrandParent, search_result::Guard_Parent );
                 pGrandParent = pParent;
                 res.guards.copy( search_result::Guard_Parent, search_result::Guard_Leaf );
@@ -983,7 +983,7 @@ namespace cds { namespace intrusive {
 
                 updParent = search_protect_update( res, pParent->m_pUpdate );
 
-                switch ( updParent.bits() ) {
+                switch ( updParent.bits()) {
                     case update_desc::DFlag:
                     case update_desc::Mark:
                         m_Stat.onSearchRetry();
@@ -1000,8 +1000,8 @@ namespace cds { namespace intrusive {
                 }
             }
 
-            assert( pLeaf->is_leaf() );
-            nCmp = cmp( key, *static_cast<leaf_node *>(pLeaf) );
+            assert( pLeaf->is_leaf());
+            nCmp = cmp( key, *static_cast<leaf_node *>(pLeaf));
 
             res.pGrandParent    = pGrandParent;
             res.pParent         = pParent;
@@ -1026,7 +1026,7 @@ namespace cds { namespace intrusive {
             pGrandParent = nullptr;
             updParent = nullptr;
             tree_node *     pLeaf = const_cast<internal_node *>( &m_Root );
-            while ( pLeaf->is_internal() ) {
+            while ( pLeaf->is_internal()) {
                 res.guards.copy( search_result::Guard_GrandParent, search_result::Guard_Parent );
                 pGrandParent = pParent;
                 res.guards.copy( search_result::Guard_Parent, search_result::Guard_Leaf );
@@ -1036,7 +1036,7 @@ namespace cds { namespace intrusive {
 
                 updParent = search_protect_update( res, pParent->m_pUpdate );
 
-                switch ( updParent.bits() ) {
+                switch ( updParent.bits()) {
                     case update_desc::DFlag:
                     case update_desc::Mark:
                         m_Stat.onSearchRetry();
@@ -1055,7 +1055,7 @@ namespace cds { namespace intrusive {
 
             res.pGrandParent    = pGrandParent;
             res.pParent         = pParent;
-            assert( pLeaf->is_leaf() );
+            assert( pLeaf->is_leaf());
             res.pLeaf           = static_cast<leaf_node *>( pLeaf );
             res.updParent       = updParent;
             res.updGrandParent  = updGrandParent;
@@ -1080,7 +1080,7 @@ namespace cds { namespace intrusive {
             updParent = nullptr;
             bRightLeaf = false;
             tree_node * pLeaf = const_cast<internal_node *>( &m_Root );
-            while ( pLeaf->is_internal() ) {
+            while ( pLeaf->is_internal()) {
                 res.guards.copy( search_result::Guard_GrandParent, search_result::Guard_Parent );
                 pGrandParent = pParent;
                 res.guards.copy( search_result::Guard_Parent, search_result::Guard_Leaf );
@@ -1091,7 +1091,7 @@ namespace cds { namespace intrusive {
 
                 updParent = search_protect_update( res, pParent->m_pUpdate );
 
-                switch ( updParent.bits() ) {
+                switch ( updParent.bits()) {
                     case update_desc::DFlag:
                     case update_desc::Mark:
                         m_Stat.onSearchRetry();
@@ -1111,7 +1111,7 @@ namespace cds { namespace intrusive {
 
             res.pGrandParent    = pGrandParent;
             res.pParent         = pParent;
-            assert( pLeaf->is_leaf() );
+            assert( pLeaf->is_leaf());
             res.pLeaf           = static_cast<leaf_node *>( pLeaf );
             res.updParent       = updParent;
             res.updGrandParent  = updGrandParent;
@@ -1125,18 +1125,18 @@ namespace cds { namespace intrusive {
         void help( update_ptr pUpdate )
         {
             // pUpdate must be guarded!
-            switch ( pUpdate.bits() ) {
+            switch ( pUpdate.bits()) {
                 case update_desc::IFlag:
-                    help_insert( pUpdate.ptr() );
+                    help_insert( pUpdate.ptr());
                     m_Stat.onHelpInsert();
                     break;
                 case update_desc::DFlag:
-                    help_delete( pUpdate.ptr() );
+                    help_delete( pUpdate.ptr());
                     m_Stat.onHelpDelete();
                     break;
                 case update_desc::Mark:
                     //m_Stat.onHelpMark();
-                    //help_marked( pUpdate.ptr() );
+                    //help_marked( pUpdate.ptr());
                     break;
             }
         }
@@ -1209,7 +1209,7 @@ namespace cds { namespace intrusive {
         static tree_node * protect_sibling( typename gc::Guard& guard, atomics::atomic<tree_node *>& sibling )
         {
             tree_node * pSibling = guard.protect( sibling, [](tree_node * p) -> internal_node* { return static_cast<internal_node *>(p); } );
-            if ( pSibling->is_leaf() )
+            if ( pSibling->is_leaf())
                 guard.assign( node_traits::to_value_ptr( static_cast<leaf_node *>( pSibling )));
             return pSibling;
         }
@@ -1240,7 +1240,7 @@ namespace cds { namespace intrusive {
         bool try_insert( value_type& val, internal_node * pNewInternal, search_result& res )
         {
             assert( res.updParent.bits() == update_desc::Clean );
-            assert( res.pLeaf->is_leaf() );
+            assert( res.pLeaf->is_leaf());
 
             // check search result
             if ( res.pParent->get_child( res.bRightLeaf, memory_model::memory_order_acquire ) == res.pLeaf ) {
@@ -1249,7 +1249,7 @@ namespace cds { namespace intrusive {
                 int nCmp = node_compare()(val, *res.pLeaf);
                 if ( nCmp < 0 ) {
                     if ( res.pGrandParent ) {
-                        assert( !res.pLeaf->infinite_key() );
+                        assert( !res.pLeaf->infinite_key());
                         pNewInternal->infinite_key( 0 );
                         key_extractor()(pNewInternal->m_Key, *node_traits::to_value_ptr( res.pLeaf ));
                     }
@@ -1261,13 +1261,13 @@ namespace cds { namespace intrusive {
                     pNewInternal->m_pRight.store( static_cast<tree_node *>(res.pLeaf), memory_model::memory_order_release );
                 }
                 else {
-                    assert( !res.pLeaf->is_internal() );
+                    assert( !res.pLeaf->is_internal());
 
                     pNewInternal->infinite_key( 0 );
                     key_extractor()(pNewInternal->m_Key, val);
                     pNewInternal->m_pLeft.store( static_cast<tree_node *>(res.pLeaf), memory_model::memory_order_relaxed );
                     pNewInternal->m_pRight.store( static_cast<tree_node *>(pNewLeaf), memory_model::memory_order_release );
-                    assert( !res.pLeaf->infinite_key() );
+                    assert( !res.pLeaf->infinite_key());
                 }
 
                 typename gc::Guard guard;
@@ -1279,9 +1279,9 @@ namespace cds { namespace intrusive {
                 pOp->iInfo.pLeaf = res.pLeaf;
                 pOp->iInfo.bRightLeaf = res.bRightLeaf;
 
-                update_ptr updCur( res.updParent.ptr() );
+                update_ptr updCur( res.updParent.ptr());
                 if ( res.pParent->m_pUpdate.compare_exchange_strong( updCur, update_ptr( pOp, update_desc::IFlag ),
-                    memory_model::memory_order_acquire, atomics::memory_order_relaxed ) ) {
+                    memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
                     // do insert
                     help_insert( pOp );
                     retire_update_desc( pOp );
@@ -1304,7 +1304,7 @@ namespace cds { namespace intrusive {
             back_off bkoff;
 
             for ( ;; ) {
-                if ( !search( res, val, cmp ) || !eq( val, *res.pLeaf ) ) {
+                if ( !search( res, val, cmp ) || !eq( val, *res.pLeaf )) {
                     if ( pOp )
                         retire_update_desc( pOp );
                     m_Stat.onEraseFailed();
@@ -1314,7 +1314,7 @@ namespace cds { namespace intrusive {
                 if ( res.updGrandParent.bits() == update_desc::Clean && res.updParent.bits() == update_desc::Clean ) {
                     if ( !pOp )
                         pOp = alloc_update_desc();
-                    if ( check_delete_precondition( res ) ) {
+                    if ( check_delete_precondition( res )) {
                         typename gc::Guard guard;
                         guard.assign( pOp );
 
@@ -1325,12 +1325,12 @@ namespace cds { namespace intrusive {
                         pOp->dInfo.bRightParent = res.bRightParent;
                         pOp->dInfo.bRightLeaf = res.bRightLeaf;
 
-                        update_ptr updGP( res.updGrandParent.ptr() );
+                        update_ptr updGP( res.updGrandParent.ptr());
                         if ( res.pGrandParent->m_pUpdate.compare_exchange_strong( updGP, update_ptr( pOp, update_desc::DFlag ),
-                            memory_model::memory_order_acquire, atomics::memory_order_relaxed ) ) {
-                            if ( help_delete( pOp ) ) {
+                            memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
+                            if ( help_delete( pOp )) {
                                 // res.pLeaf is not deleted yet since it is guarded
-                                f( *node_traits::to_value_ptr( res.pLeaf ) );
+                                f( *node_traits::to_value_ptr( res.pLeaf ));
                                 break;
                             }
                             pOp = nullptr;
@@ -1365,7 +1365,7 @@ namespace cds { namespace intrusive {
                 if ( res.updGrandParent.bits() == update_desc::Clean && res.updParent.bits() == update_desc::Clean ) {
                     if ( !pOp )
                         pOp = alloc_update_desc();
-                    if ( check_delete_precondition( res ) ) {
+                    if ( check_delete_precondition( res )) {
                         typename gc::Guard guard;
                         guard.assign( pOp );
 
@@ -1376,9 +1376,9 @@ namespace cds { namespace intrusive {
                         pOp->dInfo.bRightParent = res.bRightParent;
                         pOp->dInfo.bRightLeaf = res.bRightLeaf;
 
-                        update_ptr updGP( res.updGrandParent.ptr() );
+                        update_ptr updGP( res.updGrandParent.ptr());
                         if ( res.pGrandParent->m_pUpdate.compare_exchange_strong( updGP, update_ptr( pOp, update_desc::DFlag ),
-                            memory_model::memory_order_acquire, atomics::memory_order_relaxed ) ) {
+                            memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
                             if ( help_delete( pOp ))
                                 break;
                             pOp = nullptr;
@@ -1432,7 +1432,7 @@ namespace cds { namespace intrusive {
                 if ( res.updGrandParent.bits() == update_desc::Clean && res.updParent.bits() == update_desc::Clean ) {
                     if ( !pOp )
                         pOp = alloc_update_desc();
-                    if ( check_delete_precondition( res ) ) {
+                    if ( check_delete_precondition( res )) {
                         typename gc::Guard guard;
                         guard.assign( pOp );
 
@@ -1443,11 +1443,11 @@ namespace cds { namespace intrusive {
                         pOp->dInfo.bRightParent = res.bRightParent;
                         pOp->dInfo.bRightLeaf = res.bRightLeaf;
 
-                        update_ptr updGP( res.updGrandParent.ptr() );
+                        update_ptr updGP( res.updGrandParent.ptr());
                         if ( res.pGrandParent->m_pUpdate.compare_exchange_strong( updGP, update_ptr( pOp, update_desc::DFlag ),
-                                memory_model::memory_order_acquire, atomics::memory_order_relaxed ) )
+                                memory_model::memory_order_acquire, atomics::memory_order_relaxed ))
                         {
-                            if ( help_delete( pOp ) )
+                            if ( help_delete( pOp ))
                                 break;
                             pOp = nullptr;
                         }
@@ -1481,7 +1481,7 @@ namespace cds { namespace intrusive {
                 if ( res.updGrandParent.bits() == update_desc::Clean && res.updParent.bits() == update_desc::Clean ) {
                     if ( !pOp )
                         pOp = alloc_update_desc();
-                    if ( check_delete_precondition( res ) ) {
+                    if ( check_delete_precondition( res )) {
                         typename gc::Guard guard;
                         guard.assign( pOp );
 
@@ -1492,7 +1492,7 @@ namespace cds { namespace intrusive {
                         pOp->dInfo.bRightParent = res.bRightParent;
                         pOp->dInfo.bRightLeaf = res.bRightLeaf;
 
-                        update_ptr updGP( res.updGrandParent.ptr() );
+                        update_ptr updGP( res.updGrandParent.ptr());
                         if ( res.pGrandParent->m_pUpdate.compare_exchange_strong( updGP, update_ptr( pOp, update_desc::DFlag ),
                             memory_model::memory_order_acquire, atomics::memory_order_relaxed ))
                         {
@@ -1516,7 +1516,7 @@ namespace cds { namespace intrusive {
         bool find_( Q& val, Func f ) const
         {
             search_result    res;
-            if ( search( res, val, node_compare() )) {
+            if ( search( res, val, node_compare())) {
                 assert( res.pLeaf );
                 f( *node_traits::to_value_ptr( res.pLeaf ), val );
 
@@ -1539,7 +1539,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 );
                 f( *node_traits::to_value_ptr( res.pLeaf ), val );
 
@@ -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 ));
index f0ccb8cd82073ceed61e066645b4e0a763a926b3..fa33dda7979f55e8549f6df00c15166ebb52429e 100644 (file)
@@ -333,7 +333,7 @@ namespace cds { namespace intrusive {
             this code
             \code
                 if ( it1 == it2 )
-                    assert( &(*it1) == &(*it2) );
+                    assert( &(*it1) == &(*it2));
             \endcode
             can throw assertion. The point is that the iterator stores the value of element which can be modified later by other thread.
             The guard inside the iterator prevents recycling that value so the iterator's value remains valid even after such changing.
@@ -847,12 +847,12 @@ 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;
                 }
 
-                if ( link_aux_node( pNode, pos ) ) {
+                if ( link_aux_node( pNode, pos )) {
                     ++m_ItemCounter;
                     m_Stat.onInsertSuccess();
                     return true;
@@ -867,12 +867,12 @@ namespace cds { namespace intrusive {
             insert_position pos;
 
             while ( true ) {
-                if ( inserting_search( pHead, val, pos, key_comparator() )) {
+                if ( inserting_search( pHead, val, pos, key_comparator())) {
                     m_Stat.onInsertFailed();
                     return false;
                 }
 
-                if ( link_data( &val, pos ) ) {
+                if ( link_data( &val, pos )) {
                     ++m_ItemCounter;
                     m_Stat.onInsertSuccess();
                     return true;
@@ -891,12 +891,12 @@ 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;
                 }
 
-                if ( link_data( &val, pos ) ) {
+                if ( link_data( &val, pos )) {
                     f( val );
                     ++m_ItemCounter;
                     m_Stat.onInsertSuccess();
@@ -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 );
@@ -1042,7 +1042,7 @@ namespace cds { namespace intrusive {
         bool find_at( node_type const* pHead, Q const& val, Compare cmp ) const
         {
             position pos;
-            if ( search( pHead, val, pos, cmp ) ) {
+            if ( search( pHead, val, pos, cmp )) {
                 m_Stat.onFindSuccess();
                 return true;
             }
@@ -1191,7 +1191,7 @@ namespace cds { namespace intrusive {
         void destroy( Predicate pred )
         {
             node_type * pNode = m_Head.next.load( memory_model::memory_order_relaxed );
-            while ( pNode != pNode->next.load( memory_model::memory_order_relaxed ) ) {
+            while ( pNode != pNode->next.load( memory_model::memory_order_relaxed )) {
                 value_type * pVal = pNode->data.load( memory_model::memory_order_relaxed ).ptr();
                 node_type * pNext = pNode->next.load( memory_model::memory_order_relaxed );
                 bool const is_regular_node = !pVal || pred( pVal );
@@ -1257,14 +1257,14 @@ namespace cds { namespace intrusive {
             // and then set it to another.
             // To prevent this we mark pos.pCur data as undeletable by setting LSB
             marked_data_ptr valCur( pos.pFound );
-            if ( !pos.pCur->data.compare_exchange_strong( valCur, valCur | 1, memory_model::memory_order_acquire, atomics::memory_order_relaxed ) ) {
+            if ( !pos.pCur->data.compare_exchange_strong( valCur, valCur | 1, memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
                 // oops, pos.pCur data has been changed or another thread is setting pos.pPrev data
                 m_Stat.onNodeMarkFailed();
                 return false;
             }
 
             marked_data_ptr valPrev( pos.pPrevVal );
-            if ( !pos.pPrev->data.compare_exchange_strong( valPrev, valPrev | 1, memory_model::memory_order_acquire, atomics::memory_order_relaxed ) ) {
+            if ( !pos.pPrev->data.compare_exchange_strong( valPrev, valPrev | 1, memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
                 pos.pCur->data.store( valCur, memory_model::memory_order_relaxed );
                 m_Stat.onNodeMarkFailed();
                 return false;
@@ -1329,14 +1329,14 @@ namespace cds { namespace intrusive {
             // and then set it to another.
             // To prevent this we mark pos.pCur data as undeletable by setting LSB
             marked_data_ptr valCur( pos.pFound );
-            if ( !pos.pCur->data.compare_exchange_strong( valCur, valCur | 1, memory_model::memory_order_acquire, atomics::memory_order_relaxed ) ) {
+            if ( !pos.pCur->data.compare_exchange_strong( valCur, valCur | 1, memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
                 // oops, pos.pCur data has been changed or another thread is setting pos.pPrev data
                 m_Stat.onNodeMarkFailed();
                 return false;
             }
 
             marked_data_ptr valPrev( pos.pPrevVal );
-            if ( !pos.pPrev->data.compare_exchange_strong( valPrev, valPrev | 1, memory_model::memory_order_acquire, atomics::memory_order_relaxed ) ) {
+            if ( !pos.pPrev->data.compare_exchange_strong( valPrev, valPrev | 1, memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
                 pos.pCur->data.store( valCur, memory_model::memory_order_relaxed );
                 m_Stat.onNodeMarkFailed();
                 return false;
@@ -1369,7 +1369,7 @@ namespace cds { namespace intrusive {
             assert( pos.pFound != nullptr );
 
             marked_data_ptr val( pos.pFound );
-            if ( pos.pCur->data.compare_exchange_strong( val, marked_data_ptr(), memory_model::memory_order_acquire, atomics::memory_order_relaxed ) ) {
+            if ( pos.pCur->data.compare_exchange_strong( val, marked_data_ptr(), memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
                 retire_data( pos.pFound );
                 return true;
             }
index 4f8ef87bedc0c240c08ac8a9bc41ff5049afd9a0..3072fe2018a9cda23d1be2e16badc5a0ef7861e9 100644 (file)
@@ -1134,7 +1134,7 @@ namespace cds { namespace intrusive {
         bool find_at( atomic_node_ptr& refHead, Q const& val, Compare cmp )
         {
             position pos;
-            if ( search( refHead, val, pos, cmp ) ) {
+            if ( search( refHead, val, pos, cmp )) {
                 m_Stat.onFindSuccess();
                 return true;
             }
index f666c9daae356229bad455857162da0a16cd88dd..27023f4120f981caa6fe61a41c4450e19aa890e3 100644 (file)
@@ -65,7 +65,7 @@ namespace cds { namespace intrusive {
         protected:
             static value_type * gc_protect( marked_ptr p )
             {
-                return node_traits::to_value_ptr( p.ptr() );
+                return node_traits::to_value_ptr( p.ptr());
             }
 
             void next()
@@ -75,7 +75,7 @@ namespace cds { namespace intrusive {
                 back_off bkoff;
 
                 for (;;) {
-                    if ( m_pNode->next( m_pNode->height() - 1 ).load( atomics::memory_order_acquire ).bits() ) {
+                    if ( m_pNode->next( m_pNode->height() - 1 ).load( atomics::memory_order_acquire ).bits()) {
                         // Current node is marked as deleted. So, its next pointer can point to anything
                         // In this case we interrupt our iteration and returns end() iterator.
                         *this = iterator();
@@ -84,12 +84,12 @@ namespace cds { namespace intrusive {
 
                     marked_ptr p = m_guard.protect( (*m_pNode)[0], gc_protect );
                     node_type * pp = p.ptr();
-                    if ( p.bits() ) {
+                    if ( p.bits()) {
                         // p is marked as deleted. Spin waiting for physical removal
                         bkoff();
                         continue;
                     }
-                    else if ( pp && pp->next( pp->height() - 1 ).load( atomics::memory_order_relaxed ).bits() ) {
+                    else if ( pp && pp->next( pp->height() - 1 ).load( atomics::memory_order_relaxed ).bits()) {
                         // p is marked as deleted. Spin waiting for physical removal
                         bkoff();
                         continue;
@@ -108,7 +108,7 @@ namespace cds { namespace intrusive {
 
                 for (;;) {
                     marked_ptr p = m_guard.protect( refHead[0], gc_protect );
-                    if ( !p.ptr() ) {
+                    if ( !p.ptr()) {
                         // empty skip-list
                         m_guard.clear();
                         break;
@@ -116,7 +116,7 @@ namespace cds { namespace intrusive {
 
                     node_type * pp = p.ptr();
                     // Logically deleted node is marked from highest level
-                    if ( !pp->next( pp->height() - 1 ).load( atomics::memory_order_acquire ).bits() ) {
+                    if ( !pp->next( pp->height() - 1 ).load( atomics::memory_order_acquire ).bits()) {
                         m_pNode = pp;
                         break;
                     }
@@ -133,7 +133,7 @@ namespace cds { namespace intrusive {
             iterator( iterator const& s)
                 : m_pNode( s.m_pNode )
             {
-                m_guard.assign( node_traits::to_value_ptr(m_pNode) );
+                m_guard.assign( node_traits::to_value_ptr(m_pNode));
             }
 
             value_type * operator ->() const
@@ -446,13 +446,13 @@ namespace cds { namespace intrusive {
 
         static value_type * gc_protect( marked_node_ptr p )
         {
-            return node_traits::to_value_ptr( p.ptr() );
+            return node_traits::to_value_ptr( p.ptr());
         }
 
         static void dispose_node( value_type * pVal )
         {
             assert( pVal != nullptr );
-            typename node_builder::node_disposer()( node_traits::to_node_ptr(pVal) );
+            typename node_builder::node_disposer()( node_traits::to_node_ptr(pVal));
             disposer()( pVal );
         }
 
@@ -475,7 +475,7 @@ namespace cds { namespace intrusive {
                 pos.guards.assign( nLevel * 2, node_traits::to_value_ptr( pPred ));
                 while ( true ) {
                     pCur = pos.guards.protect( nLevel * 2 + 1, pPred->next( nLevel ), gc_protect );
-                    if ( pCur.bits() ) {
+                    if ( pCur.bits()) {
                         // pCur.bits() means that pPred is logically deleted
                         goto retry;
                     }
@@ -488,17 +488,17 @@ namespace cds { namespace intrusive {
                     // pSucc contains deletion mark for pCur
                     pSucc = pCur->next( nLevel ).load( memory_model::memory_order_acquire );
 
-                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr() )
+                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr())
                         goto retry;
 
-                    if ( pSucc.bits() ) {
+                    if ( pSucc.bits()) {
                         // pCur is marked, i.e. logically deleted.
-                        marked_node_ptr p( pCur.ptr() );
-                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr() ),
+                        marked_node_ptr p( pCur.ptr());
+                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr()),
                             memory_model::memory_order_acquire, atomics::memory_order_relaxed ))
                         {
                             if ( nLevel == 0 ) {
-                                gc::retire( node_traits::to_value_ptr( pCur.ptr() ), dispose_node );
+                                gc::retire( node_traits::to_value_ptr( pCur.ptr()), dispose_node );
                                 m_Stat.onEraseWhileFind();
                             }
                         }
@@ -551,22 +551,22 @@ namespace cds { namespace intrusive {
                 // head cannot be deleted
                 assert( pCur.bits() == 0 );
 
-                if ( pCur.ptr() ) {
+                if ( pCur.ptr()) {
 
                     // pSucc contains deletion mark for pCur
                     pSucc = pCur->next( nLevel ).load( memory_model::memory_order_acquire );
 
-                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr() )
+                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr())
                         goto retry;
 
-                    if ( pSucc.bits() ) {
+                    if ( pSucc.bits()) {
                         // pCur is marked, i.e. logically deleted.
-                        marked_node_ptr p( pCur.ptr() );
-                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr() ),
+                        marked_node_ptr p( pCur.ptr());
+                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr()),
                             memory_model::memory_order_acquire, atomics::memory_order_relaxed ))
                         {
                             if ( nLevel == 0 ) {
-                                gc::retire( node_traits::to_value_ptr( pCur.ptr() ), dispose_node );
+                                gc::retire( node_traits::to_value_ptr( pCur.ptr()), dispose_node );
                                 m_Stat.onEraseWhileFind();
                             }
                         }
@@ -599,7 +599,7 @@ namespace cds { namespace intrusive {
                 pos.guards.assign( nLevel * 2, node_traits::to_value_ptr( pPred ));
                 while ( true ) {
                     pCur = pos.guards.protect( nLevel * 2 + 1, pPred->next( nLevel ), gc_protect );
-                    if ( pCur.bits() ) {
+                    if ( pCur.bits()) {
                         // pCur.bits() means that pPred is logically deleted
                         goto retry;
                     }
@@ -612,24 +612,24 @@ namespace cds { namespace intrusive {
                     // pSucc contains deletion mark for pCur
                     pSucc = pCur->next( nLevel ).load( memory_model::memory_order_acquire );
 
-                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr() )
+                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr())
                         goto retry;
 
-                    if ( pSucc.bits() ) {
+                    if ( pSucc.bits()) {
                         // pCur is marked, i.e. logically deleted.
-                        marked_node_ptr p( pCur.ptr() );
-                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr() ),
+                        marked_node_ptr p( pCur.ptr());
+                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr()),
                             memory_model::memory_order_acquire, atomics::memory_order_relaxed ))
                         {
                             if ( nLevel == 0 ) {
-                                gc::retire( node_traits::to_value_ptr( pCur.ptr() ), dispose_node );
+                                gc::retire( node_traits::to_value_ptr( pCur.ptr()), dispose_node );
                                 m_Stat.onEraseWhileFind();
                             }
                         }
                         goto retry;
                     }
                     else {
-                        if ( !pSucc.ptr() )
+                        if ( !pSucc.ptr())
                             break;
 
                         pPred = pCur.ptr();
@@ -672,7 +672,7 @@ namespace cds { namespace intrusive {
                     if ( !pNode->next( nLevel ).compare_exchange_strong( p, q, memory_model::memory_order_release, atomics::memory_order_relaxed )) {
                         // pNode has been marked as removed while we are inserting it
                         // Stop inserting
-                        assert( p.bits() );
+                        assert( p.bits());
                         m_Stat.onLogicDeleteWhileInsert();
                         return true;
                     }
@@ -712,7 +712,7 @@ namespace cds { namespace intrusive {
             }
 
             while ( true ) {
-                marked_node_ptr p( pDel->next(0).load(memory_model::memory_order_relaxed).ptr() );
+                marked_node_ptr p( pDel->next(0).load(memory_model::memory_order_relaxed).ptr());
                 if ( pDel->next(0).compare_exchange_strong( p, p | 1, memory_model::memory_order_release, atomics::memory_order_relaxed ))
                 {
                     f( *node_traits::to_value_ptr( pDel ));
@@ -723,7 +723,7 @@ namespace cds { namespace intrusive {
                     for ( int nLevel = static_cast<int>( pDel->height() - 1 ); nLevel >= 0; --nLevel ) {
                         pSucc = pDel->next(nLevel).load(memory_model::memory_order_relaxed);
                         if ( !pos.pPrev[nLevel]->next(nLevel).compare_exchange_strong( p, marked_node_ptr(pSucc.ptr()),
-                            memory_model::memory_order_acquire, atomics::memory_order_relaxed) )
+                            memory_model::memory_order_acquire, atomics::memory_order_relaxed))
                         {
                             // Make slow erase
                             find_position( *node_traits::to_value_ptr( pDel ), pos, key_comparator(), false );
@@ -738,7 +738,7 @@ namespace cds { namespace intrusive {
                     return true;
                 }
                 else {
-                    if ( p.bits() ) {
+                    if ( p.bits()) {
                         // Another thread is deleting pDel right now
                         return false;
                     }
@@ -769,7 +769,7 @@ namespace cds { namespace intrusive {
                     continue;
 
                 while ( pCur != pNull ) {
-                    if ( pCur.bits() ) {
+                    if ( pCur.bits()) {
                         unsigned int nAttempt = 0;
                         while ( pCur.bits() && nAttempt++ < 16 ) {
                             bkoff();
@@ -777,15 +777,15 @@ namespace cds { namespace intrusive {
                         }
                         bkoff.reset();
 
-                        if ( pCur.bits() ) {
+                        if ( pCur.bits()) {
                             // Maybe, we are on deleted node sequence
                             // Abort searching, try slow-path
                             return find_fastpath_abort;
                         }
                     }
 
-                    if ( pCur.ptr() ) {
-                        int nCmp = cmp( *node_traits::to_value_ptr( pCur.ptr() ), val );
+                    if ( pCur.ptr()) {
+                        int nCmp = cmp( *node_traits::to_value_ptr( pCur.ptr()), val );
                         if ( nCmp < 0 ) {
                             guards.copy( 0, 1 );
                             pPred = pCur.ptr();
@@ -793,7 +793,7 @@ namespace cds { namespace intrusive {
                         }
                         else if ( nCmp == 0 ) {
                             // found
-                            f( *node_traits::to_value_ptr( pCur.ptr() ), val );
+                            f( *node_traits::to_value_ptr( pCur.ptr()), val );
                             return find_fastpath_found;
                         }
                         else // pCur > val - go down
@@ -856,14 +856,14 @@ namespace cds { namespace intrusive {
         {
             position pos;
 
-            if ( !find_position( val, pos, cmp, false ) ) {
+            if ( !find_position( val, pos, cmp, false )) {
                 m_Stat.onEraseFailed();
                 return false;
             }
 
             node_type * pDel = pos.pCur;
             typename gc::Guard gDel;
-            gDel.assign( node_traits::to_value_ptr(pDel) );
+            gDel.assign( node_traits::to_value_ptr(pDel));
             assert( cmp( *node_traits::to_value_ptr( pDel ), val ) == 0 );
 
             unsigned int nHeight = pDel->height();
@@ -885,7 +885,7 @@ namespace cds { namespace intrusive {
 
             guarded_ptr gp;
             for (;;) {
-                if ( !find_position( val, pos, cmp, false ) ) {
+                if ( !find_position( val, pos, cmp, false )) {
                     m_Stat.onExtractFailed();
                     return guarded_ptr();
                 }
@@ -911,7 +911,7 @@ namespace cds { namespace intrusive {
 
             guarded_ptr gp;
             for (;;) {
-                if ( !find_min_position( pos ) ) {
+                if ( !find_min_position( pos )) {
                     // The list is empty
                     m_Stat.onExtractMinFailed();
                     return guarded_ptr();
@@ -920,7 +920,7 @@ namespace cds { namespace intrusive {
                 node_type * pDel = pos.pCur;
 
                 unsigned int nHeight = pDel->height();
-                gp.reset( node_traits::to_value_ptr(pDel) );
+                gp.reset( node_traits::to_value_ptr(pDel));
 
                 if ( try_remove_at( pDel, pos, [](value_type const&) {} )) {
                     --m_ItemCounter;
@@ -939,7 +939,7 @@ namespace cds { namespace intrusive {
 
             guarded_ptr gp;
             for (;;) {
-                if ( !find_max_position( pos ) ) {
+                if ( !find_max_position( pos )) {
                     // The list is empty
                     m_Stat.onExtractMaxFailed();
                     return guarded_ptr();
@@ -948,7 +948,7 @@ namespace cds { namespace intrusive {
                 node_type * pDel = pos.pCur;
 
                 unsigned int nHeight = pDel->height();
-                gp.reset( node_traits::to_value_ptr(pDel) );
+                gp.reset( node_traits::to_value_ptr(pDel));
 
                 if ( try_remove_at( pDel, pos, [](value_type const&) {} )) {
                     --m_ItemCounter;
@@ -1046,18 +1046,18 @@ namespace cds { namespace intrusive {
         /// Returns a forward iterator addressing the first element in a set
         iterator begin()
         {
-            return iterator( *m_Head.head() );
+            return iterator( *m_Head.head());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator begin() const
         {
-            return const_iterator( *m_Head.head() );
+            return const_iterator( *m_Head.head());
         }
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( *m_Head.head() );
+            return const_iterator( *m_Head.head());
         }
 
         /// Returns a forward iterator that addresses the location succeeding the last element in a set.
@@ -1257,7 +1257,7 @@ namespace cds { namespace intrusive {
         {
             position pos;
 
-            if ( !find_position( val, pos, key_comparator(), false ) ) {
+            if ( !find_position( val, pos, key_comparator(), false )) {
                 m_Stat.onUnlinkFailed();
                 return false;
             }
@@ -1267,7 +1267,7 @@ namespace cds { namespace intrusive {
 
             unsigned int nHeight = pDel->height();
             typename gc::Guard gDel;
-            gDel.assign( node_traits::to_value_ptr(pDel) );
+            gDel.assign( node_traits::to_value_ptr(pDel));
 
             if ( node_traits::to_value_ptr( pDel ) == &val && try_remove_at( pDel, pos, [](value_type const&) {} )) {
                 --m_ItemCounter;
@@ -1311,7 +1311,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         guarded_ptr extract( Q const& key )
         {
-            return extract_( key, key_comparator() );
+            return extract_( key, key_comparator());
         }
 
         /// Extracts the item from the set with comparing functor \p pred
@@ -1327,7 +1327,7 @@ namespace cds { namespace intrusive {
         guarded_ptr extract_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return extract_( key, cds::opt::details::make_comparator_from_less<Less>() );
+            return extract_( key, cds::opt::details::make_comparator_from_less<Less>());
         }
 
         /// Extracts an item with minimal key from the list
@@ -1601,7 +1601,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         guarded_ptr get( Q const& key )
         {
-            return get_with_( key, key_comparator() );
+            return get_with_( key, key_comparator());
         }
 
         /// Finds \p key and return the item found
@@ -1617,7 +1617,7 @@ namespace cds { namespace intrusive {
         guarded_ptr get_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return get_with_( key, cds::opt::details::make_comparator_from_less<Less>() );
+            return get_with_( key, cds::opt::details::make_comparator_from_less<Less>());
         }
 
         /// Returns item count in the set
@@ -1645,7 +1645,7 @@ namespace cds { namespace intrusive {
             this sequence
             \code
             set.clear();
-            assert( set.empty() );
+            assert( set.empty());
             \endcode
             the assertion could be raised.
 
index 316f269ac9f70ae78177d0f731100287ef0cde84..e5a86f201c5d5965c1d92c3b899bbb1df561e101 100644 (file)
@@ -336,7 +336,7 @@ namespace cds { namespace intrusive {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            const_iterator it( const_cast<node_type *>(&m_Head) );
+            const_iterator it( const_cast<node_type *>(&m_Head));
             ++it;   // skip dummy head
             return it;
         }
@@ -349,7 +349,7 @@ namespace cds { namespace intrusive {
         /// Returns an const iterator that addresses the location succeeding the last element in a list
         const_iterator cend() const
         {
-            return const_iterator( const_cast<node_type *>(&m_Tail) );
+            return const_iterator( const_cast<node_type *>(&m_Tail));
         }
 
     public:
@@ -509,7 +509,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         value_type * contains( Q const& key )
         {
-            return find_at( &m_Head, key, key_comparator() );
+            return find_at( &m_Head, key, key_comparator());
         }
         //@cond
         template <typename Q>
@@ -530,7 +530,7 @@ namespace cds { namespace intrusive {
         typename std::enable_if<Sort, value_type *>::type contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less<Less>() );
+            return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less<Less>());
         }
         //@cond
         template <typename Q, typename Less, bool Sort = c_bSort>
@@ -586,7 +586,7 @@ namespace cds { namespace intrusive {
         */
         void clear()
         {
-            clear( disposer() );
+            clear( disposer());
         }
 
         /// Checks if the list is empty
@@ -631,7 +631,7 @@ namespace cds { namespace intrusive {
             // Hack: convert node_type to value_type.
             // In principle, auxiliary node can be non-reducible to value_type
             // We assume that comparator can correctly distinguish aux and regular node.
-            return insert_at( pHead, *node_traits::to_value_ptr( pNode ) );
+            return insert_at( pHead, *node_traits::to_value_ptr( pNode ));
         }
 
         bool insert_at( node_type * pHead, value_type& val )
@@ -644,7 +644,7 @@ namespace cds { namespace intrusive {
                 {
                     auto_lock_position alp( pos );
                     if ( validate( pos.pPred, pos.pCur )) {
-                        if ( pos.pCur != &m_Tail && equal( *node_traits::to_value_ptr( *pos.pCur ), val, pred ) ) {
+                        if ( pos.pCur != &m_Tail && equal( *node_traits::to_value_ptr( *pos.pCur ), val, pred )) {
                             // failed: key already in list
                             m_Stat.onInsertFailed();
                             return false;
@@ -709,7 +709,7 @@ namespace cds { namespace intrusive {
 
             ++m_ItemCounter;
             m_Stat.onUpdateNew();
-            return std::make_pair( iterator( node_traits::to_node_ptr( val ) ), true );
+            return std::make_pair( iterator( node_traits::to_node_ptr( val )), true );
         }
 
         template <typename Func>
@@ -727,7 +727,7 @@ namespace cds { namespace intrusive {
             search( pHead, val, pos, pred );
             if ( pos.pCur != &m_Tail ) {
                 std::unique_lock< typename node_type::lock_type> al( pos.pCur->m_Lock );
-                if ( equal( *node_traits::to_value_ptr( *pos.pCur ), val, pred ) )
+                if ( equal( *node_traits::to_value_ptr( *pos.pCur ), val, pred ))
                 {
                     f( *node_traits::to_value_ptr( *pos.pCur ), val );
                     m_Stat.onFindSuccess();
@@ -743,7 +743,7 @@ namespace cds { namespace intrusive {
         value_type * find_at( node_type * pHead, Q& val, Pred pred)
         {
             iterator it = find_at_( pHead, val, pred );
-            if ( it != end() )
+            if ( it != end())
                 return &*it;
             return nullptr;
         }
@@ -777,7 +777,7 @@ namespace cds { namespace intrusive {
             node_type * pCur = pHead;
             node_type * pPrev = pHead;
 
-            while ( pCur != pTail && ( pCur == pHead || !equal( *node_traits::to_value_ptr( *pCur ), key, eq ) )) {
+            while ( pCur != pTail && ( pCur == pHead || !equal( *node_traits::to_value_ptr( *pCur ), key, eq ))) {
                 pPrev = pCur;
                 pCur = pCur->m_pNext.load(memory_model::memory_order_acquire);
             }
@@ -838,7 +838,7 @@ namespace cds { namespace intrusive {
                 if ( pred( *node_traits::to_value_ptr( pHead ))) {
                     assert( pPred != nullptr );
                     pPred->m_pNext.store( p, memory_model::memory_order_relaxed );
-                    dispose_node( pHead, disposer() );
+                    dispose_node( pHead, disposer());
                 }
                 else
                     pPred = pHead;
index 3e9483c2fa6fd90b118146a70c73e1e3f52aface..10be32134381eb57b1fe225b4c0ec903c1cb696d 100644 (file)
@@ -854,9 +854,9 @@ namespace cds { namespace intrusive {
         static void dispose_node( node_type * pNode )
         {
             assert( pNode );
-            assert( !gc::is_locked() );
+            assert( !gc::is_locked());
 
-            gc::template retire_ptr<clear_and_dispose>( node_traits::to_value_ptr( *pNode ) );
+            gc::template retire_ptr<clear_and_dispose>( node_traits::to_value_ptr( *pNode ));
         }
 
         static void link_node( node_type * pNode, node_type * pPred, node_type * pCur )
@@ -1183,7 +1183,7 @@ namespace cds { namespace intrusive {
 
         bool validate( node_type * pPred, node_type * pCur ) CDS_NOEXCEPT
         {
-            if ( validate_link( pPred, pCur ) ) {
+            if ( validate_link( pPred, pCur )) {
                 m_Stat.onValidationSuccess();
                 return true;
             }
@@ -1287,13 +1287,13 @@ namespace cds { namespace intrusive {
         //@cond
         const_iterator get_const_begin() const
         {
-            const_iterator it( const_cast<node_type *>(&m_Head) );
+            const_iterator it( const_cast<node_type *>(&m_Head));
             ++it;   // skip dummy head
             return it;
         }
         const_iterator get_const_end() const
         {
-            return const_iterator( const_cast<node_type *>(&m_Tail) );
+            return const_iterator( const_cast<node_type *>(&m_Tail));
         }
         //@endcond
     };
index 90455a28b19fd58b1f1206074d85756bb5e8d515..3cf21e237bcf8630b69417bf0fa0cf371dba1274 100644 (file)
@@ -274,7 +274,7 @@ namespace cds { namespace intrusive {
         */
         iterator begin()
         {
-            return iterator(m_pHead.load(memory_model::memory_order_relaxed) );
+            return iterator(m_pHead.load(memory_model::memory_order_relaxed));
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a list
@@ -293,12 +293,12 @@ namespace cds { namespace intrusive {
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator begin() const
         {
-            return const_iterator(m_pHead.load(memory_model::memory_order_relaxed) );
+            return const_iterator(m_pHead.load(memory_model::memory_order_relaxed));
         }
         /// Returns a forward const iterator addressing the first element in a list
         const_iterator cbegin() const
         {
-            return const_iterator(m_pHead.load(memory_model::memory_order_relaxed) );
+            return const_iterator(m_pHead.load(memory_model::memory_order_relaxed));
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a list
@@ -446,7 +446,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         value_type * contains( Q const& key )
         {
-            return find_at( m_pHead, key, key_comparator() );
+            return find_at( m_pHead, key, key_comparator());
         }
         //@cond
         template <typename Q>
@@ -504,7 +504,7 @@ namespace cds { namespace intrusive {
         */
         void clear()
         {
-            clear( disposer() );
+            clear( disposer());
         }
 
         /// Checks if the list is empty
@@ -548,7 +548,7 @@ namespace cds { namespace intrusive {
             // Hack: convert node_type to value_type.
             // In principle, auxiliary node can be non-reducible to value_type
             // We assume that comparator can correctly distinguish aux and regular node.
-            return insert_at( refHead, *node_traits::to_value_ptr( pNode ) );
+            return insert_at( refHead, *node_traits::to_value_ptr( pNode ));
         }
 
         bool insert_at( atomic_node_ptr& refHead, value_type& val )
@@ -561,7 +561,7 @@ namespace cds { namespace intrusive {
                     return false;
                 }
 
-                if ( link_node( node_traits::to_node_ptr( val ), pos ) ) {
+                if ( link_node( node_traits::to_node_ptr( val ), pos )) {
                     ++m_ItemCounter;
                     m_Stat.onInsertSuccess();
                     return true;
@@ -584,8 +584,8 @@ namespace cds { namespace intrusive {
             position pos;
 
             while ( true ) {
-                if ( search( refHead, val, key_comparator(), pos ) ) {
-                    assert( key_comparator()( val, *node_traits::to_value_ptr( *pos.pCur ) ) == 0 );
+                if ( search( refHead, val, key_comparator(), pos )) {
+                    assert( key_comparator()( val, *node_traits::to_value_ptr( *pos.pCur )) == 0 );
 
                     func( false, *node_traits::to_value_ptr( *pos.pCur ) , val );
                     m_Stat.onUpdateExisting();
@@ -597,7 +597,7 @@ namespace cds { namespace intrusive {
                         return std::make_pair( end(), false );
                     }
 
-                    if ( link_node( node_traits::to_node_ptr( val ), pos ) ) {
+                    if ( link_node( node_traits::to_node_ptr( val ), pos )) {
                         ++m_ItemCounter;
                         func( true, val , val );
                         m_Stat.onUpdateNew();
@@ -621,7 +621,7 @@ namespace cds { namespace intrusive {
         {
             position pos;
 
-            if ( search( refHead, val, cmp, pos ) ) {
+            if ( search( refHead, val, cmp, pos )) {
                 assert( pos.pCur != nullptr );
                 f( *node_traits::to_value_ptr( *pos.pCur ), val );
                 m_Stat.onFindSuccess();
@@ -636,7 +636,7 @@ namespace cds { namespace intrusive {
         value_type * find_at( atomic_node_ptr& refHead, Q const& val, Compare cmp )
         {
             iterator it = find_at_( refHead, val, cmp );
-            if ( it != end() ) {
+            if ( it != end()) {
                 m_Stat.onFindSuccess();
                 return &*it;
             }
@@ -650,7 +650,7 @@ namespace cds { namespace intrusive {
         {
             position pos;
 
-            if ( search( refHead, val, cmp, pos ) ) {
+            if ( search( refHead, val, cmp, pos )) {
                 assert( pos.pCur != nullptr );
                 m_Stat.onFindSuccess();
                 return iterator( pos.pCur );
index 7fbc68e6a55b094ef89f97f65682f6ab3ea723d8..3f3422da20c82bd88079fd409ba65f9712836361 100644 (file)
@@ -506,7 +506,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         bool erase( Q const& key )
         {
-            return erase_at( m_pHead, key, key_comparator() );
+            return erase_at( m_pHead, key, key_comparator());
         }
 
         /// Deletes the item from the list using \p pred predicate for searching
@@ -522,7 +522,7 @@ namespace cds { namespace intrusive {
         bool erase_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return erase_at( m_pHead, key, cds::opt::details::make_comparator_from_less<Less>() );
+            return erase_at( m_pHead, key, cds::opt::details::make_comparator_from_less<Less>());
         }
 
         /// Deletes the item from the list
@@ -592,7 +592,7 @@ namespace cds { namespace intrusive {
             rcu_michael_list::exempt_ptr p1;
 
             // The RCU should NOT be locked when extract() is called!
-            assert( !rcu::is_locked() );
+            assert( !rcu::is_locked());
 
             // You can call extract() function
             p1 = theList.extract( 10 );
@@ -610,7 +610,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         exempt_ptr extract( Q const& key )
         {
-            return exempt_ptr( extract_at( m_pHead, key, key_comparator() ));
+            return exempt_ptr( extract_at( m_pHead, key, key_comparator()));
         }
 
         /// Extracts an item from the list using \p pred predicate for searching
@@ -625,7 +625,7 @@ namespace cds { namespace intrusive {
         exempt_ptr extract_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return exempt_ptr( extract_at( m_pHead, key, cds::opt::details::make_comparator_from_less<Less>() ));
+            return exempt_ptr( extract_at( m_pHead, key, cds::opt::details::make_comparator_from_less<Less>()));
         }
 
         /// Find the key \p val
@@ -691,7 +691,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         bool contains( Q const& key )
         {
-            return find_at( m_pHead, key, key_comparator() );
+            return find_at( m_pHead, key, key_comparator());
         }
         //@cond
         template <typename Q>
@@ -712,7 +712,7 @@ namespace cds { namespace intrusive {
         bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_at( m_pHead, key, cds::opt::details::make_comparator_from_less<Less>() );
+            return find_at( m_pHead, key, cds::opt::details::make_comparator_from_less<Less>());
         }
         //@cond
         template <typename Q, typename Less>
@@ -787,7 +787,7 @@ namespace cds { namespace intrusive {
         */
         void clear()
         {
-            if( !empty() ) {
+            if( !empty()) {
                 check_deadlock_policy::check();
 
                 marked_node_ptr pHead;
@@ -795,9 +795,9 @@ namespace cds { namespace intrusive {
                     {
                         rcu_lock l;
                         pHead = m_pHead.load(memory_model::memory_order_acquire);
-                        if ( !pHead.ptr() )
+                        if ( !pHead.ptr())
                             break;
-                        marked_node_ptr pNext( pHead->m_pNext.load(memory_model::memory_order_relaxed) );
+                        marked_node_ptr pNext( pHead->m_pNext.load(memory_model::memory_order_relaxed));
                         if ( cds_unlikely( !pHead->m_pNext.compare_exchange_weak( pNext, pNext | 1, memory_model::memory_order_acquire, memory_model::memory_order_relaxed )))
                             continue;
                         if ( cds_unlikely( !m_pHead.compare_exchange_weak( pHead, marked_node_ptr(pNext.ptr()), memory_model::memory_order_release, memory_model::memory_order_relaxed )))
@@ -805,7 +805,7 @@ namespace cds { namespace intrusive {
                     }
 
                     --m_ItemCounter;
-                    dispose_node( pHead.ptr() );
+                    dispose_node( pHead.ptr());
                 }
             }
         }
@@ -846,25 +846,25 @@ namespace cds { namespace intrusive {
         static void dispose_node( node_type * pNode )
         {
             assert( pNode );
-            assert( !gc::is_locked() );
+            assert( !gc::is_locked());
 
-            gc::template retire_ptr<clear_and_dispose>( node_traits::to_value_ptr( *pNode ) );
+            gc::template retire_ptr<clear_and_dispose>( node_traits::to_value_ptr( *pNode ));
         }
 
         static void dispose_chain( node_type * pChain )
         {
             if ( pChain ) {
-                assert( !gc::is_locked() );
+                assert( !gc::is_locked());
 
                 auto f = [&pChain]() -> cds::urcu::retired_ptr {
                     node_type * p = pChain;
                     if ( p ) {
                         pChain = p->m_pDelChain;
-                        return cds::urcu::make_retired_ptr<clear_and_dispose>( node_traits::to_value_ptr( p ) );
+                        return cds::urcu::make_retired_ptr<clear_and_dispose>( node_traits::to_value_ptr( p ));
                     }
-                    return cds::urcu::make_retired_ptr<clear_and_dispose>( static_cast<value_type *>(nullptr) );
+                    return cds::urcu::make_retired_ptr<clear_and_dispose>( static_cast<value_type *>(nullptr));
                 };
-                gc::batch_retire( std::ref( f ) );
+                gc::batch_retire( std::ref( f ));
             }
         }
 
@@ -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 );
@@ -892,22 +892,22 @@ namespace cds { namespace intrusive {
 
         bool unlink_node( position& pos, erase_node_mask nMask )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             // 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 );
                 }
                 else {
                     // Slow path
-                    search( pos.refHead, *node_traits::to_value_ptr( pos.pCur ), pos, key_comparator() );
+                    search( pos.refHead, *node_traits::to_value_ptr( pos.pCur ), pos, key_comparator());
                 }
                 return true;
             }
@@ -928,7 +928,7 @@ namespace cds { namespace intrusive {
             // Hack: convert node_type to value_type.
             // In principle, auxiliary node can be non-reducible to value_type
             // We assume that comparator can correctly distinguish between aux and regular node.
-            return insert_at( refHead, *node_traits::to_value_ptr( pNode ) );
+            return insert_at( refHead, *node_traits::to_value_ptr( pNode ));
         }
 
         bool insert_at( atomic_node_ptr& refHead, value_type& val )
@@ -953,7 +953,7 @@ namespace cds { namespace intrusive {
                         return false;
                     }
 
-                    if ( link_node( node_traits::to_node_ptr( val ), pos ) ) {
+                    if ( link_node( node_traits::to_node_ptr( val ), pos )) {
                         f( val );
                         ++m_ItemCounter;
                         m_Stat.onInsertSuccess();
@@ -1006,7 +1006,7 @@ namespace cds { namespace intrusive {
             for (;;) {
                 {
                     rcu_lock l;
-                    if ( !search( refHead, val, pos, key_comparator() ) || node_traits::to_value_ptr( *pos.pCur ) != &val ) {
+                    if ( !search( refHead, val, pos, key_comparator()) || node_traits::to_value_ptr( *pos.pCur ) != &val ) {
                         m_Stat.onEraseFailed();
                         return false;
                     }
@@ -1033,7 +1033,7 @@ namespace cds { namespace intrusive {
             for (;;) {
                 {
                     rcu_lock l;
-                    if ( !search( pos.refHead, val, pos, cmp ) ) {
+                    if ( !search( pos.refHead, val, pos, cmp )) {
                         m_Stat.onEraseFailed();
                         return false;
                     }
@@ -1047,7 +1047,7 @@ namespace cds { namespace intrusive {
                     }
                 }
                 assert( pDel );
-                f( *node_traits::to_value_ptr( pDel ) );
+                f( *node_traits::to_value_ptr( pDel ));
                 --m_ItemCounter;
                 m_Stat.onEraseSuccess();
                 return true;
@@ -1073,7 +1073,7 @@ namespace cds { namespace intrusive {
         {
             position pos( refHead );
             back_off bkoff;
-            assert( !gc::is_locked() )  ;   // RCU must not be locked!!!
+            assert( !gc::is_locked())  ;   // RCU must not be locked!!!
 
             node_type * pExtracted;
             {
@@ -1108,7 +1108,7 @@ namespace cds { namespace intrusive {
 
             {
                 rcu_lock l;
-                if ( search( refHead, val, pos, cmp ) ) {
+                if ( search( refHead, val, pos, cmp )) {
                     assert( pos.pCur != nullptr );
                     f( *node_traits::to_value_ptr( *pos.pCur ), val );
                     m_Stat.onFindSuccess();
@@ -1134,7 +1134,7 @@ namespace cds { namespace intrusive {
         raw_ptr get_at( atomic_node_ptr& refHead, Q const& val, Compare cmp )
         {
             // RCU should be locked!
-            assert(gc::is_locked() );
+            assert(gc::is_locked());
 
             position pos( refHead );
 
@@ -1155,7 +1155,7 @@ namespace cds { namespace intrusive {
         bool search( atomic_node_ptr& refHead, const Q& val, position& pos, Compare cmp )
         {
             // RCU lock should be locked!!!
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             atomic_node_ptr * pPrev;
             marked_node_ptr pNext;
@@ -1169,7 +1169,7 @@ namespace cds { namespace intrusive {
             pNext = nullptr;
 
             while ( true ) {
-                if ( !pCur.ptr() ) {
+                if ( !pCur.ptr()) {
                     pos.pPrev = pPrev;
                     pos.pCur = nullptr;
                     pos.pNext = nullptr;
@@ -1185,11 +1185,11 @@ namespace cds { namespace intrusive {
                     goto try_again;
                 }
 
-                if ( pNext.bits() ) {
+                if ( pNext.bits()) {
                     // pCur is marked as deleted. Try to unlink it from the list
-                    if ( cds_likely( pPrev->compare_exchange_weak( pCur, marked_node_ptr( pNext.ptr() ), memory_model::memory_order_acquire, atomics::memory_order_relaxed ))) {
+                    if ( cds_likely( pPrev->compare_exchange_weak( pCur, marked_node_ptr( pNext.ptr()), memory_model::memory_order_acquire, atomics::memory_order_relaxed ))) {
                         if ( pNext.bits() == erase_mask )
-                            link_to_remove_chain( pos, pCur.ptr() );
+                            link_to_remove_chain( pos, pCur.ptr());
                         m_Stat.onHelpingSuccess();
                     }
 
@@ -1198,7 +1198,7 @@ namespace cds { namespace intrusive {
                 }
 
                 assert( pCur.ptr() != nullptr );
-                int nCmp = cmp( *node_traits::to_value_ptr( pCur.ptr() ), val );
+                int nCmp = cmp( *node_traits::to_value_ptr( pCur.ptr()), val );
                 if ( nCmp >= 0 ) {
                     pos.pPrev = pPrev;
                     pos.pCur = pCur.ptr();
@@ -1216,15 +1216,15 @@ namespace cds { namespace intrusive {
         bool insert_at_locked( position& pos, value_type& val )
         {
             // RCU lock should be locked!!!
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             while ( true ) {
-                if ( search( pos.refHead, val, pos, key_comparator() )) {
+                if ( search( pos.refHead, val, pos, key_comparator())) {
                     m_Stat.onInsertFailed();
                     return false;
                 }
 
-                if ( link_node( node_traits::to_node_ptr( val ), pos ) ) {
+                if ( link_node( node_traits::to_node_ptr( val ), pos )) {
                     ++m_ItemCounter;
                     m_Stat.onInsertSuccess();
                     return true;
@@ -1240,11 +1240,11 @@ namespace cds { namespace intrusive {
         std::pair<iterator, bool> update_at_locked( position& pos, value_type& val, Func func, bool bInsert )
         {
             // RCU should be locked!!!
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             while ( true ) {
-                if ( search( pos.refHead, val, pos, key_comparator() ) ) {
-                    assert( key_comparator()( val, *node_traits::to_value_ptr( *pos.pCur ) ) == 0 );
+                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 );
                     m_Stat.onUpdateExisting();
@@ -1256,7 +1256,7 @@ namespace cds { namespace intrusive {
                         return std::make_pair( end(), false );
                     }
 
-                    if ( link_node( node_traits::to_node_ptr( val ), pos ) ) {
+                    if ( link_node( node_traits::to_node_ptr( val ), pos )) {
                         ++m_ItemCounter;
                         func( true, val , val );
                         m_Stat.onUpdateNew();
@@ -1273,9 +1273,9 @@ namespace cds { namespace intrusive {
         template <typename Q, typename Compare>
         const_iterator find_at_locked( position& pos, Q const& val, Compare cmp )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
-            if ( search( pos.refHead, val, pos, cmp ) ) {
+            if ( search( pos.refHead, val, pos, cmp )) {
                 assert( pos.pCur != nullptr );
                 m_Stat.onFindSuccess();
                 return const_iterator( pos.pCur );
index d6185704090bfb61c4df977b48d0a4562568adb0..63a3dccdab65eec49ad9ccee157169c2e945f5bb 100644 (file)
@@ -333,7 +333,7 @@ namespace cds { namespace intrusive {
         */
         iterator begin()
         {
-            return iterator( m_Buckets[0].begin(), bucket_begin(), bucket_end() );
+            return iterator( m_Buckets[0].begin(), bucket_begin(), bucket_end());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a set
@@ -344,7 +344,7 @@ namespace cds { namespace intrusive {
         */
         iterator end()
         {
-            return iterator( bucket_end()[-1].end(), bucket_end() - 1, bucket_end() );
+            return iterator( bucket_end()[-1].end(), bucket_end() - 1, bucket_end());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
@@ -398,7 +398,7 @@ namespace cds { namespace intrusive {
 
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 it->~internal_bucket_type();
-            bucket_table_allocator().deallocate( m_Buckets, bucket_count() );
+            bucket_table_allocator().deallocate( m_Buckets, bucket_count());
         }
 
         /// Inserts new node
@@ -733,7 +733,7 @@ namespace cds { namespace intrusive {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find( key );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
             return iterator( it, &b, bucket_end());
         }
@@ -744,9 +744,9 @@ namespace cds { namespace intrusive {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find( key );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
-            return iterator( it, &b, bucket_end() );
+            return iterator( it, &b, bucket_end());
         }
         //@endcond
 
@@ -791,9 +791,9 @@ namespace cds { namespace intrusive {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find_with( key, pred );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
-            return iterator( it, &b, bucket_end() );
+            return iterator( it, &b, bucket_end());
         }
         //@cond
         template <typename Q, typename Less>
@@ -802,9 +802,9 @@ namespace cds { namespace intrusive {
         {
             internal_bucket_type& b = bucket( key );
             typename internal_bucket_type::iterator it = b.find_with( key, pred );
-            if ( it == b.end() )
+            if ( it == b.end())
                 return end();
-            return iterator( it, &b, bucket_end() );
+            return iterator( it, &b, bucket_end());
         }
         //@endcond
 
@@ -946,11 +946,11 @@ namespace cds { namespace intrusive {
 
         const_iterator get_const_begin() const
         {
-            return const_iterator( m_Buckets[0].cbegin(), bucket_begin(), bucket_end() );
+            return const_iterator( m_Buckets[0].cbegin(), bucket_begin(), bucket_end());
         }
         const_iterator get_const_end() const
         {
-            return const_iterator( bucket_end()[-1].cend(), bucket_end() - 1, bucket_end() );
+            return const_iterator( bucket_end()[-1].cend(), bucket_end() - 1, bucket_end());
         }
 
         template <typename Stat>
index 44b946b6983d5e2b173abeca99e36fdf91132230..9aeb8468686b95fcc3f83b790bae0072614c219d 100644 (file)
@@ -175,7 +175,7 @@ namespace cds { namespace intrusive {
         */
         iterator begin()
         {
-            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a set
@@ -186,7 +186,7 @@ namespace cds { namespace intrusive {
         */
         iterator end()
         {
-            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
@@ -197,7 +197,7 @@ namespace cds { namespace intrusive {
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( m_Buckets[0].cbegin(), m_Buckets, m_Buckets + bucket_count() );
+            return const_iterator( m_Buckets[0].cbegin(), m_Buckets, m_Buckets + bucket_count());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a set
@@ -208,7 +208,7 @@ namespace cds { namespace intrusive {
         /// Returns an const iterator that addresses the location succeeding the last element in a set
         const_iterator cend() const
         {
-            return const_iterator( m_Buckets[bucket_count() - 1].cend(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return const_iterator( m_Buckets[bucket_count() - 1].cend(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
     //@}
 
@@ -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<bucket_stat>( it );
@@ -238,7 +238,7 @@ namespace cds { namespace intrusive {
 
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 it->~internal_bucket_type();
-            bucket_table_allocator().deallocate( m_Buckets, bucket_count() );
+            bucket_table_allocator().deallocate( m_Buckets, bucket_count());
         }
 
         /// Inserts new node
index 52c420e2a25693351f24317cb4bbf3a8efc9e91b..ab80e74e00cf7482568a27ef7e029229c29001e2 100644 (file)
@@ -211,7 +211,7 @@ namespace cds { namespace intrusive {
         */
         iterator begin()
         {
-            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[0].begin(), m_Buckets, m_Buckets + bucket_count());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a set
@@ -222,7 +222,7 @@ namespace cds { namespace intrusive {
         */
         iterator end()
         {
-            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return iterator( m_Buckets[bucket_count() - 1].end(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
@@ -234,7 +234,7 @@ namespace cds { namespace intrusive {
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( m_Buckets[0].cbegin(), m_Buckets, m_Buckets + bucket_count() );
+            return const_iterator( m_Buckets[0].cbegin(), m_Buckets, m_Buckets + bucket_count());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a set
@@ -246,7 +246,7 @@ namespace cds { namespace intrusive {
         /// Returns an const iterator that addresses the location succeeding the last element in a set
         const_iterator cend() const
         {
-            return const_iterator( m_Buckets[bucket_count() - 1].cend(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() );
+            return const_iterator( m_Buckets[bucket_count() - 1].cend(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count());
         }
     //@}
 
@@ -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<bucket_stat>( it );
@@ -276,7 +276,7 @@ namespace cds { namespace intrusive {
 
             for ( auto it = m_Buckets, itEnd = m_Buckets + bucket_count(); it != itEnd; ++it )
                 it->~internal_bucket_type();
-            bucket_table_allocator().deallocate( m_Buckets, bucket_count() );
+            bucket_table_allocator().deallocate( m_Buckets, bucket_count());
         }
 
         /// Inserts new node
@@ -509,7 +509,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         exempt_ptr extract( Q const& key )
         {
-            exempt_ptr p( bucket( key ).extract( key ) );
+            exempt_ptr p( bucket( key ).extract( key ));
             if ( p )
                 --m_ItemCounter;
             return p;
@@ -524,7 +524,7 @@ namespace cds { namespace intrusive {
         template <typename Q, typename Less>
         exempt_ptr extract_with( Q const& key, Less pred )
         {
-            exempt_ptr p( bucket( key ).extract_with( key, pred ) );
+            exempt_ptr p( bucket( key ).extract_with( key, pred ));
             if ( p )
                 --m_ItemCounter;
             return p;
index 5b43b465dd033ce5b754d73188c4fd337f12fec3..d79e6026609dc1f7365811c93ae1569467ab5efa 100644 (file)
@@ -223,7 +223,7 @@ namespace cds { namespace intrusive {
             /// Creates empty node
             node()
                 : m_pVal( nullptr )
-                , m_nTag( tag_type(Empty) )
+                , m_nTag( tag_type(Empty))
             {}
 
             /// Lock the node
@@ -283,7 +283,7 @@ namespace cds { namespace intrusive {
 
             // Insert new item at bottom of the heap
             m_Lock.lock();
-            if ( m_ItemCounter.value() >= capacity() ) {
+            if ( m_ItemCounter.value() >= capacity()) {
                 // the heap is full
                 m_Lock.unlock();
                 m_Stat.onPushFailed();
@@ -291,7 +291,7 @@ namespace cds { namespace intrusive {
             }
 
             counter_type i = m_ItemCounter.inc();
-            assert( i < m_Heap.capacity() );
+            assert( i < m_Heap.capacity());
 
             node& refNode = m_Heap[i];
             refNode.lock();
@@ -326,7 +326,7 @@ namespace cds { namespace intrusive {
                 return nullptr;
             }
             counter_type nBottom = m_ItemCounter.dec();
-            assert( nBottom < m_Heap.capacity() );
+            assert( nBottom < m_Heap.capacity());
             assert( nBottom > 0 );
 
             refTop.lock();
@@ -348,7 +348,7 @@ namespace cds { namespace intrusive {
             refBottom.m_pVal = nullptr;
             refBottom.unlock();
 
-            if ( refTop.m_nTag == tag_type(Empty) ) {
+            if ( refTop.m_nTag == tag_type(Empty)) {
                 // nBottom == nTop
                 refTop.unlock();
                 m_Stat.onPopSuccess();
@@ -457,7 +457,7 @@ namespace cds { namespace intrusive {
                         i = 0;
                     }
                 }
-                else if ( refParent.m_nTag == tag_type( Empty ) ) {
+                else if ( refParent.m_nTag == tag_type( Empty )) {
                     m_Stat.onItemMovedTop();
                     i = 0;
                 }
index 5eafbba3b0f9bb93ff7620d91128cb75c2f3a5cd..240124cd0e86ddfe32d104d9fd98d416a0d260a4 100644 (file)
@@ -456,13 +456,13 @@ namespace cds { namespace intrusive {
                 void operator()( value_type * p ) const
                 {
                     assert( p != nullptr );
-                    MSQueue::clear_links( node_traits::to_node_ptr( p ) );
+                    MSQueue::clear_links( node_traits::to_node_ptr( p ));
                     disposer()(p);
                 }
             };
 
             if ( p != &m_Dummy )
-                gc::template retire<disposer_thunk>( node_traits::to_value_ptr( p ) );
+                gc::template retire<disposer_thunk>( node_traits::to_value_ptr( p ));
         }
         //@endcond
 
@@ -485,7 +485,7 @@ namespace cds { namespace intrusive {
             node_type * pHead = m_pHead.load(memory_model::memory_order_relaxed);
 
             assert( pHead != nullptr );
-            assert( pHead == m_pTail.load(memory_model::memory_order_relaxed) );
+            assert( pHead == m_pTail.load(memory_model::memory_order_relaxed));
 
             m_pHead.store( nullptr, memory_model::memory_order_relaxed );
             m_pTail.store( nullptr, memory_model::memory_order_relaxed );
@@ -596,7 +596,7 @@ namespace cds { namespace intrusive {
         */
         void clear()
         {
-            while ( dequeue() );
+            while ( dequeue());
         }
 
         /// Returns queue's item count
index c30ad17f9c1942877d12360897fecac484145b16..c8bd065ac91897b8d38621d675227ffc02ab5887 100644 (file)
@@ -570,11 +570,11 @@ namespace cds { namespace intrusive {
                     {
                         assert( p != nullptr );
 
-                        OptimisticQueue::clear_links( node_traits::to_node_ptr( *p ) );
+                        OptimisticQueue::clear_links( node_traits::to_node_ptr( *p ));
                         disposer()(p);
                     }
                 };
-                gc::template retire<internal_disposer>( node_traits::to_value_ptr(p) );
+                gc::template retire<internal_disposer>( node_traits::to_value_ptr(p));
             }
         }
 
index 97c2a4a2e2107e5bef3816743854be584b5cea99..a463751fdb817d206c88d834790815a5808d83cf 100644 (file)
@@ -324,7 +324,7 @@ namespace cds { namespace intrusive {
 
             ~segment_list()
             {
-                m_List.clear_and_dispose( gc_segment_disposer() );
+                m_List.clear_and_dispose( gc_segment_disposer());
             }
 
             segment * head( typename gc::Guard& guard )
@@ -343,7 +343,7 @@ namespace cds { namespace intrusive {
                 // The lock should be held
                 cell const * pLastCell = s.cells + quasi_factor();
                 for ( cell const * pCell = s.cells; pCell < pLastCell; ++pCell ) {
-                    if ( !pCell->data.load( memory_model::memory_order_relaxed ).all() )
+                    if ( !pCell->data.load( memory_model::memory_order_relaxed ).all())
                         return false;
                 }
                 return true;
@@ -353,7 +353,7 @@ namespace cds { namespace intrusive {
                 // The lock should be held
                 cell const * pLastCell = s.cells + quasi_factor();
                 for ( cell const * pCell = s.cells; pCell < pLastCell; ++pCell ) {
-                    if ( !pCell->data.load( memory_model::memory_order_relaxed ).bits() )
+                    if ( !pCell->data.load( memory_model::memory_order_relaxed ).bits())
                         return false;
                 }
                 return true;
@@ -371,17 +371,17 @@ namespace cds { namespace intrusive {
                 if ( !m_List.empty() && ( pTail != &m_List.back() || get_version(pTail) != m_List.back().version )) {
                     m_pTail.store( &m_List.back(), memory_model::memory_order_relaxed );
 
-                    return guard.assign( &m_List.back() );
+                    return guard.assign( &m_List.back());
                 }
 
 #           ifdef _DEBUG
-                assert( m_List.empty() || populated( m_List.back() ));
+                assert( m_List.empty() || populated( m_List.back()));
 #           endif
 
                 segment * pNew = allocate_segment();
                 m_Stat.onSegmentCreated();
 
-                if ( m_List.empty() )
+                if ( m_List.empty())
                     m_pHead.store( pNew, memory_model::memory_order_release );
                 m_List.push_back( *pNew );
                 m_pTail.store( pNew, memory_model::memory_order_release );
@@ -397,7 +397,7 @@ namespace cds { namespace intrusive {
                 {
                     scoped_lock l( m_Lock );
 
-                    if ( m_List.empty() ) {
+                    if ( m_List.empty()) {
                         m_pTail.store( nullptr, memory_model::memory_order_relaxed );
                         m_pHead.store( nullptr, memory_model::memory_order_relaxed );
                         return guard.assign( nullptr );
@@ -405,7 +405,7 @@ namespace cds { namespace intrusive {
 
                     if ( pHead != &m_List.front() || get_version(pHead) != m_List.front().version ) {
                         m_pHead.store( &m_List.front(), memory_model::memory_order_relaxed );
-                        return guard.assign( &m_List.front() );
+                        return guard.assign( &m_List.front());
                     }
 
 #           ifdef _DEBUG
@@ -413,12 +413,12 @@ namespace cds { namespace intrusive {
 #           endif
 
                     m_List.pop_front();
-                    if ( m_List.empty() ) {
+                    if ( m_List.empty()) {
                         pRet = guard.assign( nullptr );
                         m_pTail.store( nullptr, memory_model::memory_order_relaxed );
                     }
                     else
-                        pRet = guard.assign( &m_List.front() );
+                        pRet = guard.assign( &m_List.front());
                     m_pHead.store( pRet, memory_model::memory_order_release );
                 }
 
@@ -443,7 +443,7 @@ namespace cds { namespace intrusive {
 
             segment * allocate_segment()
             {
-                return segment_allocator().NewBlock( sizeof(segment) + sizeof(cell) * m_nQuasiFactor, quasi_factor() );
+                return segment_allocator().NewBlock( sizeof(segment) + sizeof(cell) * m_nQuasiFactor, quasi_factor());
             }
 
             static void free_segment( segment * pSegment )
@@ -497,7 +497,7 @@ namespace cds { namespace intrusive {
                 assert( pTailSegment );
             }
 
-            permutation_generator gen( quasi_factor() );
+            permutation_generator gen( quasi_factor());
 
             // First, increment item counter.
             // We sure that the item will be enqueued
@@ -510,7 +510,7 @@ namespace cds { namespace intrusive {
                 do {
                     typename permutation_generator::integer_type i = gen;
                     CDS_DEBUG_ONLY( ++nLoopCount );
-                    if ( pTailSegment->cells[i].data.load(memory_model::memory_order_relaxed).all() ) {
+                    if ( pTailSegment->cells[i].data.load(memory_model::memory_order_relaxed).all()) {
                         // Cell is not empty, go next
                         m_Stat.onPushPopulated();
                     }
@@ -524,10 +524,10 @@ namespace cds { namespace intrusive {
                             m_Stat.onPush();
                             return true;
                         }
-                        assert( nullCell.ptr() );
+                        assert( nullCell.ptr());
                         m_Stat.onPushContended();
                     }
-                } while ( gen.next() );
+                } while ( gen.next());
 
                 assert( nLoopCount == quasi_factor());
 
@@ -608,7 +608,7 @@ namespace cds { namespace intrusive {
         */
         void clear()
         {
-            clear_with( disposer() );
+            clear_with( disposer());
         }
 
         /// Clear the queue
@@ -620,9 +620,9 @@ namespace cds { namespace intrusive {
         void clear_with( Disposer )
         {
             typename gc::Guard itemGuard;
-            while ( do_dequeue( itemGuard ) ) {
-                assert( itemGuard.template get<value_type>() );
-                gc::template retire<Disposer>( itemGuard.template get<value_type>() );
+            while ( do_dequeue( itemGuard )) {
+                assert( itemGuard.template get<value_type>());
+                gc::template retire<Disposer>( itemGuard.template get<value_type>());
                 itemGuard.clear();
             }
         }
@@ -655,7 +655,7 @@ namespace cds { namespace intrusive {
             typename gc::Guard segmentGuard;
             segment * pHeadSegment = m_SegmentList.head( segmentGuard );
 
-            permutation_generator gen( quasi_factor() );
+            permutation_generator gen( quasi_factor());
             while ( true ) {
                 if ( !pHeadSegment ) {
                     // Queue is empty
@@ -674,15 +674,15 @@ namespace cds { namespace intrusive {
                     // In segmented queue the cell cannot be reused
                     // So no loop is needed here to protect the cell
                     item = pHeadSegment->cells[i].data.load( memory_model::memory_order_relaxed );
-                    itemGuard.assign( item.ptr() );
+                    itemGuard.assign( item.ptr());
 
                     // Check if this cell is empty, which means an element
                     // can be enqueued to this cell in the future
-                    if ( !item.ptr() )
+                    if ( !item.ptr())
                         bHadNullValue = true;
                     else {
                         // If the item is not deleted yet
-                        if ( !item.bits() ) {
+                        if ( !item.bits()) {
                             // Try to mark the cell as deleted
                             if ( pHeadSegment->cells[i].data.compare_exchange_strong( item, item | 1,
                                 memory_model::memory_order_acquire, atomics::memory_order_relaxed ))
@@ -692,13 +692,13 @@ namespace cds { namespace intrusive {
 
                                 return true;
                             }
-                            assert( item.bits() );
+                            assert( item.bits());
                             m_Stat.onPopContended();
                         }
                     }
-                } while ( gen.next() );
+                } while ( gen.next());
 
-                assert( nLoopCount == quasi_factor() );
+                assert( nLoopCount == quasi_factor());
 
                 // scanning the entire segment without finding a candidate to dequeue
                 // If there was an empty cell, the queue is considered empty
index a1d672e8146d09ea057faeedc29e3485cfdb315c..f3c7e735363e89ff6d30d014e247539f9f4e0529 100644 (file)
@@ -93,8 +93,8 @@ namespace cds { namespace intrusive {
             /// Access to element of next pointer array
             atomic_ptr& next( unsigned int nLevel )
             {
-                assert( nLevel < height() );
-                assert( nLevel == 0 || (nLevel > 0 && m_arrNext != nullptr) );
+                assert( nLevel < height());
+                assert( nLevel == 0 || (nLevel > 0 && m_arrNext != nullptr));
 
                 return nLevel ? m_arrNext[ nLevel - 1] : m_pNext;
             }
@@ -102,7 +102,7 @@ namespace cds { namespace intrusive {
             /// Access to element of next pointer array (const version)
             atomic_ptr const& next( unsigned int nLevel ) const
             {
-                assert( nLevel < height() );
+                assert( nLevel < height());
                 assert( nLevel == 0 || nLevel > 0 && m_arrNext != nullptr );
 
                 return nLevel ? m_arrNext[ nLevel - 1] : m_pNext;
@@ -165,7 +165,7 @@ namespace cds { namespace intrusive {
 
         public: // for internal use only!!!
             iterator( node_type& refHead )
-                : m_pNode( refHead[0].load( atomics::memory_order_relaxed ) )
+                : m_pNode( refHead[0].load( atomics::memory_order_relaxed ))
             {}
 
             static iterator from_node( node_type * pNode )
@@ -536,7 +536,7 @@ namespace cds { namespace intrusive {
             {
                 node_type * p = pos.pSucc[0];
                 pNode->next( 0 ).store( pos.pSucc[ 0 ], memory_model::memory_order_release );
-                if ( !pos.pPrev[0]->next(0).compare_exchange_strong( p, pNode, memory_model::memory_order_release, memory_model::memory_order_relaxed ) ) {
+                if ( !pos.pPrev[0]->next(0).compare_exchange_strong( p, pNode, memory_model::memory_order_release, memory_model::memory_order_relaxed )) {
                     return false;
                 }
                 f( val );
@@ -549,7 +549,7 @@ namespace cds { namespace intrusive {
 
                     if ( pNode->next( nLevel ).compare_exchange_strong( p, q, memory_model::memory_order_release, memory_model::memory_order_relaxed )) {
                         p = q;
-                        if ( pos.pPrev[nLevel]->next(nLevel).compare_exchange_strong( q, pNode, memory_model::memory_order_release, memory_model::memory_order_relaxed ) )
+                        if ( pos.pPrev[nLevel]->next(nLevel).compare_exchange_strong( q, pNode, memory_model::memory_order_release, memory_model::memory_order_relaxed ))
                             break;
                     }
 
@@ -581,7 +581,7 @@ namespace cds { namespace intrusive {
         void increase_height( unsigned int nHeight )
         {
             unsigned int nCur = m_nHeight.load( memory_model::memory_order_relaxed );
-            while ( nCur < nHeight && !m_nHeight.compare_exchange_weak( nCur, nHeight, memory_model::memory_order_acquire, atomics::memory_order_relaxed ) );
+            while ( nCur < nHeight && !m_nHeight.compare_exchange_weak( nCur, nHeight, memory_model::memory_order_acquire, atomics::memory_order_relaxed ));
         }
         //@endcond
 
@@ -624,18 +624,18 @@ namespace cds { namespace intrusive {
         /// Returns a forward iterator addressing the first element in a set
         iterator begin()
         {
-            return iterator( *m_Head.head() );
+            return iterator( *m_Head.head());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator begin() const
         {
-            return const_iterator( *m_Head.head() );
+            return const_iterator( *m_Head.head());
         }
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( *m_Head.head() );
+            return const_iterator( *m_Head.head());
         }
 
         /// Returns a forward iterator that addresses the location succeeding the last element in a set.
index 82d4607ca2eb8b7007a631b10b00665ca9d655a1..c07222890f1fa4a620d52cc67c0a29f65eb82d6e 100644 (file)
@@ -126,8 +126,8 @@ namespace cds { namespace intrusive {
             /// Access to element of next pointer array
             atomic_marked_ptr& next( unsigned int nLevel )
             {
-                assert( nLevel < height() );
-                assert( nLevel == 0 || (nLevel > 0 && m_arrNext != nullptr) );
+                assert( nLevel < height());
+                assert( nLevel == 0 || (nLevel > 0 && m_arrNext != nullptr));
 
 #           ifdef CDS_THREAD_SANITIZER_ENABLED
                 // TSan false positive: m_arrNext is read-only array
@@ -143,7 +143,7 @@ namespace cds { namespace intrusive {
             /// Access to element of next pointer array (const version)
             atomic_marked_ptr const& next( unsigned int nLevel ) const
             {
-                assert( nLevel < height() );
+                assert( nLevel < height());
                 assert( nLevel == 0 || nLevel > 0 && m_arrNext != nullptr );
 
 #           ifdef CDS_THREAD_SANITIZER_ENABLED
@@ -221,7 +221,7 @@ namespace cds { namespace intrusive {
                 back_off bkoff;
 
                 for (;;) {
-                    if ( m_pNode->next( m_pNode->height() - 1 ).load( atomics::memory_order_acquire ).bits() ) {
+                    if ( m_pNode->next( m_pNode->height() - 1 ).load( atomics::memory_order_acquire ).bits()) {
                         // Current node is marked as deleted. So, its next pointer can point to anything
                         // In this case we interrupt our iteration and returns end() iterator.
                         *this = iterator();
@@ -230,12 +230,12 @@ namespace cds { namespace intrusive {
 
                     marked_ptr p = m_pNode->next(0).load( atomics::memory_order_relaxed );
                     node_type * pp = p.ptr();
-                    if ( p.bits() ) {
+                    if ( p.bits()) {
                         // p is marked as deleted. Spin waiting for physical removal
                         bkoff();
                         continue;
                     }
-                    else if ( pp && pp->next( pp->height() - 1 ).load( atomics::memory_order_relaxed ).bits() ) {
+                    else if ( pp && pp->next( pp->height() - 1 ).load( atomics::memory_order_relaxed ).bits()) {
                         // p is marked as deleted. Spin waiting for physical removal
                         bkoff();
                         continue;
@@ -254,14 +254,14 @@ namespace cds { namespace intrusive {
 
                 for (;;) {
                     marked_ptr p = refHead.next(0).load( atomics::memory_order_relaxed );
-                    if ( !p.ptr() ) {
+                    if ( !p.ptr()) {
                         // empty skip-list
                         break;
                     }
 
                     node_type * pp = p.ptr();
                     // Logically deleted node is marked from highest level
-                    if ( !pp->next( pp->height() - 1 ).load( atomics::memory_order_acquire ).bits() ) {
+                    if ( !pp->next( pp->height() - 1 ).load( atomics::memory_order_acquire ).bits()) {
                         m_pNode = pp;
                         break;
                     }
@@ -587,7 +587,7 @@ namespace cds { namespace intrusive {
         {
             assert( pVal );
 
-            typename node_builder::node_disposer()( node_traits::to_node_ptr(pVal) );
+            typename node_builder::node_disposer()( node_traits::to_node_ptr(pVal));
             disposer()( pVal );
         }
 
@@ -602,7 +602,7 @@ namespace cds { namespace intrusive {
         static void dispose_chain( node_type * pChain )
         {
             if ( pChain ) {
-                assert( !gc::is_locked() );
+                assert( !gc::is_locked());
 
                 auto f = [&pChain]() -> cds::urcu::retired_ptr {
                     node_type * p = pChain;
@@ -700,7 +700,7 @@ namespace cds { namespace intrusive {
         template <typename Q, typename Compare >
         bool find_position( Q const& val, position& pos, Compare cmp, bool bStopIfFound )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             node_type * pPred;
             marked_node_ptr pSucc;
@@ -714,7 +714,7 @@ namespace cds { namespace intrusive {
 
                 while ( true ) {
                     pCur = pPred->next( nLevel ).load( memory_model::memory_order_acquire );
-                    if ( pCur.bits() ) {
+                    if ( pCur.bits()) {
                         // pCur.bits() means that pPred is logically deleted
                         goto retry;
                     }
@@ -727,24 +727,24 @@ namespace cds { namespace intrusive {
                     // pSucc contains deletion mark for pCur
                     pSucc = pCur->next( nLevel ).load( memory_model::memory_order_acquire );
 
-                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr() )
+                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr())
                         goto retry;
 
-                    if ( pSucc.bits() ) {
+                    if ( pSucc.bits()) {
                         // pCur is marked, i.e. logically deleted.
-                        marked_node_ptr p( pCur.ptr() );
+                        marked_node_ptr p( pCur.ptr());
 #                   ifdef _DEBUG
                         if ( nLevel == 0 )
                             pCur->m_bUnlinked = true;
 #                   endif
-                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr() ),
+                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr()),
                              memory_model::memory_order_release, atomics::memory_order_relaxed ))
                         {
                             if ( nLevel == 0 ) {
                                 if ( !is_extracted( pSucc )) {
                                     // We cannot free the node at this moment since RCU is locked
                                     // Link deleted nodes to a chain to free later
-                                    pos.dispose( pCur.ptr() );
+                                    pos.dispose( pCur.ptr());
                                     m_Stat.onEraseWhileFind();
                                 }
                                 else {
@@ -780,7 +780,7 @@ namespace cds { namespace intrusive {
 
         bool find_min_position( position& pos )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             node_type * pPred;
             marked_node_ptr pSucc;
@@ -796,29 +796,29 @@ namespace cds { namespace intrusive {
                 // head cannot be deleted
                 assert( pCur.bits() == 0 );
 
-                if ( pCur.ptr() ) {
+                if ( pCur.ptr()) {
 
                     // pSucc contains deletion mark for pCur
                     pSucc = pCur->next( nLevel ).load( memory_model::memory_order_acquire );
 
-                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr() )
+                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr())
                         goto retry;
 
-                    if ( pSucc.bits() ) {
+                    if ( pSucc.bits()) {
                         // pCur is marked, i.e. logically deleted.
 #                   ifdef _DEBUG
                         if ( nLevel == 0 )
                             pCur->m_bUnlinked = true;
 #                   endif
-                        marked_node_ptr p( pCur.ptr() );
-                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr() ),
+                        marked_node_ptr p( pCur.ptr());
+                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr()),
                             memory_model::memory_order_release, atomics::memory_order_relaxed ))
                         {
                             if ( nLevel == 0 ) {
                                 if ( !is_extracted( pSucc )) {
                                     // We cannot free the node at this moment since RCU is locked
                                     // Link deleted nodes to a chain to free later
-                                    pos.dispose( pCur.ptr() );
+                                    pos.dispose( pCur.ptr());
                                     m_Stat.onEraseWhileFind();
                                 }
                                 else {
@@ -839,7 +839,7 @@ namespace cds { namespace intrusive {
 
         bool find_max_position( position& pos )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             node_type * pPred;
             marked_node_ptr pSucc;
@@ -852,7 +852,7 @@ namespace cds { namespace intrusive {
 
                 while ( true ) {
                     pCur = pPred->next( nLevel ).load( memory_model::memory_order_acquire );
-                    if ( pCur.bits() ) {
+                    if ( pCur.bits()) {
                         // pCur.bits() means that pPred is logically deleted
                         goto retry;
                     }
@@ -865,24 +865,24 @@ namespace cds { namespace intrusive {
                     // pSucc contains deletion mark for pCur
                     pSucc = pCur->next( nLevel ).load( memory_model::memory_order_acquire );
 
-                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr() )
+                    if ( pPred->next( nLevel ).load( memory_model::memory_order_acquire ).all() != pCur.ptr())
                         goto retry;
 
-                    if ( pSucc.bits() ) {
+                    if ( pSucc.bits()) {
                         // pCur is marked, i.e. logically deleted.
 #                   ifdef _DEBUG
                         if ( nLevel == 0 )
                             pCur->m_bUnlinked = true;
 #                   endif
-                        marked_node_ptr p( pCur.ptr() );
-                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr() ),
+                        marked_node_ptr p( pCur.ptr());
+                        if ( pPred->next( nLevel ).compare_exchange_strong( p, marked_node_ptr( pSucc.ptr()),
                             memory_model::memory_order_release, atomics::memory_order_relaxed ))
                         {
                             if ( nLevel == 0 ) {
                                 if ( !is_extracted( pSucc )) {
                                     // We cannot free the node at this moment since RCU is locked
                                     // Link deleted nodes to a chain to free later
-                                    pos.dispose( pCur.ptr() );
+                                    pos.dispose( pCur.ptr());
                                     m_Stat.onEraseWhileFind();
                                 }
                                 else {
@@ -893,7 +893,7 @@ namespace cds { namespace intrusive {
                         goto retry;
                     }
                     else {
-                        if ( !pSucc.ptr() )
+                        if ( !pSucc.ptr())
                             break;
 
                         pPred = pCur.ptr();
@@ -911,7 +911,7 @@ namespace cds { namespace intrusive {
         template <typename Func>
         bool insert_at_position( value_type& val, node_type * pNode, position& pos, Func f )
         {
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             unsigned int nHeight = pNode->height();
             pNode->clear_tower();
@@ -935,12 +935,12 @@ namespace cds { namespace intrusive {
                     if ( !pNode->next( nLevel ).compare_exchange_strong( p, q, memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
                         // pNode has been marked as removed while we are inserting it
                         // Stop inserting
-                        assert( p.bits() );
+                        assert( p.bits());
                         m_Stat.onLogicDeleteWhileInsert();
                         return true;
                     }
                     p = q;
-                    if ( pos.pPrev[nLevel]->next(nLevel).compare_exchange_strong( q, marked_node_ptr( pNode ), memory_model::memory_order_release, atomics::memory_order_relaxed ) )
+                    if ( pos.pPrev[nLevel]->next(nLevel).compare_exchange_strong( q, marked_node_ptr( pNode ), memory_model::memory_order_release, atomics::memory_order_relaxed ))
                         break;
 
                     // Renew insert position
@@ -959,7 +959,7 @@ namespace cds { namespace intrusive {
         bool try_remove_at( node_type * pDel, position& pos, Func f, bool bExtract )
         {
             assert( pDel != nullptr );
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             marked_node_ptr pSucc;
 
@@ -977,7 +977,7 @@ namespace cds { namespace intrusive {
 
             pSucc = pDel->next(0).load( memory_model::memory_order_relaxed );
             while ( true ) {
-                if ( pSucc.bits() )
+                if ( pSucc.bits())
                     return false;
 
                 int const nMask = bExtract ? 3 : 1;
@@ -990,8 +990,8 @@ namespace cds { namespace intrusive {
                     pSucc = pDel;
                     for ( int nLevel = static_cast<int>( pDel->height() - 1 ); nLevel >= 0; --nLevel ) {
                         if ( !pos.pPrev[nLevel]->next(nLevel).compare_exchange_strong( pSucc,
-                            marked_node_ptr( pDel->next(nLevel).load(memory_model::memory_order_relaxed).ptr() ),
-                            memory_model::memory_order_release, atomics::memory_order_relaxed) )
+                            marked_node_ptr( pDel->next(nLevel).load(memory_model::memory_order_relaxed).ptr()),
+                            memory_model::memory_order_release, atomics::memory_order_relaxed))
                         {
                             // Do slow erase
                             find_position( *node_traits::to_value_ptr(pDel), pos, key_comparator(), false );
@@ -1045,7 +1045,7 @@ namespace cds { namespace intrusive {
                     continue;
 
                 while ( pCur != pNull ) {
-                    if ( pCur.bits() ) {
+                    if ( pCur.bits()) {
                         // Wait until pCur is removed
                         unsigned int nAttempt = 0;
                         while ( pCur.bits() && nAttempt++ < 16 ) {
@@ -1054,22 +1054,22 @@ namespace cds { namespace intrusive {
                         }
                         bkoff.reset();
 
-                        if ( pCur.bits() ) {
+                        if ( pCur.bits()) {
                             // Maybe, we are on deleted node sequence
                             // Abort searching, try slow-path
                             return find_fastpath_abort;
                         }
                     }
 
-                    if ( pCur.ptr() ) {
-                        int nCmp = cmp( *node_traits::to_value_ptr( pCur.ptr() ), val );
+                    if ( pCur.ptr()) {
+                        int nCmp = cmp( *node_traits::to_value_ptr( pCur.ptr()), val );
                         if ( nCmp < 0 ) {
                             pPred = pCur.ptr();
                             pCur = pCur->next(nLevel).load( memory_model::memory_order_acquire );
                         }
                         else if ( nCmp == 0 ) {
                             // found
-                            f( *node_traits::to_value_ptr( pCur.ptr() ), val );
+                            f( *node_traits::to_value_ptr( pCur.ptr()), val );
                             return find_fastpath_found;
                         }
                         else // pCur > val - go down
@@ -1143,7 +1143,7 @@ namespace cds { namespace intrusive {
             {
                 rcu_lock rcuLock;
 
-                if ( !find_position( val, pos, cmp, false ) ) {
+                if ( !find_position( val, pos, cmp, false )) {
                     m_Stat.onEraseFailed();
                     bRet = false;
                 }
@@ -1172,11 +1172,11 @@ namespace cds { namespace intrusive {
         value_type * do_extract_key( Q const& key, Compare cmp, position& pos )
         {
             // RCU should be locked!!!
-            assert( gc::is_locked() );
+            assert( gc::is_locked());
 
             node_type * pDel;
 
-            if ( !find_position( key, pos, cmp, false ) ) {
+            if ( !find_position( key, pos, cmp, false )) {
                 m_Stat.onExtractFailed();
                 pDel = nullptr;
             }
@@ -1231,7 +1231,7 @@ namespace cds { namespace intrusive {
 
         value_type * do_extract_min()
         {
-            assert( !gc::is_locked() );
+            assert( !gc::is_locked());
 
             position pos;
             node_type * pDel;
@@ -1239,7 +1239,7 @@ namespace cds { namespace intrusive {
             {
                 rcu_lock l;
 
-                if ( !find_min_position( pos ) ) {
+                if ( !find_min_position( pos )) {
                     m_Stat.onExtractMinFailed();
                     pDel = nullptr;
                 }
@@ -1247,7 +1247,7 @@ namespace cds { namespace intrusive {
                     pDel = pos.pCur;
                     unsigned int const nHeight = pDel->height();
 
-                    if ( try_remove_at( pDel, pos, []( value_type const& ) {}, true ) ) {
+                    if ( try_remove_at( pDel, pos, []( value_type const& ) {}, true )) {
                         --m_ItemCounter;
                         m_Stat.onRemoveNode( nHeight );
                         m_Stat.onExtractMinSuccess();
@@ -1264,7 +1264,7 @@ namespace cds { namespace intrusive {
 
         value_type * do_extract_max()
         {
-            assert( !gc::is_locked() );
+            assert( !gc::is_locked());
 
             position pos;
             node_type * pDel;
@@ -1272,7 +1272,7 @@ namespace cds { namespace intrusive {
             {
                 rcu_lock l;
 
-                if ( !find_max_position( pos ) ) {
+                if ( !find_max_position( pos )) {
                     m_Stat.onExtractMaxFailed();
                     pDel = nullptr;
                 }
@@ -1280,7 +1280,7 @@ namespace cds { namespace intrusive {
                     pDel = pos.pCur;
                     unsigned int const nHeight = pDel->height();
 
-                    if ( try_remove_at( pDel, pos, []( value_type const& ) {}, true ) ) {
+                    if ( try_remove_at( pDel, pos, []( value_type const& ) {}, true )) {
                         --m_ItemCounter;
                         m_Stat.onRemoveNode( nHeight );
                         m_Stat.onExtractMaxSuccess();
@@ -1342,19 +1342,19 @@ namespace cds { namespace intrusive {
         /// Returns a forward iterator addressing the first element in a set
         iterator begin()
         {
-            return iterator( *m_Head.head() );
+            return iterator( *m_Head.head());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator begin() const
         {
-            return const_iterator( *m_Head.head() );
+            return const_iterator( *m_Head.head());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( *m_Head.head() );
+            return const_iterator( *m_Head.head());
         }
 
         /// Returns a forward iterator that addresses the location succeeding the last element in a set.
@@ -1590,7 +1590,7 @@ namespace cds { namespace intrusive {
             {
                 rcu_lock l;
 
-                if ( !find_position( val, pos, key_comparator(), false ) ) {
+                if ( !find_position( val, pos, key_comparator(), false )) {
                     m_Stat.onUnlinkFailed();
                     bRet = false;
                 }
@@ -1712,7 +1712,7 @@ namespace cds { namespace intrusive {
             skip_list theList;
             // ...
 
-            typename skip_list::exempt_ptr ep( theList.extract_max() );
+            typename skip_list::exempt_ptr ep( theList.extract_max());
             if ( ep ) {
                 // Deal with ep
                 //...
@@ -1990,7 +1990,7 @@ namespace cds { namespace intrusive {
             this sequence
             \code
             set.clear();
-            assert( set.empty() );
+            assert( set.empty());
             \endcode
             the assertion could be raised.
 
@@ -1999,7 +1999,7 @@ namespace cds { namespace intrusive {
         void clear()
         {
             exempt_ptr ep;
-            while ( (ep = extract_min()) );
+            while ( (ep = extract_min()));
         }
 
         /// Returns maximum height of skip-list. The max height is a constant for each object and does not exceed 32.
index 017a39ad3168319ef38f7a45c6facf6e47056571..f8183cad06f52de5e2b133a282c3203831f70f28 100644 (file)
@@ -926,14 +926,14 @@ namespace cds { namespace intrusive {
 #endif
         find( Q& key )
         {
-            return find_iterator_( key, key_comparator() );
+            return find_iterator_( key, key_comparator());
         }
         //@cond
         template <typename Q>
         typename std::enable_if< std::is_same<Q, Q>::value && is_iterable_list< ordered_list >::value, iterator >::type
         find( Q const& key )
         {
-            return find_iterator_( key, key_comparator() );
+            return find_iterator_( key, key_comparator());
         }
         //@endcond
 
@@ -979,7 +979,7 @@ namespace cds { namespace intrusive {
         find_with( Q& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_iterator_( key, typename ordered_list_adapter::template make_compare_from_less<Less>() );
+            return find_iterator_( key, typename ordered_list_adapter::template make_compare_from_less<Less>());
         }
         //@cond
         template <typename Q, typename Less>
@@ -987,7 +987,7 @@ namespace cds { namespace intrusive {
         find_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_iterator_( key, typename ordered_list_adapter::template make_compare_from_less<Less>() );
+            return find_iterator_( key, typename ordered_list_adapter::template make_compare_from_less<Less>());
         }
         //@endcond
 
@@ -1172,9 +1172,9 @@ namespace cds { namespace intrusive {
                 if ( pBucket )
                     return pBucket;
 
-                pBucket = alloc_aux_node( split_list::dummy_hash( nBucket ) );
+                pBucket = alloc_aux_node( split_list::dummy_hash( nBucket ));
                 if ( pBucket ) {
-                    if ( m_List.insert_aux_node( pParentBucket, pBucket ) ) {
+                    if ( m_List.insert_aux_node( pParentBucket, pBucket )) {
                         m_Buckets.bucket( nBucket, pBucket );
                         m_Stat.onNewBucket();
                         return pBucket;
@@ -1209,7 +1209,7 @@ namespace cds { namespace intrusive {
             if ( pHead == nullptr )
                 pHead = init_bucket( nBucket );
 
-            assert( pHead->is_dummy() );
+            assert( pHead->is_dummy());
 
             return pHead;
         }
@@ -1228,7 +1228,7 @@ namespace cds { namespace intrusive {
             assert( pNode != nullptr );
 
             // insert_aux_node cannot return false for empty list
-            CDS_VERIFY( m_List.insert_aux_node( pNode ) );
+            CDS_VERIFY( m_List.insert_aux_node( pNode ));
 
             m_Buckets.bucket( 0, pNode );
         }
@@ -1246,10 +1246,10 @@ namespace cds { namespace intrusive {
 
             size_t sz = m_nBucketCountLog2.load( memory_model::memory_order_relaxed );
             const size_t nBucketCount = static_cast<size_t>(1) << sz;
-            if ( nBucketCount < m_Buckets.capacity() ) {
+            if ( nBucketCount < m_Buckets.capacity()) {
                 // we may grow the bucket table
                 const size_t nLoadFactor = m_Buckets.load_factor();
-                if ( nMaxCount < max_item_count( nBucketCount, nLoadFactor ) )
+                if ( nMaxCount < max_item_count( nBucketCount, nLoadFactor ))
                     return; // someone already have updated m_nBucketCountLog2, so stop here
 
                 m_nMaxItemCount.compare_exchange_strong( nMaxCount, max_item_count( nBucketCount << 1, nLoadFactor ),
@@ -1264,7 +1264,7 @@ namespace cds { namespace intrusive {
         bool find_( Q& val, Compare cmp, Func f )
         {
             size_t nHash = hash_value( val );
-            split_list::details::search_value_type<Q>  sv( val, split_list::regular_hash( nHash ) );
+            split_list::details::search_value_type<Q>  sv( val, split_list::regular_hash( nHash ));
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
@@ -1278,18 +1278,18 @@ namespace cds { namespace intrusive {
         bool find_( Q const& val, Compare cmp )
         {
             size_t nHash = hash_value( val );
-            split_list::details::search_value_type<Q const>  sv( val, split_list::regular_hash( nHash ) );
+            split_list::details::search_value_type<Q const>  sv( val, split_list::regular_hash( nHash ));
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
-            return m_Stat.onFind( m_List.find_at( pHead, sv, cmp ) );
+            return m_Stat.onFind( m_List.find_at( pHead, sv, cmp ));
         }
 
         template <typename Q, typename Compare>
         iterator find_iterator_( Q const& val, Compare cmp )
         {
             size_t nHash = hash_value( val );
-            split_list::details::search_value_type<Q const>  sv( val, split_list::regular_hash( nHash ) );
+            split_list::details::search_value_type<Q const>  sv( val, split_list::regular_hash( nHash ));
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
@@ -1300,36 +1300,36 @@ namespace cds { namespace intrusive {
         guarded_ptr get_( Q const& val, Compare cmp )
         {
             size_t nHash = hash_value( val );
-            split_list::details::search_value_type<Q const>  sv( val, split_list::regular_hash( nHash ) );
+            split_list::details::search_value_type<Q const>  sv( val, split_list::regular_hash( nHash ));
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
             guarded_ptr gp = m_List.get_at( pHead, sv, cmp );
-            m_Stat.onFind( !gp.empty() );
+            m_Stat.onFind( !gp.empty());
             return gp;
         }
 
         template <typename Q>
         guarded_ptr get_( Q const& key )
         {
-            return get_( key, key_comparator() );
+            return get_( key, key_comparator());
         }
 
         template <typename Q, typename Less>
         guarded_ptr get_with_( Q const& key, Less )
         {
-            return get_( key, typename ordered_list_adapter::template make_compare_from_less<Less>() );
+            return get_( key, typename ordered_list_adapter::template make_compare_from_less<Less>());
         }
 
         template <typename Q, typename Compare, typename Func>
         bool erase_( Q const& val, Compare cmp, Func f )
         {
             size_t nHash = hash_value( val );
-            split_list::details::search_value_type<Q const>  sv( val, split_list::regular_hash( nHash ) );
+            split_list::details::search_value_type<Q const>  sv( val, split_list::regular_hash( nHash ));
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
-            if ( m_List.erase_at( pHead, sv, cmp, f ) ) {
+            if ( m_List.erase_at( pHead, sv, cmp, f )) {
                 --m_ItemCounter;
                 m_Stat.onEraseSuccess();
                 return true;
@@ -1342,11 +1342,11 @@ namespace cds { namespace intrusive {
         bool erase_( Q const& val, Compare cmp )
         {
             size_t nHash = hash_value( val );
-            split_list::details::search_value_type<Q const>  sv( val, split_list::regular_hash( nHash ) );
+            split_list::details::search_value_type<Q const>  sv( val, split_list::regular_hash( nHash ));
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
-            if ( m_List.erase_at( pHead, sv, cmp ) ) {
+            if ( m_List.erase_at( pHead, sv, cmp )) {
                 --m_ItemCounter;
                 m_Stat.onEraseSuccess();
                 return true;
@@ -1359,7 +1359,7 @@ namespace cds { namespace intrusive {
         guarded_ptr extract_( Q const& val, Compare cmp )
         {
             size_t nHash = hash_value( val );
-            split_list::details::search_value_type<Q const> sv( val, split_list::regular_hash( nHash ) );
+            split_list::details::search_value_type<Q const> sv( val, split_list::regular_hash( nHash ));
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
@@ -1376,13 +1376,13 @@ namespace cds { namespace intrusive {
         template <typename Q>
         guarded_ptr extract_( Q const& key )
         {
-            return extract_( key, key_comparator() );
+            return extract_( key, key_comparator());
         }
 
         template <typename Q, typename Less>
         guarded_ptr extract_with_( Q const& key, Less )
         {
-            return extract_( key, typename ordered_list_adapter::template make_compare_from_less<Less>() );
+            return extract_( key, typename ordered_list_adapter::template make_compare_from_less<Less>());
         }
         //@endcond
 
index 8e2c44d7ef86340ceab546194f29b6d1dde4ffee..7e96194b785ac2cf1e77741fc09ce931d78af369 100644 (file)
@@ -190,7 +190,7 @@ namespace cds { namespace intrusive {
         */
         SplitListSet()
             : m_nBucketCountLog2(1)
-            , m_nMaxItemCount( max_item_count(2, m_Buckets.load_factor()) )
+            , m_nMaxItemCount( max_item_count(2, m_Buckets.load_factor()))
         {
             init();
         }
@@ -202,7 +202,7 @@ namespace cds { namespace intrusive {
             )
             : m_Buckets( nItemCount, nLoadFactor )
             , m_nBucketCountLog2(1)
-            , m_nMaxItemCount( max_item_count(2, m_Buckets.load_factor()) )
+            , m_nMaxItemCount( max_item_count(2, m_Buckets.load_factor()))
         {
             init();
         }
@@ -281,7 +281,7 @@ namespace cds { namespace intrusive {
         value_type * contains( Q const& key )
         {
             iterator it = find_( key );
-            if ( it == end() )
+            if ( it == end())
                 return nullptr;
             return &*it;
         }
@@ -304,7 +304,7 @@ namespace cds { namespace intrusive {
         value_type * contains( Q const& key, Less pred )
         {
             iterator it = find_with_( key, pred );
-            if ( it == end() )
+            if ( it == end())
                 return nullptr;
             return &*it;
         }
@@ -458,7 +458,7 @@ namespace cds { namespace intrusive {
         */
         iterator begin()
         {
-            return iterator( m_List.begin(), m_List.end() );
+            return iterator( m_List.begin(), m_List.end());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a split-list
@@ -470,31 +470,31 @@ namespace cds { namespace intrusive {
         */
         iterator end()
         {
-            return iterator( m_List.end(), m_List.end() );
+            return iterator( m_List.end(), m_List.end());
         }
 
         /// Returns a forward const iterator addressing the first element in a split-list
         const_iterator begin() const
         {
-            return const_iterator( m_List.begin(), m_List.end() );
+            return const_iterator( m_List.begin(), m_List.end());
         }
 
         /// Returns a forward const iterator addressing the first element in a split-list
         const_iterator cbegin() const
         {
-            return const_iterator( m_List.cbegin(), m_List.cend() );
+            return const_iterator( m_List.cbegin(), m_List.cend());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a split-list
         const_iterator end() const
         {
-            return const_iterator( m_List.end(), m_List.end() );
+            return const_iterator( m_List.end(), m_List.end());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a split-list
         const_iterator cend() const
         {
-            return const_iterator( m_List.cend(), m_List.cend() );
+            return const_iterator( m_List.cend(), m_List.cend());
         }
     //@}
 
@@ -509,10 +509,10 @@ namespace cds { namespace intrusive {
             node_traits::to_node_ptr( val )->m_nHash = split_list::regular_hash( nHash );
 
             list_iterator it = m_List.insert_at_( pHead, val );
-            if ( it != m_List.end() ) {
+            if ( it != m_List.end()) {
                 inc_item_count();
                 m_Stat.onInsertSuccess();
-                return iterator( it, m_List.end() );
+                return iterator( it, m_List.end());
             }
             m_Stat.onInsertFailed();
             return end();
@@ -528,7 +528,7 @@ namespace cds { namespace intrusive {
             node_traits::to_node_ptr( val )->m_nHash = split_list::regular_hash( nHash );
 
             std::pair<list_iterator, bool> ret = m_List.update_at_( pHead, val, func, bAllowInsert );
-            if ( ret.first != m_List.end() ) {
+            if ( ret.first != m_List.end()) {
                 if ( ret.second ) {
                     inc_item_count();
                     m_Stat.onUpdateNew();
@@ -549,9 +549,9 @@ namespace cds { namespace intrusive {
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
-            auto it = m_List.find_at_( pHead, sv, typename ordered_list_adapter::template make_compare_from_less<Less>() );
-            m_Stat.onFind( it != m_List.end() );
-            return iterator( it, m_List.end() );
+            auto it = m_List.find_at_( pHead, sv, typename ordered_list_adapter::template make_compare_from_less<Less>());
+            m_Stat.onFind( it != m_List.end());
+            return iterator( it, m_List.end());
         }
 
         template <typename Q>
@@ -562,9 +562,9 @@ namespace cds { namespace intrusive {
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
-            auto it = m_List.find_at_( pHead, sv, key_comparator() );
-            m_Stat.onFind( it != m_List.end() );
-            return iterator( it, m_List.end() );
+            auto it = m_List.find_at_( pHead, sv, key_comparator());
+            m_Stat.onFind( it != m_List.end());
+            return iterator( it, m_List.end());
         }
 
         template <typename Q, typename Compare, typename Func>
@@ -628,13 +628,13 @@ namespace cds { namespace intrusive {
             aux_node_type * pBucket = m_Buckets.bucket( nBucket );
 
             back_off bkoff;
-            for ( ;; pBucket = m_Buckets.bucket( nBucket ) ) {
+            for ( ;; pBucket = m_Buckets.bucket( nBucket )) {
                 if ( pBucket )
                     return pBucket;
 
-                pBucket = alloc_aux_node( split_list::dummy_hash( nBucket ) );
+                pBucket = alloc_aux_node( split_list::dummy_hash( nBucket ));
                 if ( pBucket ) {
-                    if ( m_List.insert_aux_node( pParentBucket, pBucket ) ) {
+                    if ( m_List.insert_aux_node( pParentBucket, pBucket )) {
                         m_Buckets.bucket( nBucket, pBucket );
                         m_Stat.onNewBucket();
                         return pBucket;
@@ -653,7 +653,7 @@ namespace cds { namespace intrusive {
             }
 
             // Another thread set the bucket. Wait while it done
-            for ( pBucket = m_Buckets.bucket( nBucket ); pBucket == nullptr; pBucket = m_Buckets.bucket( nBucket ) ) {
+            for ( pBucket = m_Buckets.bucket( nBucket ); pBucket == nullptr; pBucket = m_Buckets.bucket( nBucket )) {
                 bkoff();
                 m_Stat.onBusyWaitBucketInit();
             }
@@ -669,7 +669,7 @@ namespace cds { namespace intrusive {
             if ( pHead == nullptr )
                 pHead = init_bucket( nBucket );
 
-            assert( pHead->is_dummy() );
+            assert( pHead->is_dummy());
 
             return pHead;
         }
@@ -680,7 +680,7 @@ namespace cds { namespace intrusive {
             aux_node_type * pNode = alloc_aux_node( 0 /*split_list::dummy_hash(0)*/ );
 
             // insert_aux_node cannot return false for empty list
-            CDS_VERIFY( m_List.insert_aux_node( pNode ) );
+            CDS_VERIFY( m_List.insert_aux_node( pNode ));
 
             m_Buckets.bucket( 0, pNode );
         }
@@ -698,10 +698,10 @@ namespace cds { namespace intrusive {
 
             size_t sz = m_nBucketCountLog2.load( memory_model::memory_order_relaxed );
             const size_t nBucketCount = static_cast<size_t>(1) << sz;
-            if ( nBucketCount < m_Buckets.capacity() ) {
+            if ( nBucketCount < m_Buckets.capacity()) {
                 // we may grow the bucket table
                 const size_t nLoadFactor = m_Buckets.load_factor();
-                if ( nMaxCount < max_item_count( nBucketCount, nLoadFactor ) )
+                if ( nMaxCount < max_item_count( nBucketCount, nLoadFactor ))
                     return; // someone already have updated m_nBucketCountLog2, so stop here
 
                 m_nMaxItemCount.compare_exchange_strong( nMaxCount, max_item_count( nBucketCount << 1, nLoadFactor ),
index f91ffa04af6d7e0e0103317b420f01b364878cbe..e3d459cef6f8453695233f004173eeb5c3f5b42d 100644 (file)
@@ -283,7 +283,7 @@ namespace cds { namespace intrusive {
         */
         SplitListSet()
             : m_nBucketCountLog2(1)
-            , m_nMaxItemCount( max_item_count(2, m_Buckets.load_factor()) )
+            , m_nMaxItemCount( max_item_count(2, m_Buckets.load_factor()))
         {
             init();
         }
@@ -295,7 +295,7 @@ namespace cds { namespace intrusive {
             )
             : m_Buckets( nItemCount, nLoadFactor )
             , m_nBucketCountLog2(1)
-            , m_nMaxItemCount( max_item_count(2, m_Buckets.load_factor()) )
+            , m_nMaxItemCount( max_item_count(2, m_Buckets.load_factor()))
         {
             init();
         }
@@ -450,7 +450,7 @@ namespace cds { namespace intrusive {
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
-            if ( m_List.unlink_at( pHead, val ) ) {
+            if ( m_List.unlink_at( pHead, val )) {
                 --m_ItemCounter;
                 m_Stat.onEraseSuccess();
                 return true;
@@ -477,7 +477,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         bool erase( Q const& key )
         {
-            return erase_( key, key_comparator() );
+            return erase_( key, key_comparator());
         }
 
         /// Deletes the item from the set using \p pred for searching
@@ -491,7 +491,7 @@ namespace cds { namespace intrusive {
         bool erase_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return erase_( key, typename ordered_list_adapter::template make_compare_from_less<Less>() );
+            return erase_( key, typename ordered_list_adapter::template make_compare_from_less<Less>());
         }
 
         /// Deletes the item from the set
@@ -574,7 +574,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         exempt_ptr extract( Q const& key )
         {
-            return exempt_ptr(extract_( key, key_comparator() ));
+            return exempt_ptr(extract_( key, key_comparator()));
         }
 
         /// Extracts an item from the set using \p pred for searching
@@ -662,7 +662,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         bool contains( Q const& key )
         {
-            return find_value( key, key_comparator() );
+            return find_value( key, key_comparator());
         }
         //@cond
         template <typename Q>
@@ -683,7 +683,7 @@ namespace cds { namespace intrusive {
         bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return find_value( key, typename ordered_list_adapter::template make_compare_from_less<Less>() );
+            return find_value( key, typename ordered_list_adapter::template make_compare_from_less<Less>());
         }
         //@cond
         template <typename Q, typename Less>
@@ -725,7 +725,7 @@ namespace cds { namespace intrusive {
         template <typename Q>
         raw_ptr get( Q const& key )
         {
-            return get_( key, key_comparator() );
+            return get_( key, key_comparator());
         }
 
         /// Finds the key \p key and return the item found
@@ -765,7 +765,7 @@ namespace cds { namespace intrusive {
         void clear()
         {
             iterator it = begin();
-            while ( it != end() ) {
+            while ( it != end()) {
                 iterator i(it);
                 ++i;
                 unlink( *it );
@@ -829,7 +829,7 @@ namespace cds { namespace intrusive {
         */
         iterator begin()
         {
-            return iterator( m_List.begin(), m_List.end() );
+            return iterator( m_List.begin(), m_List.end());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a split-list
@@ -841,7 +841,7 @@ namespace cds { namespace intrusive {
         */
         iterator end()
         {
-            return iterator( m_List.end(), m_List.end() );
+            return iterator( m_List.end(), m_List.end());
         }
 
         /// Returns a forward const iterator addressing the first element in a split-list
@@ -852,7 +852,7 @@ namespace cds { namespace intrusive {
         /// Returns a forward const iterator addressing the first element in a split-list
         const_iterator cbegin() const
         {
-            return const_iterator( m_List.cbegin(), m_List.cend() );
+            return const_iterator( m_List.cbegin(), m_List.cend());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a split-list
@@ -863,7 +863,7 @@ namespace cds { namespace intrusive {
         /// Returns an const iterator that addresses the location succeeding the last element in a split-list
         const_iterator cend() const
         {
-            return const_iterator( m_List.cend(), m_List.cend() );
+            return const_iterator( m_List.cend(), m_List.cend());
         }
     //@}
 
@@ -899,7 +899,7 @@ namespace cds { namespace intrusive {
         static size_t parent_bucket( size_t nBucket )
         {
             assert( nBucket > 0 );
-            return nBucket & ~( 1 << bitop::MSBnz( nBucket ) );
+            return nBucket & ~( 1 << bitop::MSBnz( nBucket ));
         }
 
         aux_node_type * init_bucket( size_t const nBucket )
@@ -919,13 +919,13 @@ namespace cds { namespace intrusive {
             aux_node_type * pBucket = m_Buckets.bucket( nBucket );
 
             back_off bkoff;
-            for ( ;; pBucket = m_Buckets.bucket( nBucket ) ) {
+            for ( ;; pBucket = m_Buckets.bucket( nBucket )) {
                 if ( pBucket )
                     return pBucket;
 
-                pBucket = alloc_aux_node( split_list::dummy_hash( nBucket ) );
+                pBucket = alloc_aux_node( split_list::dummy_hash( nBucket ));
                 if ( pBucket ) {
-                    if ( m_List.insert_aux_node( pParentBucket, pBucket ) ) {
+                    if ( m_List.insert_aux_node( pParentBucket, pBucket )) {
                         m_Buckets.bucket( nBucket, pBucket );
                         m_Stat.onNewBucket();
                         return pBucket;
@@ -944,7 +944,7 @@ namespace cds { namespace intrusive {
             }
 
             // Another thread set the bucket. Wait while it done
-            for ( pBucket = m_Buckets.bucket( nBucket ); pBucket == nullptr; pBucket = m_Buckets.bucket( nBucket ) ) {
+            for ( pBucket = m_Buckets.bucket( nBucket ); pBucket == nullptr; pBucket = m_Buckets.bucket( nBucket )) {
                 bkoff();
                 m_Stat.onBusyWaitBucketInit();
             }
@@ -960,7 +960,7 @@ namespace cds { namespace intrusive {
             if ( pHead == nullptr )
                 pHead = init_bucket( nBucket );
 
-            assert( pHead->is_dummy() );
+            assert( pHead->is_dummy());
 
             return pHead;
         }
@@ -989,7 +989,7 @@ namespace cds { namespace intrusive {
 
             size_t sz = m_nBucketCountLog2.load(memory_model::memory_order_relaxed);
             const size_t nBucketCount = static_cast<size_t>(1) << sz;
-            if ( nBucketCount < m_Buckets.capacity() ) {
+            if ( nBucketCount < m_Buckets.capacity()) {
                 // we may grow the bucket table
                 const size_t nLoadFactor = m_Buckets.load_factor();
                 if ( nMaxCount < max_item_count( nBucketCount, nLoadFactor ))
@@ -1072,7 +1072,7 @@ namespace cds { namespace intrusive {
             aux_node_type * pHead = get_bucket( nHash );
             assert( pHead != nullptr );
 
-            if ( m_List.erase_at( pHead, sv, cmp ) ) {
+            if ( m_List.erase_at( pHead, sv, cmp )) {
                 --m_ItemCounter;
                 m_Stat.onEraseSuccess();
                 return true;
index 269577dfb51ab0fdebb506727b24ff1d1c2ddd35..50003437c1379013ef9bb6f48daed8182869746d 100644 (file)
@@ -409,7 +409,7 @@ namespace cds { namespace intrusive {
                 for ( bucket_iterator it = pCur->begin(); it != itEnd; it = itNext ) {
                     itNext = it;
                     ++itNext;
-                    bucket( m_Hash( *it ) )->move_item( *pCur, it );
+                    bucket( m_Hash( *it ))->move_item( *pCur, it );
                 }
                 pCur->clear();
             }
@@ -425,7 +425,7 @@ namespace cds { namespace intrusive {
             size_t volatile& refBucketMask = m_nBucketMask;
 
             scoped_resize_lock al( m_MutexPolicy );
-            if ( al.success() ) {
+            if ( al.success()) {
                 if ( nOldCapacity != refBucketMask + 1 ) {
                     // someone resized already
                     return;
@@ -486,7 +486,7 @@ namespace cds { namespace intrusive {
         : m_Buckets( nullptr )
         , m_nBucketMask( ( nCapacity ? calc_init_capacity(nCapacity) : c_nMinimalCapacity ) - 1 )
         , m_MutexPolicy( m_nBucketMask + 1 )
-        , m_ResizingPolicy( std::forward<resizing_policy>( resizingPolicy ) )
+        , m_ResizingPolicy( std::forward<resizing_policy>( resizingPolicy ))
         {
             alloc_bucket_table( m_nBucketMask + 1 );
         }
index f51ffeafe547208bb486297ea5d011ef69d178a3..cb1574aa4ea66161497ee7dd3f0e179e5e2b3102 100644 (file)
@@ -255,8 +255,8 @@ namespace cds { namespace intrusive {
                         return std::make_pair( true, res.second );
                     }
                     else {
-                        auto it = m_Set.find( val, key_comparator() );
-                        if ( it == m_Set.end() )
+                        auto it = m_Set.find( val, key_comparator());
+                        if ( it == m_Set.end())
                             return std::make_pair( false, false );
                         f( false, *it, val );
                         return std::make_pair( true, false );
@@ -265,7 +265,7 @@ namespace cds { namespace intrusive {
 
                 bool unlink( value_type& val )
                 {
-                    iterator it = m_Set.find( val, key_comparator() );
+                    iterator it = m_Set.find( val, key_comparator());
                     if ( it == m_Set.end() || &(*it) != &val )
                         return false;
                     m_Set.erase( it );
@@ -275,7 +275,7 @@ namespace cds { namespace intrusive {
                 template <typename Q, typename Func>
                 value_type * erase( Q const& key, Func f )
                 {
-                    iterator it = m_Set.find( key, key_comparator() );
+                    iterator it = m_Set.find( key, key_comparator());
                     if (it == m_Set.end())
                         return nullptr;
                     value_type& val = *it;
@@ -306,7 +306,7 @@ namespace cds { namespace intrusive {
                 bool find( Q const& key, Compare cmp, Func f )
                 {
                     iterator it = m_Set.find( key, cmp );
-                    if ( it == m_Set.end() )
+                    if ( it == m_Set.end())
                         return false;
                     f( *it, key );
                     return true;
index 4205b594a4fc9ef0021906fd7076e617783c6741..ac52bbb52886c79edc79377f5f8be3cf90148c3d 100644 (file)
@@ -81,7 +81,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                     iterator itEnd = m_List.end();
                     iterator it;
                     for ( it = m_List.begin(); it != itEnd; ++it ) {
-                        if ( !pred( *it, key ) )
+                        if ( !pred( *it, key ))
                             break;
                     }
                     return it;
@@ -102,7 +102,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 template <typename Func>
                 bool insert( value_type& val, Func f )
                 {
-                    iterator it = find_key( val, find_predicate() );
+                    iterator it = find_key( val, find_predicate());
                     if ( it == m_List.end() || key_comparator()(val, *it) != 0 ) {
                         m_List.insert( it, val );
                         f( val );
@@ -117,7 +117,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 template <typename Func>
                 std::pair<bool, bool> update( value_type& val, Func f, bool bAllowInsert )
                 {
-                    iterator it = find_key( val, find_predicate() );
+                    iterator it = find_key( val, find_predicate());
                     if ( it == m_List.end() || key_comparator()(val, *it) != 0 ) {
                         // insert new
                         if ( !bAllowInsert )
@@ -136,7 +136,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
                 bool unlink( value_type& val )
                 {
-                    iterator it = find_key( val, find_predicate() );
+                    iterator it = find_key( val, find_predicate());
                     if ( it == m_List.end() || &(*it) != &val )
                         return false;
 
@@ -147,7 +147,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 template <typename Q, typename Func>
                 value_type * erase( Q const& key, Func f )
                 {
-                    iterator it = find_key( key, find_predicate() );
+                    iterator it = find_key( key, find_predicate());
                     if ( it == m_List.end() || key_comparator()(key, *it) != 0 )
                         return nullptr;
 
@@ -163,7 +163,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 value_type * erase( Q const& key, Less pred, Func f )
                 {
                     iterator it = find_key( key, pred );
-                    if ( it == m_List.end() || pred( key, *it ) || pred( *it, key ) )
+                    if ( it == m_List.end() || pred( key, *it ) || pred( *it, key ))
                         return nullptr;
 
                     // key exists
@@ -184,7 +184,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 bool find( Q& key, Less pred, Func f )
                 {
                     iterator it = find_key( key, pred );
-                    if ( it == m_List.end() || pred( key, *it ) || pred( *it, key ) )
+                    if ( it == m_List.end() || pred( key, *it ) || pred( *it, key ))
                         return false;
 
                     // key exists
index 9b9e372194f5513e96913a998637722285194c50..dc3787c95ff10de1c07d617e72a8c53938c16f28 100644 (file)
@@ -63,9 +63,9 @@ namespace cds { namespace intrusive { namespace striped_set {
                     iterator itPrev = m_List.before_begin();
                     iterator itEnd = m_List.end();
                     for ( iterator it = m_List.begin(); it != itEnd; ++it ) {
-                        if ( pred( key, *it ) )
+                        if ( pred( key, *it ))
                             itPrev = it;
-                        else if ( pred( *it, key ) )
+                        else if ( pred( *it, key ))
                             break;
                         else
                             return std::make_pair( itPrev, true );
@@ -76,7 +76,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 template <typename Q>
                 std::pair< iterator, bool > find_prev_item( Q const& key )
                 {
-                    return find_prev_item_cmp( key, key_comparator() );
+                    return find_prev_item_cmp( key, key_comparator());
                 }
 
                 template <typename Q, typename Compare>
index e8eb8e519f55c3dd8c0f55b642ea4ec46423698f..f612b372fdfd8b2e7ff45d17b49fc8340d19eb81 100644 (file)
@@ -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()
@@ -120,7 +120,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                     }
                     else {
                         auto it = m_Set.find( val );
-                        if ( it == m_Set.end() )
+                        if ( it == m_Set.end())
                             return std::make_pair( false, false );
                         f( false, *it, val );
                         return std::make_pair( true, false );
@@ -129,7 +129,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
                 bool unlink( value_type& val )
                 {
-                    iterator it = m_Set.find( value_type( val ) );
+                    iterator it = m_Set.find( value_type( val ));
                     if ( it == m_Set.end() || &(*it) != &val )
                         return false;
                     m_Set.erase( it );
@@ -139,8 +139,8 @@ namespace cds { namespace intrusive { namespace striped_set {
                 template <typename Q, typename Func>
                 value_type * erase( Q const& key, Func f )
                 {
-                    iterator it = m_Set.find( key, typename container_type::hasher(), typename container_type::key_equal() );
-                    if ( it == m_Set.end() )
+                    iterator it = m_Set.find( key, typename container_type::hasher(), typename container_type::key_equal());
+                    if ( it == m_Set.end())
                         return nullptr;
                     value_type& val = *it;
                     f( val );
@@ -151,8 +151,8 @@ namespace cds { namespace intrusive { namespace striped_set {
                 template <typename Q, typename Less, typename Func>
                 value_type * erase( Q const& key, Less pred, Func f )
                 {
-                    iterator it = m_Set.find( key, typename container_type::hasher(), equal_from_compare<Less>( pred ) );
-                    if ( it == m_Set.end() )
+                    iterator it = m_Set.find( key, typename container_type::hasher(), equal_from_compare<Less>( pred ));
+                    if ( it == m_Set.end())
                         return nullptr;
                     value_type& val = *it;
                     f( val );
@@ -163,8 +163,8 @@ namespace cds { namespace intrusive { namespace striped_set {
                 template <typename Q, typename Func>
                 bool find( Q& key, Func f )
                 {
-                    iterator it = m_Set.find( key, typename container_type::hasher(), typename container_type::key_equal() );
-                    if ( it == m_Set.end() )
+                    iterator it = m_Set.find( key, typename container_type::hasher(), typename container_type::key_equal());
+                    if ( it == m_Set.end())
                         return false;
                     f( *it, key );
                     return true;
@@ -173,8 +173,8 @@ namespace cds { namespace intrusive { namespace striped_set {
                 template <typename Q, typename Less, typename Func>
                 bool find( Q& key, Less pred, Func f )
                 {
-                    iterator it = m_Set.find( key, typename container_type::hasher(), equal_from_compare<Less>( pred ) );
-                    if ( it == m_Set.end() )
+                    iterator it = m_Set.find( key, typename container_type::hasher(), equal_from_compare<Less>( pred ));
+                    if ( it == m_Set.end())
                         return false;
                     f( *it, key );
                     return true;
index 8c53aa53d0f077c00789a0317c340daa283ad601..4eebba1239679d392f7986cd02444655f23af379 100644 (file)
@@ -198,7 +198,7 @@ namespace cds { namespace intrusive { namespace striped_set {
         lock_array_ptr create_lock_array( size_t nCapacity )
         {
             m_nCapacity.store( nCapacity, atomics::memory_order_relaxed );
-            return lock_array_ptr( lock_array_allocator().New( nCapacity ), lock_array_disposer() );
+            return lock_array_ptr( lock_array_allocator().New( nCapacity ), lock_array_disposer());
         }
 
         lock_type& acquire( size_t nHash )
@@ -211,7 +211,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 // wait while resizing
                 while ( true ) {
                     who = m_Owner.load( atomics::memory_order_acquire );
-                    if ( !( who & 1 ) || (who >> 1) == (me & c_nOwnerMask) )
+                    if ( !( who & 1 ) || (who >> 1) == (me & c_nOwnerMask))
                         break;
                     bkoff();
                 }
@@ -226,7 +226,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 lock.lock();
 
                 who = m_Owner.load( atomics::memory_order_acquire );
-                if ( ( !(who & 1) || (who >> 1) == (me & c_nOwnerMask) ) && m_arrLocks == pLocks )
+                if ( ( !(who & 1) || (who >> 1) == (me & c_nOwnerMask)) && m_arrLocks == pLocks )
                     return lock;
                 lock.unlock();
             }
@@ -242,7 +242,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 // wait while resizing
                 while ( true ) {
                     who = m_Owner.load( atomics::memory_order_acquire );
-                    if ( !( who & 1 ) || (who >> 1) == (me & c_nOwnerMask) )
+                    if ( !( who & 1 ) || (who >> 1) == (me & c_nOwnerMask))
                         break;
                     bkoff();
                 }
@@ -256,7 +256,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 pLocks->lock_all();
 
                 who = m_Owner.load( atomics::memory_order_acquire );
-                if ( ( !(who & 1) || (who >> 1) == (me & c_nOwnerMask) ) && m_arrLocks == pLocks )
+                if ( ( !(who & 1) || (who >> 1) == (me & c_nOwnerMask)) && m_arrLocks == pLocks )
                     return pLocks;
 
                 pLocks->unlock_all();
@@ -281,7 +281,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                     for ( size_t i = 0; i < nLockCount; ++i ) {
                         typename lock_array_type::lock_type& lock = pOldLocks->at(i);
                         bkoff.reset();
-                        while ( !lock.try_lock() )
+                        while ( !lock.try_lock())
                             bkoff();
                         lock.unlock();
                     }
@@ -305,7 +305,7 @@ namespace cds { namespace intrusive { namespace striped_set {
 
         public:
             scoped_cell_lock( refinable& policy, size_t nHash )
-                : m_guard( policy.acquire( nHash ), std::adopt_lock_t() )
+                : m_guard( policy.acquire( nHash ), std::adopt_lock_t())
             {}
         };
 
index 21984cb796121538f0539d5b2f016e2438de5320..f0514ed15080aa663acb7624f806eeae29fb9700 100644 (file)
@@ -820,7 +820,7 @@ namespace cds { namespace intrusive {
                 pTop = m_Top.load( memory_model::memory_order_relaxed );
                 if ( pTop == nullptr )
                     return;
-                if ( m_Top.compare_exchange_weak( pTop, nullptr, memory_model::memory_order_acquire, atomics::memory_order_relaxed ) ) {
+                if ( m_Top.compare_exchange_weak( pTop, nullptr, memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
                     m_ItemCounter.reset();
                     break;
                 }
@@ -831,7 +831,7 @@ namespace cds { namespace intrusive {
                 node_type * p = pTop;
                 pTop = p->m_pNext.load(memory_model::memory_order_relaxed);
                 clear_links( p );
-                gc::template retire<disposer>( node_traits::to_value_ptr( *p ) );
+                gc::template retire<disposer>( node_traits::to_value_ptr( *p ));
             }
         }
 
index a723fc7d1a6e9394506859375e8110010f330389..550762762c2256579a470b800ef81a46e33e8500 100644 (file)
@@ -269,24 +269,24 @@ namespace cds { namespace intrusive {
                 index_type temp = ( ate + 1 ) & nModulo ;    // next item after tail
 
                 // Looking for actual tail
-                while ( !is_free( tt ) ) {
-                    if ( te != m_nTail.load(memory_model::memory_order_relaxed) )    // check the tail consistency
+                while ( !is_free( tt )) {
+                    if ( te != m_nTail.load(memory_model::memory_order_relaxed))    // check the tail consistency
                         goto TryAgain;
-                    if ( temp == m_nHead.load(memory_model::memory_order_acquire) )    // queue full?
+                    if ( temp == m_nHead.load(memory_model::memory_order_acquire))    // queue full?
                         break;
                     tt = m_buffer[ temp ].load(memory_model::memory_order_relaxed);
                     ate = temp;
                     temp = (temp + 1) & nModulo;
                 }
 
-                if ( te != m_nTail.load(memory_model::memory_order_acquire) )
+                if ( te != m_nTail.load(memory_model::memory_order_acquire))
                     continue;
 
                 // Check whether queue is full
-                if ( temp == m_nHead.load(memory_model::memory_order_acquire) ) {
+                if ( temp == m_nHead.load(memory_model::memory_order_acquire)) {
                     ate = ( temp + 1 ) & nModulo;
                     tt = m_buffer[ ate ].load(memory_model::memory_order_relaxed);
-                    if ( !is_free( tt ) ) {
+                    if ( !is_free( tt )) {
                         return false;   // Queue is full
                     }
 
@@ -295,13 +295,13 @@ namespace cds { namespace intrusive {
                     continue;
                 }
 
-                if ( tt == reinterpret_cast<value_type *>(free1) )
+                if ( tt == reinterpret_cast<value_type *>(free1))
                     pNewNode = reinterpret_cast<value_type *>(reinterpret_cast<intptr_t>( pNewNode ) | 1);
-                if ( te != m_nTail.load(memory_model::memory_order_acquire) )
+                if ( te != m_nTail.load(memory_model::memory_order_acquire))
                     continue;
 
                 // get actual tail and try to enqueue new node
-                if ( m_buffer[ate].compare_exchange_strong( tt, pNewNode, memory_model::memory_order_release, atomics::memory_order_relaxed ) ) {
+                if ( m_buffer[ate].compare_exchange_strong( tt, pNewNode, memory_model::memory_order_release, atomics::memory_order_relaxed )) {
                     if ( temp % 2 == 0 )
                         m_nTail.compare_exchange_strong( te, temp, memory_model::memory_order_release, atomics::memory_order_relaxed );
                     ++m_ItemCounter;
@@ -332,23 +332,23 @@ namespace cds { namespace intrusive {
                 value_type * pNull;
 
                 // find the actual head after this loop
-                while ( is_free( tt ) ) {
-                    if ( th != m_nHead.load(memory_model::memory_order_relaxed) )
+                while ( is_free( tt )) {
+                    if ( th != m_nHead.load(memory_model::memory_order_relaxed))
                         goto TryAgain;
 
                     // two consecutive nullptr means the queue is empty
-                    if ( temp == m_nTail.load(memory_model::memory_order_acquire) )
+                    if ( temp == m_nTail.load(memory_model::memory_order_acquire))
                         return nullptr;
 
                     temp = ( temp + 1 ) & nModulo;
                     tt = m_buffer[ temp ].load(memory_model::memory_order_relaxed);
                 }
 
-                if ( th != m_nHead.load(memory_model::memory_order_relaxed) )
+                if ( th != m_nHead.load(memory_model::memory_order_relaxed))
                     continue;
 
                 // check whether the queue is empty
-                if ( temp == m_nTail.load(memory_model::memory_order_acquire) ) {
+                if ( temp == m_nTail.load(memory_model::memory_order_acquire)) {
                     // help the enqueue to update end
                     m_nTail.compare_exchange_weak( temp, (temp + 1) & nModulo, memory_model::memory_order_release, atomics::memory_order_relaxed );
                     continue;
@@ -356,7 +356,7 @@ namespace cds { namespace intrusive {
 
                 pNull = reinterpret_cast<value_type *>((reinterpret_cast<uintptr_t>(tt) & 1) ? free0 : free1);
 
-                if ( th != m_nHead.load(memory_model::memory_order_relaxed) )
+                if ( th != m_nHead.load(memory_model::memory_order_relaxed))
                     continue;
 
                 // Get the actual head, null means empty
@@ -397,11 +397,11 @@ namespace cds { namespace intrusive {
             const value_type * tt = m_buffer[ temp ].load(memory_model::memory_order_relaxed);
 
             // find the actual head after this loop
-            while ( is_free( tt ) ) {
-                if ( th != m_nHead.load(memory_model::memory_order_relaxed) )
+            while ( is_free( tt )) {
+                if ( th != m_nHead.load(memory_model::memory_order_relaxed))
                     goto TryAgain;
                 // two consecutive nullptr means queue empty
-                if ( temp == m_nTail.load(memory_model::memory_order_relaxed) )
+                if ( temp == m_nTail.load(memory_model::memory_order_relaxed))
                     return true;
                 temp = ( temp + 1 ) & nModulo;
                 tt = m_buffer[ temp ].load(memory_model::memory_order_relaxed);
@@ -432,7 +432,7 @@ namespace cds { namespace intrusive {
         */
         void clear()
         {
-            clear( disposer() );
+            clear( disposer());
         }
 
         /// Returns queue's item count
index 9bc94f6c1bc8b7ae7828962a3e67a3c8648b72e2..3be7a7f73656699e24f85dde8066da24fed18389 100644 (file)
@@ -228,7 +228,7 @@ namespace cds { namespace intrusive {
         */
         void clear()
         {
-            clear( disposer() );
+            clear( disposer());
         }
 
         /// Checks if the queue is empty
index 297957ab4bb6d7d359531ffcbccf1b1e89f08c1e..b7cea674e79f2305445ca995437e3d39d9c9ede8 100644 (file)
@@ -199,7 +199,7 @@ namespace michael {
         ~page_cached_allocator()
         {
             void * pPage;
-            while ( m_FreeList.pop(pPage) )
+            while ( m_FreeList.pop(pPage))
                 base_class::free( pPage );
         }
         //@endcond
@@ -208,7 +208,7 @@ namespace michael {
         void * alloc()
         {
             void * pPage;
-            if ( !m_FreeList.pop( pPage ) )
+            if ( !m_FreeList.pop( pPage ))
                 pPage = base_class::alloc();
             return pPage;
         }
@@ -305,7 +305,7 @@ namespace michael {
         /// Gets details::size_class struct for size-class index \p nIndex
         static const size_class * at( sizeclass_index nIndex )
         {
-            assert( nIndex < size() );
+            assert( nIndex < size());
             return m_szClass + nIndex;
         }
     };
@@ -352,7 +352,7 @@ namespace michael {
         /// Push superblock descriptor to free-list
         void push( T * pDesc )
         {
-            assert( base_class::node_algorithms::inited( static_cast<item_hook *>(pDesc) ) );
+            assert( base_class::node_algorithms::inited( static_cast<item_hook *>(pDesc)) );
             auto_lock al(m_access);
             base_class::push_back( *pDesc );
         }
@@ -361,11 +361,11 @@ namespace michael {
         T *   pop()
         {
             auto_lock al(m_access);
-            if ( base_class::empty() )
+            if ( base_class::empty())
                 return nullptr;
             T& rDesc = base_class::front();
             base_class::pop_front();
-            assert( base_class::node_algorithms::inited( static_cast<item_hook *>(&rDesc) ) );
+            assert( base_class::node_algorithms::inited( static_cast<item_hook *>(&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<item_hook *>(pDesc) ) );
+            assert( base_class::node_algorithms::inited( static_cast<item_hook *>(pDesc)) );
             base_class::push_back( *pDesc );
         }
 
@@ -415,11 +415,11 @@ namespace michael {
         T * pop()
         {
             auto_lock al( m_access );
-            if ( base_class::empty() )
+            if ( base_class::empty())
                 return nullptr;
             T& rDesc = base_class::front();
             base_class::pop_front();
-            assert( base_class::node_algorithms::inited( static_cast<item_hook *>(&rDesc) ) );
+            assert( base_class::node_algorithms::inited( static_cast<item_hook *>(&rDesc)) );
             return &rDesc;
         }
 
@@ -429,8 +429,8 @@ 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<item_hook *>(pDesc) ) ) {
-                base_class::erase( base_class::iterator_to( *pDesc ) );
+            if ( !base_class::node_algorithms::inited( static_cast<item_hook *>(pDesc)) ) {
+                base_class::erase( base_class::iterator_to( *pDesc ));
                 return true;
             }
             return false;
@@ -899,7 +899,7 @@ namespace michael {
 
             size_t getOSAllocSize() const
             {
-                assert( isOSAllocated() );
+                assert( isOSAllocated());
                 return nSize;
             }
 
@@ -925,13 +925,13 @@ namespace michael {
 
             superblock_desc * desc()
             {
-                assert( !isOSAllocated() );
-                return (pDesc.bits() & bitAligned) ? reinterpret_cast<block_header *>( pDesc.ptr() )->desc() : pDesc.ptr();
+                assert( !isOSAllocated());
+                return (pDesc.bits() & bitAligned) ? reinterpret_cast<block_header *>( pDesc.ptr())->desc() : pDesc.ptr();
             }
 
             block_header * begin()
             {
-                return (pDesc.bits() & bitAligned) ? reinterpret_cast<block_header *>( pDesc.ptr() ) : this;
+                return (pDesc.bits() & bitAligned) ? reinterpret_cast<block_header *>( pDesc.ptr()) : this;
             }
 
             bool isAligned() const
@@ -952,8 +952,8 @@ namespace michael {
 
             size_t getOSAllocSize() const
             {
-                assert( isOSAllocated() );
-                return reinterpret_cast<uintptr_t>( pDesc.ptr() ) >> 2;
+                assert( isOSAllocated());
+                return reinterpret_cast<uintptr_t>( pDesc.ptr()) >> 2;
             }
 
         };
@@ -1143,10 +1143,10 @@ namespace michael {
                         pDesc =  partialList.pop();
                         break;
                     }
-                } while ( !pPartial.compare_exchange_weak( pDesc, nullptr, atomics::memory_order_release, atomics::memory_order_relaxed ) );
+                } while ( !pPartial.compare_exchange_weak( pDesc, nullptr, atomics::memory_order_release, atomics::memory_order_relaxed ));
 
-                //assert( pDesc == nullptr || free_desc_list<superblock_desc>::node_algorithms::inited( static_cast<sb_free_list_hook *>(pDesc) ));
-                //assert( pDesc == nullptr || partial_desc_list<superblock_desc>::node_algorithms::inited( static_cast<sb_partial_list_hook *>(pDesc) ) );
+                //assert( pDesc == nullptr || free_desc_list<superblock_desc>::node_algorithms::inited( static_cast<sb_free_list_hook *>(pDesc)));
+                //assert( pDesc == nullptr || partial_desc_list<superblock_desc>::node_algorithms::inited( static_cast<sb_partial_list_hook *>(pDesc)) );
                 return pDesc;
             }
 
@@ -1154,10 +1154,10 @@ namespace michael {
             void add_partial( superblock_desc * pDesc )
             {
                 assert( pPartial != pDesc );
-                //assert( partial_desc_list<superblock_desc>::node_algorithms::inited( static_cast<sb_partial_list_hook *>(pDesc) ) );
+                //assert( partial_desc_list<superblock_desc>::node_algorithms::inited( static_cast<sb_partial_list_hook *>(pDesc)) );
 
                 superblock_desc * pCur = nullptr;
-                if ( !pPartial.compare_exchange_strong(pCur, pDesc, atomics::memory_order_acq_rel, atomics::memory_order_relaxed) )
+                if ( !pPartial.compare_exchange_strong(pCur, pDesc, atomics::memory_order_acq_rel, atomics::memory_order_relaxed))
                     partialList.push( pDesc );
             }
 
@@ -1205,7 +1205,7 @@ namespace michael {
         /// Allocates large block from system memory
         block_header * alloc_from_OS( size_t nSize )
         {
-            block_header * p = reinterpret_cast<block_header *>( m_LargeHeap.alloc( nSize ) );
+            block_header * p = reinterpret_cast<block_header *>( m_LargeHeap.alloc( nSize ));
             m_OSAllocStat.incBytesAllocated( nSize );
             p->setOSAllocated( nSize );
             return p;
@@ -1221,7 +1221,7 @@ namespace michael {
             while ( true ) {
                 ++nCollision;
                 oldActive = pProcHeap->active.load(atomics::memory_order_acquire);
-                if ( !oldActive.ptr() )
+                if ( !oldActive.ptr())
                     return nullptr;
                 unsigned int nCredits = oldActive.credits();
                 active_tag  newActive   ; // default = 0
@@ -1284,8 +1284,8 @@ namespace michael {
             // block_header fields is not needed to setup
             // It was set in alloc_from_new_superblock
             assert( reinterpret_cast<block_header *>( pAddr )->desc() == pDesc );
-            assert( !reinterpret_cast<block_header *>( pAddr )->isOSAllocated() );
-            assert( !reinterpret_cast<block_header *>( pAddr )->isAligned() );
+            assert( !reinterpret_cast<block_header *>( pAddr )->isOSAllocated());
+            assert( !reinterpret_cast<block_header *>( pAddr )->isAligned());
 
             return reinterpret_cast<block_header *>( pAddr );
         }
@@ -1318,7 +1318,7 @@ namespace michael {
                 newAnchor.count -= nMoreCredits + 1;
                 newAnchor.state = (nMoreCredits > 0) ? SBSTATE_ACTIVE : SBSTATE_FULL;
                 newAnchor.tag += 1;
-            } while ( !pDesc->anchor.compare_exchange_strong(oldAnchor, newAnchor, atomics::memory_order_release, atomics::memory_order_relaxed) );
+            } while ( !pDesc->anchor.compare_exchange_strong(oldAnchor, newAnchor, atomics::memory_order_release, atomics::memory_order_relaxed));
 
             if ( nCollision )
                 pProcHeap->stat.incPartialDescCASFailureCount( nCollision );
@@ -1339,7 +1339,7 @@ namespace michael {
                 pAddr = pDesc->pSB + oldAnchor.avail * pDesc->nBlockSize;
                 newAnchor.avail = reinterpret_cast<free_block_header *>( pAddr )->nNextFree;
                 ++newAnchor.tag;
-            } while ( !pDesc->anchor.compare_exchange_strong(oldAnchor, newAnchor, atomics::memory_order_release, atomics::memory_order_relaxed) );
+            } while ( !pDesc->anchor.compare_exchange_strong(oldAnchor, newAnchor, atomics::memory_order_release, atomics::memory_order_relaxed));
 
             if ( nCollision )
                 pProcHeap->stat.incPartialAnchorCASFailureCount( nCollision );
@@ -1354,8 +1354,8 @@ namespace michael {
             // block_header fields is not needed to setup
             // It was set in alloc_from_new_superblock
             assert( reinterpret_cast<block_header *>( pAddr )->desc() == pDesc );
-            assert( !reinterpret_cast<block_header *>( pAddr )->isAligned() );
-            assert( !reinterpret_cast<block_header *>( pAddr )->isOSAllocated() );
+            assert( !reinterpret_cast<block_header *>( pAddr )->isAligned());
+            assert( !reinterpret_cast<block_header *>( pAddr )->isOSAllocated());
 
             return reinterpret_cast<block_header *>( pAddr );
         }
@@ -1401,7 +1401,7 @@ namespace michael {
         /// Find appropriate processor heap based on size-class selected
         processor_heap * find_heap( typename sizeclass_selector::sizeclass_index nSizeClassIndex )
         {
-            assert( nSizeClassIndex < m_SizeClassSelector.size() );
+            assert( nSizeClassIndex < m_SizeClassSelector.size());
 
             unsigned int nProcessorId = m_Topology.current_processor();
             assert( nProcessorId < m_nProcessorCount );
@@ -1413,7 +1413,7 @@ namespace michael {
             while ( !pDesc ) {
 
                 processor_desc * pNewDesc = new_processor_desc( nProcessorId );
-                if ( m_arrProcDesc[nProcessorId].compare_exchange_strong( pDesc, pNewDesc, atomics::memory_order_release, atomics::memory_order_relaxed ) ) {
+                if ( m_arrProcDesc[nProcessorId].compare_exchange_strong( pDesc, pNewDesc, atomics::memory_order_release, atomics::memory_order_relaxed )) {
                     pDesc = pNewDesc;
                     break;
                 }
@@ -1432,7 +1432,7 @@ namespace michael {
             active_tag  newActive;
             newActive.set( pDesc, nCredits - 1 );
 
-            if ( pProcHeap->active.compare_exchange_strong( nullActive, newActive, atomics::memory_order_seq_cst, atomics::memory_order_relaxed ) )
+            if ( pProcHeap->active.compare_exchange_strong( nullActive, newActive, atomics::memory_order_seq_cst, atomics::memory_order_relaxed ))
                 return;
 
             // Someone installed another active superblock.
@@ -1486,7 +1486,7 @@ namespace michael {
             // TSan false positive: a new descriptor will be linked further with release fence
             CDS_TSAN_ANNOTATE_IGNORE_WRITES_BEGIN;
 
-            pDesc = new( m_AlignedHeap.alloc( szTotal, c_nAlignment ) ) processor_desc;
+            pDesc = new( m_AlignedHeap.alloc( szTotal, c_nAlignment )) processor_desc;
 
             pDesc->pageHeaps = reinterpret_cast<page_heap *>( pDesc + 1 );
             for ( size_t i = 0; i < nPageHeapCount; ++i )
@@ -1575,7 +1575,7 @@ namespace michael {
             anchor_tag anchor;
             superblock_desc * pDesc = pProcHeap->pProcDesc->listSBDescFree.pop();
             if ( pDesc == nullptr ) {
-                pDesc = new( m_AlignedHeap.alloc(sizeof(superblock_desc), c_nAlignment ) ) superblock_desc;
+                pDesc = new( m_AlignedHeap.alloc(sizeof(superblock_desc), c_nAlignment )) superblock_desc;
                 assert( (uintptr_t(pDesc) & (c_nAlignment - 1)) == 0 );
 
                 anchor = pDesc->anchor.load( atomics::memory_order_relaxed );
@@ -1631,7 +1631,7 @@ namespace michael {
             if ( nSizeClassIndex == sizeclass_selector::c_nNoSizeClass ) {
                 return alloc_from_OS( nSize );
             }
-            assert( nSizeClassIndex < m_SizeClassSelector.size() );
+            assert( nSizeClassIndex < m_SizeClassSelector.size());
 
             block_header * pBlock;
             processor_heap * pProcHeap;
@@ -1694,7 +1694,7 @@ namespace michael {
             block_header * pBlock = int_alloc( nSize + sizeof(block_header) + bound_checker::trailer_size );
 
             // Bound checking is only for our blocks
-            if ( !pBlock->isOSAllocated() ) {
+            if ( !pBlock->isOSAllocated()) {
                 // the block is allocated from our heap - bound checker is applicable
                 m_BoundChecker.make_trailer(
                     reinterpret_cast<byte *>(pBlock + 1),
@@ -1718,14 +1718,14 @@ namespace michael {
             block_header * pRedirect = (reinterpret_cast<block_header *>( pMemory ) - 1);
             block_header * pBlock = pRedirect->begin();
 
-            if ( pBlock->isOSAllocated() ) {
+            if ( pBlock->isOSAllocated()) {
                 // Block has been allocated from OS
-                m_OSAllocStat.incBytesDeallocated( pBlock->getOSAllocSize() );
+                m_OSAllocStat.incBytesDeallocated( pBlock->getOSAllocSize());
                 m_LargeHeap.free( pBlock );
                 return;
             }
 
-            assert( !pBlock->isAligned() );
+            assert( !pBlock->isAligned());
             superblock_desc * pDesc = pBlock->desc();
 
             m_BoundChecker.check_bounds(
@@ -1760,7 +1760,7 @@ namespace michael {
                 }
                 else
                     newAnchor.count += 1;
-            } while ( !pDesc->anchor.compare_exchange_strong( oldAnchor, newAnchor, atomics::memory_order_release, atomics::memory_order_relaxed ) );
+            } while ( !pDesc->anchor.compare_exchange_strong( oldAnchor, newAnchor, atomics::memory_order_release, atomics::memory_order_relaxed ));
 
             pProcHeap->stat.incFreeCount();
 
@@ -1802,12 +1802,12 @@ namespace michael {
             block_header * pBlock = reinterpret_cast<block_header *>( pMemory ) - 1;
 
             // Reallocation of aligned block is not possible
-            if ( pBlock->isAligned() ) {
+            if ( pBlock->isAligned()) {
                 assert( false );
                 return nullptr;
             }
 
-            if ( pBlock->isOSAllocated() ) {
+            if ( pBlock->isOSAllocated()) {
                 // The block has been allocated from OS
                 size_t nCurSize = pBlock->getOSAllocSize();
 
@@ -1817,7 +1817,7 @@ namespace michael {
                 // Grow block size
                 void * pNewBuf = alloc( nOrigSize );
                 if ( pNewBuf ) {
-                    memcpy( pNewBuf, pMemory, nCurSize - sizeof(block_header) );
+                    memcpy( pNewBuf, pMemory, nCurSize - sizeof(block_header));
                     free( pMemory );
                 }
                 return pNewBuf;
@@ -1837,7 +1837,7 @@ namespace michael {
 
             void * pNew = alloc( nNewSize );
             if ( pNew ) {
-                memcpy( pNew, pMemory, pDesc->nBlockSize - sizeof(block_header) );
+                memcpy( pNew, pMemory, pDesc->nBlockSize - sizeof(block_header));
                 free( pMemory );
                 return pNew;
             }
@@ -1872,7 +1872,7 @@ namespace michael {
 
 
             // Bound checking is only for our blocks
-            if ( !pBlock->isOSAllocated() ) {
+            if ( !pBlock->isOSAllocated()) {
                 // the block is allocated from our heap - bound checker is applicable
                 m_BoundChecker.make_trailer(
                     reinterpret_cast<byte *>(pRedirect + 1),
index 80da4485d3e4fc51998a5865025fa1d913bc4d31..e10365f4e97c5597d1092235d3e923092edbce84 100644 (file)
@@ -56,7 +56,7 @@ namespace cds { namespace memory { namespace michael {
                 assert( reinterpret_cast<char *>(pEndBlock) - (pArea + nAllocSize) >= trailer_size );
 
                 trailer_type trailer = s_BoundCheckerTrailer;
-                memcpy( pArea + nAllocSize, &trailer, sizeof(trailer) );
+                memcpy( pArea + nAllocSize, &trailer, sizeof(trailer));
 
                 // the next assignment is correct because pBlock is at least sizeof(size_t)-byte aligned
                 assert( (reinterpret_cast<uintptr_t>(pEndBlock) & (sizeof(size_t) - 1)) == 0 );
@@ -70,7 +70,7 @@ namespace cds { namespace memory { namespace michael {
 
                 assert( nAllocSize < nBlockSize );
                 return nAllocSize < nBlockSize
-                    && memcmp( reinterpret_cast<char *>(pStartArea) + nAllocSize, &trailer, sizeof(trailer) ) == 0;
+                    && memcmp( reinterpret_cast<char *>(pStartArea) + nAllocSize, &trailer, sizeof(trailer)) == 0;
             }
         };
     }
@@ -91,7 +91,7 @@ namespace cds { namespace memory { namespace michael {
         void check_bounds( void * pStartArea, void * pEndBlock, size_t nBlockSize )
         {
             // Bound checking assertion
-            assert( base_class::check_bounds( pStartArea, pEndBlock, nBlockSize ) );
+            assert( base_class::check_bounds( pStartArea, pEndBlock, nBlockSize ));
         }
 
     //@endcond
@@ -126,7 +126,7 @@ namespace cds { namespace memory { namespace michael {
     public:
         void check_bounds( void * pStartArea, void * pEndBlock, size_t nBlockSize )
         {
-            if ( !base_class::check_bounds( pStartArea, pEndBlock, nBlockSize ) ) {
+            if ( !base_class::check_bounds( pStartArea, pEndBlock, nBlockSize )) {
                 throw bound_checker_exception();
             }
         }
index 9821a89236bbe9e4023414dd2cf39ccbb51d19b7..65c2e78fc83387391b39af4a11974eafed4c6f9e 100644 (file)
@@ -135,7 +135,7 @@ namespace cds { namespace memory {
         //@cond
         void preallocate_pool()
         {
-            m_pFirst = std_allocator().allocate( m_Queue.capacity() );
+            m_pFirst = std_allocator().allocate( m_Queue.capacity());
             m_pLast = m_pFirst + m_Queue.capacity();
 
             for ( value_type * p = m_pFirst; p < m_pLast; ++p ) {
@@ -184,7 +184,7 @@ namespace cds { namespace memory {
 
             value_type * p = m_Queue.pop();
             if ( p ) {
-                assert( from_pool(p) );
+                assert( from_pool(p));
                 return new( p ) value_type;
             }
             // The pool is empty - allocate new from the heap
@@ -205,7 +205,7 @@ namespace cds { namespace memory {
             CDS_UNUSED(n);
 
             if ( p ) {
-                if ( from_pool(p) ) {
+                if ( from_pool(p)) {
                     p->~value_type();
                     // The queue can notify about false fullness state
                     // so we push in loop
@@ -309,7 +309,7 @@ namespace cds { namespace memory {
         ~lazy_vyukov_queue_pool()
         {
             std_allocator a;
-            while ( !m_Queue.empty() )
+            while ( !m_Queue.empty())
                 a.deallocate( m_Queue.pop(), 1 );
         }
 
@@ -502,7 +502,7 @@ namespace cds { namespace memory {
 
             if ( !p ) {
                 back_off bkoff;
-                while ( m_Queue.size() ) {
+                while ( m_Queue.size()) {
                     p = m_Queue.pop();
                     if ( p )
                         goto ok;
@@ -514,7 +514,7 @@ namespace cds { namespace memory {
             }
 
         ok:
-            assert( from_pool(p) );
+            assert( from_pool(p));
             return p;
         }
 
@@ -535,7 +535,7 @@ namespace cds { namespace memory {
                 back_off bkoff;
                 // The queue can notify it is full but that is false fullness state
                 // So, we push in loop
-                while ( !m_Queue.push(*p) )
+                while ( !m_Queue.push(*p))
                     bkoff();
             }
         }
index 36e86195e91a8e8cda2b90855a61aee5ff385415..db89d15c2da7b88b3e1c42c361c5b4e2be1b532f 100644 (file)
@@ -139,14 +139,14 @@ namespace cds { namespace opt {
             /// Get item \p i
             value_type& operator []( size_t i )
             {
-                assert( i < capacity() );
+                assert( i < capacity());
                 return m_buffer[i].v;
             }
 
             /// Get item \p i, const version
             const value_type& operator []( size_t i ) const
             {
-                assert( i < capacity() );
+                assert( i < capacity());
                 return m_buffer[i].v;
             }
 
@@ -159,7 +159,7 @@ namespace cds { namespace opt {
             /// Zeroize the buffer
             void zeroize()
             {
-                memset( m_buffer, 0, capacity() * sizeof(m_buffer[0]) );
+                memset( m_buffer, 0, capacity() * sizeof(m_buffer[0]));
             }
 
             /// Returns pointer to buffer array
@@ -231,14 +231,14 @@ namespace cds { namespace opt {
             /// Get item \p i
             value_type& operator []( size_t i )
             {
-                assert( i < capacity() );
+                assert( i < capacity());
                 return m_buffer[i];
             }
 
             /// Get item \p i, const version
             const value_type& operator []( size_t i ) const
             {
-                assert( i < capacity() );
+                assert( i < capacity());
                 return m_buffer[i];
             }
 
@@ -251,7 +251,7 @@ namespace cds { namespace opt {
             /// Zeroize the buffer
             void zeroize()
             {
-                memset( m_buffer, 0, capacity() * sizeof(m_buffer[0]) );
+                memset( m_buffer, 0, capacity() * sizeof(m_buffer[0]));
             }
 
             /// Returns pointer to buffer array
@@ -333,14 +333,14 @@ namespace cds { namespace opt {
             /// Get item \p i
             value_type& operator []( size_t i )
             {
-                assert( i < capacity() );
+                assert( i < capacity());
                 return m_buffer[i];
             }
 
             /// Get item \p i, const version
             const value_type& operator []( size_t i ) const
             {
-                assert( i < capacity() );
+                assert( i < capacity());
                 return m_buffer[i];
             }
 
@@ -353,7 +353,7 @@ namespace cds { namespace opt {
             /// Zeroize the buffer
             void zeroize()
             {
-                memset( m_buffer, 0, capacity() * sizeof(m_buffer[0]) );
+                memset( m_buffer, 0, capacity() * sizeof(m_buffer[0]));
             }
 
             /// Returns pointer to buffer array
@@ -437,14 +437,14 @@ namespace cds { namespace opt {
             /// Get item \p i
             value_type& operator []( size_t i )
             {
-                assert( i < capacity() );
+                assert( i < capacity());
                 return m_buffer[i];
             }
 
             /// Get item \p i, const version
             const value_type& operator []( size_t i ) const
             {
-                assert( i < capacity() );
+                assert( i < capacity());
                 return m_buffer[i];
             }
 
@@ -457,7 +457,7 @@ namespace cds { namespace opt {
             /// Zeroize the buffer
             void zeroize()
             {
-                memset( m_buffer, 0, capacity() * sizeof(m_buffer[0]) );
+                memset( m_buffer, 0, capacity() * sizeof(m_buffer[0]));
             }
 
             /// Returns pointer to buffer array
index 70f951dcd120a7bd342b192025b32565ee60400f..921be9bb9076ebfd9e993848b179d914f6ab7805 100644 (file)
@@ -93,7 +93,7 @@ namespace cds { namespace opt {
             /// Operator that compares two value of type \p T
             int operator()(T const& v1, T const& v2)
             {
-                if ( std::less<T>()( v1, v2 ) )
+                if ( std::less<T>()( v1, v2 ))
                     return -1;
                 if ( std::less<T>()( v2, v1 ))
                     return 1;
@@ -186,9 +186,9 @@ namespace cds { namespace opt {
             int operator ()( T const& t, Q const& q ) const
             {
                 less_functor f;
-                if ( f( t, q ) )
+                if ( f( t, q ))
                     return -1;
-                if ( f( q, t ) )
+                if ( f( q, t ))
                     return 1;
                 return 0;
             }
index ec0e5aa76c0cbac4233edb9c02a6ea3e378440f9..bbe0027e01fd88a02f588fe0edb5fdc6c72dfef3 100644 (file)
@@ -107,7 +107,7 @@ namespace cds { namespace opt {
                 : hash_tuple( t )
             {}
             hash_list( hash_tuple_type&& t)
-                : hash_tuple( std::forward<hash_tuple_type>(t) )
+                : hash_tuple( std::forward<hash_tuple_type>(t))
             {}
 
             template <size_t I, typename T>
@@ -172,7 +172,7 @@ namespace cds { namespace opt {
                 : m_wrappedList( t )
             {}
             hash_list_wrapper( hash_tuple_type&& t)
-                : m_wrappedList( std::forward<hash_tuple_type>(t) )
+                : m_wrappedList( std::forward<hash_tuple_type>(t))
             {}
 
             void operator()( size_t * dest, wrapped_type const& what ) const
index b1da69d8619c7bd7062a6c555eb124e06bb183c3..a45a58b6555516bbeb36fdb84a51b13604f4d670 100644 (file)
@@ -71,14 +71,14 @@ namespace cds { namespace opt {
         do {
             int i = gen;
             //...
-        } while ( gen.next() );
+        } while ( gen.next());
 
         // Get other permutation
         gen.reset();
         do {
             int i = gen;
             //...
-        } while ( gen.next() );
+        } while ( gen.next());
         \endcode
 
         The following \p Generator defined:
@@ -126,7 +126,7 @@ namespace cds { namespace opt {
             random_permutation( size_t nLength )
                 : m_nCur(0)
                 , m_nStart(0)
-                , m_nMod( integer_type(nLength) )
+                , m_nMod( integer_type(nLength))
             {
                 reset();
             }
@@ -146,7 +146,7 @@ namespace cds { namespace opt {
             /// Resets the generator to produce new sequence
             void reset()
             {
-                m_nCur = m_nStart = integer_type( std::rand() ) % m_nMod;
+                m_nCur = m_nStart = integer_type( std::rand()) % m_nMod;
             }
         };
 
@@ -204,7 +204,7 @@ namespace cds { namespace opt {
             /// Resets the generator to produce new sequence
             void reset()
             {
-                m_nCur = m_nStart = integer_type( std::rand() ) & m_nMask;
+                m_nCur = m_nStart = integer_type( std::rand()) & m_nMask;
             }
         };
 
index 67f689db8131f777f027f5490b67d5f6bd42ad14..9754424594891ffbe6fc8d1a45d6b7d032e0967e 100644 (file)
@@ -58,7 +58,7 @@ namespace cds { namespace OS {
             typedef timebasestruct_t    native_timer_type;
             typedef long long            native_duration_type;
 
-            Timer() : m_tmStart( current() ) {}
+            Timer() : m_tmStart( current()) {}
 
             static native_timer_type    current()
             {
@@ -68,7 +68,7 @@ namespace cds { namespace OS {
             }
             static void current( native_timer_type& tmr )
             {
-                read_real_time( &tmr, sizeof(tmr) );
+                read_real_time( &tmr, sizeof(tmr));
                 time_base_to_time( &tmr, sizeof(tmr ));
             }
 
@@ -88,12 +88,12 @@ namespace cds { namespace OS {
 
             double duration()
             {
-                return duration( native_duration() );
+                return duration( native_duration());
             }
 
             native_duration_type    native_duration()
             {
-                return native_duration( m_tmStart, current() );
+                return native_duration( m_tmStart, current());
             }
 
             static native_duration_type    native_duration( native_timer_type const & nStart, native_timer_type const & nEnd )
@@ -104,7 +104,7 @@ namespace cds { namespace OS {
             static unsigned long long random_seed()
             {
                 native_timer_type tmr;
-                read_real_time( &tmr, sizeof(tmr) );
+                read_real_time( &tmr, sizeof(tmr));
                 return ( ((unsigned long long)(tmr.tb_hight)) << 32 ) + tmr.tb_low;
             }
         };
index 4ac481e007dd219f5b6e90a61d8211d1c30d4e93..65625d839619017e73b67ec4b34aa7abaa620283 100644 (file)
@@ -174,8 +174,8 @@ namespace cds {
             */
             pointer allocate( size_type nAlign, size_type nCount )
             {
-                assert( cds::beans::is_power2( nAlign ) );
-                pointer p = reinterpret_cast<T *>( cds::OS::aligned_malloc( sizeof(T) * nCount, nAlign ) );
+                assert( cds::beans::is_power2( nAlign ));
+                pointer p = reinterpret_cast<T *>( cds::OS::aligned_malloc( sizeof(T) * nCount, nAlign ));
                 if ( !p )
                     throw std::bad_alloc();
                 assert( cds::details::is_aligned( p, nAlign ));
@@ -191,7 +191,7 @@ namespace cds {
             */
             pointer allocate(size_type nAlign, size_type nCount, const void *)
             {
-                return ( allocate( nAlign, nCount ) );
+                return ( allocate( nAlign, nCount ));
             }
 
             /// construct object at \p ptr with value \p val
index 3bbdac21829cfb72b2ae2dbf987536025c7acf4c..67be0c9fb714e3d951410a9d7fc9ae34817508b8 100644 (file)
@@ -89,7 +89,7 @@ namespace cds { namespace OS {
 
             double duration()
             {
-                return duration( native_duration() );
+                return duration( native_duration());
             }
 
             native_duration_type    native_duration()
index a62d0a20772e3d9332ed5b40d45e27f1e0dfc7bf..795f96edaac58fd15203cc3b70d6b107f1308568 100644 (file)
@@ -84,7 +84,7 @@ namespace cds { namespace OS {
 
             double duration()
             {
-                return duration( native_duration() );
+                return duration( native_duration());
             }
 
             native_duration_type    native_duration()
index 634913edf9361517448bbe2cf466386e27988bac..f5cb353e184b901bd32ab59a8adee4d87da63102 100644 (file)
@@ -96,7 +96,7 @@ namespace cds { namespace OS {
 
             double duration()
             {
-                return duration( native_duration() );
+                return duration( native_duration());
             }
 
             native_duration_type    native_duration()
index 4a511fd569e439ca4a2557297ca6eae9bb23a5c3..ad8a90501279864dbb9a40eaa6e33c132f412501 100644 (file)
@@ -83,7 +83,7 @@ namespace cds { namespace OS {
 
             double duration()
             {
-                return duration( native_duration() );
+                return duration( native_duration());
             }
 
             native_duration_type    native_duration()
index aebf04cb47aeb075dba2e4fd1537f9a7b25922f1..970a699aa8483079d9d7633d6361a3cad07f4e52 100644 (file)
@@ -48,7 +48,7 @@ namespace cds { namespace OS {
             typedef hrtime_t    native_timer_type;
             typedef long long    native_duration_type;
 
-            Timer() : m_tmStart( current() ) {}
+            Timer() : m_tmStart( current()) {}
 
             static native_timer_type    current()            { return gethrtime();    }
             static void current( native_timer_type& tmr )    { tmr = gethrtime();    }
@@ -68,12 +68,12 @@ namespace cds { namespace OS {
 
             double duration()
             {
-                return duration( native_duration() );
+                return duration( native_duration());
             }
 
             native_duration_type    native_duration()
             {
-                return native_duration( m_tmStart, current() );
+                return native_duration( m_tmStart, current());
             }
 
             static native_duration_type    native_duration( native_timer_type nStart, native_timer_type nEnd )
index 85839b18f2d471fad0743aa151344f9a2a5a1a01..ea6e24af3b65ba7a39e6676ee81f46dd05e1c9ae 100644 (file)
@@ -98,7 +98,7 @@ namespace cds { namespace OS {
             /// Returns duration (in seconds) from start time to current
             double duration()
             {
-                return duration( native_duration() );
+                return duration( native_duration());
             }
 
             /// Returns duration (in native format) from start time to current
index aba10a7fb98fa2af5ba322d84686ed532addd531..4c0f07dbac9152781e0b55a812a0c4d24a5f046f 100644 (file)
@@ -232,15 +232,15 @@ namespace cds { namespace sync {
         /// Locks a lock at cell \p hint
         /**
             To define real array's cell which should be locked, \ref select_cell_policy is used.
-            The target cell is a result of <tt>select_cell_policy( hint, size() )</tt>.
+            The target cell is a result of <tt>select_cell_policy( hint, size())</tt>.
 
             Returns the index of locked lock.
         */
         template <typename Q>
         size_t lock( Q const& hint )
         {
-            size_t nCell = m_SelectCellPolicy( hint, size() );
-            assert( nCell < size() );
+            size_t nCell = m_SelectCellPolicy( hint, size());
+            assert( nCell < size());
             m_arrLocks[nCell].lock();
             return nCell;
         }
@@ -248,16 +248,16 @@ namespace cds { namespace sync {
         /// Try lock a lock at cell \p hint
         /**
             To define real array's cell which should be locked, \ref select_cell_policy is used.
-            The target cell is a result of <tt>select_cell_policy( hint, size() )</tt>.
+            The target cell is a result of <tt>select_cell_policy( hint, size())</tt>.
 
             Returns the index of locked lock if success, \ref c_nUnspecifiedCell constant otherwise.
         */
         template <typename Q>
         size_t try_lock( Q const& hint )
         {
-            size_t nCell = m_SelectCellPolicy( hint, size() );
-            assert( nCell < size() );
-            if ( m_arrLocks[nCell].try_lock() )
+            size_t nCell = m_SelectCellPolicy( hint, size());
+            assert( nCell < size());
+            if ( m_arrLocks[nCell].try_lock())
                 return nCell;
             return c_nUnspecifiedCell;
         }
@@ -265,7 +265,7 @@ namespace cds { namespace sync {
         /// Unlock the lock specified by index \p nCell
         void unlock( size_t nCell )
         {
-            assert( nCell < size() );
+            assert( nCell < size());
             m_arrLocks[nCell].unlock();
         }
 
@@ -291,7 +291,7 @@ namespace cds { namespace sync {
         */
         lock_type& at( size_t nCell ) const
         {
-            assert( nCell < size() );
+            assert( nCell < size());
             return m_arrLocks[ nCell ];
         }
 
@@ -325,7 +325,7 @@ namespace std {
         template <typename Q>
         unique_lock( lock_array_type& arrLocks, Q const& hint )
             : m_arrLocks( arrLocks )
-            , m_nLockGuarded( arrLocks.lock( hint ) )
+            , m_nLockGuarded( arrLocks.lock( hint ))
         {}
 
         /// Locks all from \p arrLocks array
index 4bb160fe04561202baecbc5b6fb0e36bdb2e40ef..c9447cbe7024edc005f813ef5de6fcdc4500a8e9 100644 (file)
@@ -84,7 +84,7 @@ namespace cds { namespace sync {
             {
                 ++m_nLockAllocation;
                 int nDiff = static_cast<int>( m_nLockAllocation.get() - m_nLockDeallocation.get());
-                if ( nDiff > 0 && m_nMaxAllocated.get() < static_cast<typename event_counter::value_type>( nDiff ) )
+                if ( nDiff > 0 && m_nMaxAllocated.get() < static_cast<typename event_counter::value_type>( nDiff ))
                     m_nMaxAllocated = static_cast<typename event_counter::value_type>( nDiff );
             }
             void onLockDeallocation()   { ++m_nLockDeallocation;}
@@ -195,7 +195,7 @@ namespace cds { namespace sync {
             // try lock spin and increment reference counter
             refspin_type cur = p.m_SyncMonitorInjection.m_RefSpin.load( atomics::memory_order_relaxed ) & ~c_nSpinBit;
             if ( !p.m_SyncMonitorInjection.m_RefSpin.compare_exchange_weak( cur, cur + c_nRefIncrement + c_nSpinBit,
-                atomics::memory_order_acquire, atomics::memory_order_relaxed ) )
+                atomics::memory_order_acquire, atomics::memory_order_relaxed ))
             {
                 back_off bkoff;
                 do {
@@ -237,7 +237,7 @@ namespace cds { namespace sync {
             // try lock spin
             refspin_type cur = p.m_SyncMonitorInjection.m_RefSpin.load( atomics::memory_order_relaxed ) & ~c_nSpinBit;
             if ( !p.m_SyncMonitorInjection.m_RefSpin.compare_exchange_weak( cur, cur | c_nSpinBit,
-                atomics::memory_order_acquire, atomics::memory_order_relaxed ) )
+                atomics::memory_order_acquire, atomics::memory_order_relaxed ))
             {
                 back_off bkoff;
                 do {
index dec8232191ffc0914925cfaf372025b2f360320f..1708bba0c4abc8f2a37b5209877cdc943d8495cb 100644 (file)
@@ -111,7 +111,7 @@ namespace cds {
             /// Destructor. On debug time it checks whether spin-lock is free
             ~spin_lock()
             {
-                assert( !m_spin.load( atomics::memory_order_relaxed ) );
+                assert( !m_spin.load( atomics::memory_order_relaxed ));
             }
 
             /// Check if the spin is locked
@@ -145,11 +145,11 @@ 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-- ) {
-                    if ( try_lock() )
+                    if ( try_lock())
                         return true;
                     backoff();
                 }
@@ -157,28 +157,28 @@ namespace cds {
             }
 
             /// Lock the spin-lock. Waits infinitely while spin-lock is locked. Debug version: deadlock may be detected
-            void lock() CDS_NOEXCEPT_(noexcept( backoff_strategy()() ))
+            void lock() CDS_NOEXCEPT_(noexcept( backoff_strategy()()))
             {
                 backoff_strategy backoff;
 
                 // Deadlock detected
-                assert( m_dbgOwnerId != OS::get_current_thread_id() );
+                assert( m_dbgOwnerId != OS::get_current_thread_id());
 
                 // TATAS algorithm
-                while ( !try_lock() ) {
-                    while ( m_spin.load( atomics::memory_order_relaxed ) ) {
+                while ( !try_lock()) {
+                    while ( m_spin.load( atomics::memory_order_relaxed )) {
                         backoff();
                     }
                 }
-                assert( m_dbgOwnerId == OS::get_current_thread_id() );
+                assert( m_dbgOwnerId == OS::get_current_thread_id());
             }
 
             /// Unlock the spin-lock. Debug version: deadlock may be detected
             void unlock() CDS_NOEXCEPT
             {
-                assert( m_spin.load( atomics::memory_order_relaxed ) );
+                assert( m_spin.load( atomics::memory_order_relaxed ));
 
-                assert( m_dbgOwnerId == OS::get_current_thread_id() );
+                assert( m_dbgOwnerId == OS::get_current_thread_id());
                 CDS_DEBUG_ONLY( m_dbgOwnerId = OS::c_NullThreadId; )
 
                 m_spin.store( false, atomics::memory_order_release );
@@ -241,24 +241,24 @@ namespace cds {
                 return m_spin.compare_exchange_weak( nCurrent, 1, atomics::memory_order_acquire, atomics::memory_order_relaxed );
             }
 
-            bool try_acquire( unsigned int nTryCount ) CDS_NOEXCEPT_( noexcept( backoff_strategy()() ))
+            bool try_acquire( unsigned int nTryCount ) CDS_NOEXCEPT_( noexcept( backoff_strategy()()))
             {
                 backoff_strategy bkoff;
 
                 while ( nTryCount-- ) {
-                    if ( try_acquire() )
+                    if ( try_acquire())
                         return true;
                     bkoff();
                 }
                 return false;
             }
 
-            void acquire() CDS_NOEXCEPT_( noexcept( backoff_strategy()() ))
+            void acquire() CDS_NOEXCEPT_( noexcept( backoff_strategy()()))
             {
                 // TATAS algorithm
                 backoff_strategy bkoff;
-                while ( !try_acquire() ) {
-                    while ( m_spin.load( atomics::memory_order_relaxed ) )
+                while ( !try_acquire()) {
+                    while ( m_spin.load( atomics::memory_order_relaxed ))
                         bkoff();
                 }
             }
@@ -298,14 +298,14 @@ namespace cds {
             */
             bool is_locked() const CDS_NOEXCEPT
             {
-                return !( m_spin.load( atomics::memory_order_relaxed ) == 0 || is_taken( cds::OS::get_current_thread_id() ));
+                return !( m_spin.load( atomics::memory_order_relaxed ) == 0 || is_taken( cds::OS::get_current_thread_id()));
             }
 
             /// Try to lock the spin-lock (synonym for \p try_lock())
             bool try_lock() CDS_NOEXCEPT
             {
                 thread_id tid = OS::get_current_thread_id();
-                if ( try_taken_lock( tid ) )
+                if ( try_taken_lock( tid ))
                     return true;
                 if ( try_acquire()) {
                     take( tid );
@@ -318,7 +318,7 @@ namespace cds {
             bool try_lock( unsigned int nTryCount ) CDS_NOEXCEPT_( noexcept( std::declval<reentrant_spin_lock>().try_acquire( nTryCount )))
             {
                 thread_id tid = OS::get_current_thread_id();
-                if ( try_taken_lock( tid ) )
+                if ( try_taken_lock( tid ))
                     return true;
                 if ( try_acquire( nTryCount )) {
                     take( tid );
@@ -331,7 +331,7 @@ namespace cds {
             void lock() CDS_NOEXCEPT_( noexcept( std::declval<reentrant_spin_lock>().acquire()))
             {
                 thread_id tid = OS::get_current_thread_id();
-                if ( !try_taken_lock( tid ) ) {
+                if ( !try_taken_lock( tid )) {
                     acquire();
                     take( tid );
                 }
@@ -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;
index a1e980201b6ac0f2ad15d3b2c18f5fca10073d1d..dcc1faf0ae7ade4ddd01d064a08e2124a33da050 100644 (file)
@@ -82,10 +82,10 @@ namespace cds {
         \code
         class Manager {
         public:
-            // Initialize manager (called by cds::Initialize() )
+            // Initialize manager (called by cds::Initialize())
             static void init();
 
-            // Terminate manager (called by cds::Terminate() )
+            // Terminate manager (called by cds::Terminate())
             static void fini();
 
             // Checks whether current thread is attached to \p libcds feature or not.
@@ -179,12 +179,12 @@ namespace cds {
                 , m_nFakeProcessorNumber( s_nLastUsedProcNo.fetch_add(1, atomics::memory_order_relaxed) % s_nProcCount )
                 , m_nAttachCount(0)
             {
-                if (cds::gc::HP::isUsed() )
+                if (cds::gc::HP::isUsed())
                     m_hpManager = new (m_hpManagerPlaceholder) cds::gc::HP::thread_gc_impl;
                 else
                     m_hpManager = nullptr;
 
-                if ( cds::gc::DHP::isUsed() )
+                if ( cds::gc::DHP::isUsed())
                     m_dhpManager = new (m_dhpManagerPlaceholder) cds::gc::DHP::thread_gc_impl;
                 else
                     m_dhpManager = nullptr;
@@ -216,21 +216,21 @@ namespace cds {
             void init()
             {
                 if ( m_nAttachCount++ == 0 ) {
-                    if ( cds::gc::HP::isUsed() )
+                    if ( cds::gc::HP::isUsed())
                         m_hpManager->init();
-                    if ( cds::gc::DHP::isUsed() )
+                    if ( cds::gc::DHP::isUsed())
                         m_dhpManager->init();
 
-                    if ( cds::urcu::details::singleton<cds::urcu::general_instant_tag>::isUsed() )
+                    if ( cds::urcu::details::singleton<cds::urcu::general_instant_tag>::isUsed())
                         m_pGPIRCU = cds::urcu::details::singleton<cds::urcu::general_instant_tag>::attach_thread();
-                    if ( cds::urcu::details::singleton<cds::urcu::general_buffered_tag>::isUsed() )
+                    if ( cds::urcu::details::singleton<cds::urcu::general_buffered_tag>::isUsed())
                         m_pGPBRCU = cds::urcu::details::singleton<cds::urcu::general_buffered_tag>::attach_thread();
-                    if ( cds::urcu::details::singleton<cds::urcu::general_threaded_tag>::isUsed() )
+                    if ( cds::urcu::details::singleton<cds::urcu::general_threaded_tag>::isUsed())
                         m_pGPTRCU = cds::urcu::details::singleton<cds::urcu::general_threaded_tag>::attach_thread();
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-                    if ( cds::urcu::details::singleton<cds::urcu::signal_buffered_tag>::isUsed() )
+                    if ( cds::urcu::details::singleton<cds::urcu::signal_buffered_tag>::isUsed())
                         m_pSHBRCU = cds::urcu::details::singleton<cds::urcu::signal_buffered_tag>::attach_thread();
-                    if ( cds::urcu::details::singleton<cds::urcu::signal_threaded_tag>::isUsed() )
+                    if ( cds::urcu::details::singleton<cds::urcu::signal_threaded_tag>::isUsed())
                         m_pSHTRCU = cds::urcu::details::singleton<cds::urcu::signal_threaded_tag>::attach_thread();
 #endif
                 }
@@ -239,29 +239,29 @@ namespace cds {
             bool fini()
             {
                 if ( --m_nAttachCount == 0 ) {
-                    if ( cds::gc::DHP::isUsed() )
+                    if ( cds::gc::DHP::isUsed())
                         m_dhpManager->fini();
-                    if ( cds::gc::HP::isUsed() )
+                    if ( cds::gc::HP::isUsed())
                         m_hpManager->fini();
 
-                    if ( cds::urcu::details::singleton<cds::urcu::general_instant_tag>::isUsed() ) {
+                    if ( cds::urcu::details::singleton<cds::urcu::general_instant_tag>::isUsed()) {
                         cds::urcu::details::singleton<cds::urcu::general_instant_tag>::detach_thread( m_pGPIRCU );
                         m_pGPIRCU = nullptr;
                     }
-                    if ( cds::urcu::details::singleton<cds::urcu::general_buffered_tag>::isUsed() ) {
+                    if ( cds::urcu::details::singleton<cds::urcu::general_buffered_tag>::isUsed()) {
                         cds::urcu::details::singleton<cds::urcu::general_buffered_tag>::detach_thread( m_pGPBRCU );
                         m_pGPBRCU = nullptr;
                     }
-                    if ( cds::urcu::details::singleton<cds::urcu::general_threaded_tag>::isUsed() ) {
+                    if ( cds::urcu::details::singleton<cds::urcu::general_threaded_tag>::isUsed()) {
                         cds::urcu::details::singleton<cds::urcu::general_threaded_tag>::detach_thread( m_pGPTRCU );
                         m_pGPTRCU = nullptr;
                     }
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-                    if ( cds::urcu::details::singleton<cds::urcu::signal_buffered_tag>::isUsed() ) {
+                    if ( cds::urcu::details::singleton<cds::urcu::signal_buffered_tag>::isUsed()) {
                         cds::urcu::details::singleton<cds::urcu::signal_buffered_tag>::detach_thread( m_pSHBRCU );
                         m_pSHBRCU = nullptr;
                     }
-                    if ( cds::urcu::details::singleton<cds::urcu::signal_threaded_tag>::isUsed() ) {
+                    if ( cds::urcu::details::singleton<cds::urcu::signal_threaded_tag>::isUsed()) {
                         cds::urcu::details::singleton<cds::urcu::signal_threaded_tag>::detach_thread( m_pSHTRCU );
                         m_pSHTRCU = nullptr;
                     }
index b758e3a3ab6c408175679603a56a6309f872d97d..9bac49412429bbc878b1df3b91789f91b8de68e9 100644 (file)
@@ -109,9 +109,9 @@ namespace cds { namespace threading {
             /// This method must be called in end of thread execution
             static void detachThread()
             {
-                assert( _threadData() );
+                assert( _threadData());
 
-                if ( _threadData()->fini() )
+                if ( _threadData()->fini())
                     destroy_thread_data();
             }
 
index b69f0ed6f13a9c3e7aa5b2b4abf1e0f5017df9b3..e86ec737569438b5473c0c7a05af162fe3917a41 100644 (file)
@@ -109,9 +109,9 @@ namespace cds { namespace threading {
             /// This method must be called in end of thread execution
             static void detachThread()
             {
-                assert( _threadData() );
+                assert( _threadData());
 
-                if ( _threadData()->fini() )
+                if ( _threadData()->fini())
                     destroy_thread_data();
             }
 
index 191158a99946ad4b2401aff25c5a35fc7d84a20f..966dba22c92e1ceb85476c8fbe85555e44063355 100644 (file)
@@ -109,9 +109,9 @@ namespace cds { namespace threading {
             /// This method must be called in end of thread execution
             static void detachThread()
             {
-                assert( _threadData() );
+                assert( _threadData());
 
-                if ( _threadData()->fini() )
+                if ( _threadData()->fini())
                     destroy_thread_data();
             }
 
index 16090f97093525c6851517ed4d8857a3c401b47c..dce4aadb2d5c307b678a5e9b1eda7d4820ea4d14 100644 (file)
@@ -90,7 +90,7 @@ namespace cds { namespace threading {
 
                 static ThreadData *    get()
                 {
-                    return reinterpret_cast<ThreadData *>( pthread_getspecific( m_key ) );
+                    return reinterpret_cast<ThreadData *>( pthread_getspecific( m_key ));
                 }
 
                 static void alloc()
@@ -204,7 +204,7 @@ namespace cds { namespace threading {
                 assert( pData );
 
                 if ( pData ) {
-                    if ( pData->fini() )
+                    if ( pData->fini())
                         _threadData( do_detachThread );
                 }
                 else
index 2796ea767f3b294b875c389b8d7cf297d82c743f..04a0cabf21ea836dba2f0f5cabc3c51e068e8d12 100644 (file)
@@ -203,7 +203,7 @@ namespace cds { namespace threading {
                 assert( pData );
 
                 if ( pData ) {
-                    if ( pData->fini() )
+                    if ( pData->fini())
                         _threadData( do_detachThread );
                 }
                 else
index 5778799397d8937889ba01260a0768184b160f99..234526810cbec282f21899188898498131e9fea6 100644 (file)
@@ -362,7 +362,7 @@ namespace cds {
                     // First, try to reuse a retired (non-active) HP record
                     for ( pRec = m_pHead.load( atomics::memory_order_acquire ); pRec; pRec = pRec->m_list.m_pNext ) {
                         cds::OS::ThreadId thId = nullThreadId;
-                        if ( !pRec->m_list.m_idOwner.compare_exchange_strong( thId, curThreadId, atomics::memory_order_seq_cst, atomics::memory_order_relaxed ) )
+                        if ( !pRec->m_list.m_idOwner.compare_exchange_strong( thId, curThreadId, atomics::memory_order_seq_cst, atomics::memory_order_relaxed ))
                             continue;
                         return pRec;
                     }
@@ -417,7 +417,7 @@ namespace cds {
 
                         assert( p->m_list.m_idOwner.load( atomics::memory_order_relaxed ) == nullThreadId
                             || p->m_list.m_idOwner.load( atomics::memory_order_relaxed ) == mainThreadId
-                            || !cds::OS::is_thread_alive( p->m_list.m_idOwner.load( atomics::memory_order_relaxed ) )
+                            || !cds::OS::is_thread_alive( p->m_list.m_idOwner.load( atomics::memory_order_relaxed ))
                             );
 
                         al.Delete( p );
index 382161808cfbd226a2983a68b826015ec6f0cf90..281e5f6abfdd2ee5db42a94b8a1eb2f52127156a 100644 (file)
@@ -41,8 +41,8 @@ namespace cds { namespace urcu { namespace details {
     {
         static void check()
         {
-            assert( !RCU::is_locked() );
-            if ( RCU::is_locked() )
+            assert( !RCU::is_locked());
+            if ( RCU::is_locked())
                 throw cds::urcu::rcu_deadlock();
         }
     };
@@ -59,7 +59,7 @@ namespace cds { namespace urcu { namespace details {
     {
         static void check()
         {
-            assert( !RCU::is_locked() );
+            assert( !RCU::is_locked());
         }
     };
 
index ad2fb01a26fdeb066c62896e3a34a5f300611465..95ce53861981005726002b61d887f375080e48d5 100644 (file)
@@ -43,7 +43,7 @@ namespace cds { namespace urcu { namespace details {
     template <typename RCUtag>
     inline gp_thread_gc<RCUtag>::gp_thread_gc()
     {
-        if ( !threading::Manager::isThreadAttached() )
+        if ( !threading::Manager::isThreadAttached())
             cds::threading::Manager::attachThread();
     }
 
@@ -114,7 +114,7 @@ namespace cds { namespace urcu { namespace details {
         m_nGlobalControl.fetch_xor( general_purpose_rcu::c_nControlBit, atomics::memory_order_seq_cst );
 
         for ( thread_record * pRec = m_ThreadList.head( atomics::memory_order_acquire ); pRec; pRec = pRec->m_list.m_pNext ) {
-            while ( pRec->m_list.m_idOwner.load( atomics::memory_order_acquire ) != nullThreadId && check_grace_period( pRec ) ) {
+            while ( pRec->m_list.m_idOwner.load( atomics::memory_order_acquire ) != nullThreadId && check_grace_period( pRec )) {
                 bkoff();
                 CDS_COMPILER_RW_BARRIER;
             }
index eb1f76d542966b5a313cc270c6334e67011e83b0..58c2bb8be5f0e4e54e3b4f10b30adaf72c44870e 100644 (file)
@@ -95,9 +95,9 @@ namespace cds { namespace urcu { namespace details {
 
         /// Retire pointer \p by the disposer \p pFunc
         template <typename T>
-        static void retire( T * p, void (* pFunc)(T *) )
+        static void retire( T * p, void (* pFunc)(T *))
         {
-            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ) );
+            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ));
             retire( rp );
         }
 
index 0128b94dda12ab8c253d2a4d78ef12684e4af47c..e3d744421dbe21dee5a2fe12b9b90e38c94b8b8c 100644 (file)
@@ -105,7 +105,7 @@ namespace cds { namespace urcu {
         /// Returns singleton instance
         static general_buffered * instance()
         {
-            return static_cast<general_buffered *>( base_class::instance() );
+            return static_cast<general_buffered *>( base_class::instance());
         }
         /// Checks if the singleton is created and ready to use
         static bool isUsed()
@@ -140,7 +140,7 @@ namespace cds { namespace urcu {
                     p.free();
                 }
                 else {
-                    push_buffer( std::move(p) );
+                    push_buffer( std::move(p));
                     break;
                 }
             }
@@ -150,7 +150,7 @@ namespace cds { namespace urcu {
         bool push_buffer( epoch_retired_ptr&& ep )
         {
             bool bPushed = m_Buffer.push( ep );
-            if ( !bPushed || m_Buffer.size() >= capacity() ) {
+            if ( !bPushed || m_Buffer.size() >= capacity()) {
                 synchronize();
                 if ( !bPushed ) {
                     ep.free();
@@ -175,7 +175,7 @@ namespace cds { namespace urcu {
         /// Destroys singleton object
         static void Destruct( bool bDetachAll = false )
         {
-            if ( isUsed() ) {
+            if ( isUsed()) {
                 instance()->clear_buffer( std::numeric_limits< uint64_t >::max());
                 if ( bDetachAll )
                     instance()->m_ThreadList.detach_all();
@@ -205,7 +205,7 @@ namespace cds { namespace urcu {
             while ( itFirst != itLast ) {
                 epoch_retired_ptr ep( *itFirst, nEpoch );
                 ++itFirst;
-                push_buffer( std::move(ep) );
+                push_buffer( std::move(ep));
             }
         }
 
@@ -235,7 +235,7 @@ namespace cds { namespace urcu {
             atomics::atomic_thread_fence( atomics::memory_order_acquire );
             {
                 std::unique_lock<lock_type> sl( m_Lock );
-                if ( ep.m_p && m_Buffer.push( ep ) )
+                if ( ep.m_p && m_Buffer.push( ep ))
                     return false;
                 nEpoch = m_nCurEpoch.fetch_add( 1, atomics::memory_order_relaxed );
                 flip_and_wait();
index 0a21fe70c9ba11372e4326b5371d251501a645d1..71b310e58542e665b8ee120d2fcfbb4385c100ec 100644 (file)
@@ -123,7 +123,7 @@ namespace cds { namespace urcu {
         /// Destroys singleton object
         static void Destruct( bool bDetachAll = false )
         {
-            if ( isUsed() ) {
+            if ( isUsed()) {
                 if ( bDetachAll )
                     instance()->m_ThreadList.detach_all();
                 delete instance();
index 239fc1a26a32947c3f9a82fab9810402d292fde1..fb0a1e4aa8c1be1c353a4509ac5fcadbb3691062 100644 (file)
@@ -126,7 +126,7 @@ namespace cds { namespace urcu {
         /// Returns singleton instance
         static general_threaded * instance()
         {
-            return static_cast<general_threaded *>( base_class::instance() );
+            return static_cast<general_threaded *>( base_class::instance());
         }
         /// Checks if the singleton is created and ready to use
         static bool isUsed()
@@ -152,7 +152,7 @@ namespace cds { namespace urcu {
         bool push_buffer( epoch_retired_ptr&& p )
         {
             bool bPushed = m_Buffer.push( p );
-            if ( !bPushed || m_Buffer.size() >= capacity() ) {
+            if ( !bPushed || m_Buffer.size() >= capacity()) {
                 synchronize();
                 if ( !bPushed )
                     p.free();
@@ -176,7 +176,7 @@ namespace cds { namespace urcu {
         static void Construct( size_t nBufferCapacity = 256 )
         {
             if ( !singleton_ptr::s_pRCU ) {
-                std::unique_ptr< general_threaded, scoped_disposer > pRCU( new general_threaded( nBufferCapacity ) );
+                std::unique_ptr< general_threaded, scoped_disposer > pRCU( new general_threaded( nBufferCapacity ));
                 pRCU->m_DisposerThread.start();
 
                 singleton_ptr::s_pRCU = pRCU.release();
@@ -186,7 +186,7 @@ namespace cds { namespace urcu {
         /// Destroys singleton object and terminates internal reclamation thread
         static void Destruct( bool bDetachAll = false )
         {
-            if ( isUsed() ) {
+            if ( isUsed()) {
                 general_threaded * pThis = instance();
                 if ( bDetachAll )
                     pThis->m_ThreadList.detach_all();
index ed2bdca651c5c08a25b0a385ac3052a7040726e2..c2300f351b9a013039774fc287ee7ccce5b2fd66 100644 (file)
@@ -46,7 +46,7 @@ namespace cds { namespace urcu { namespace details {
     template <typename RCUtag>
     inline sh_thread_gc<RCUtag>::sh_thread_gc()
     {
-        if ( !threading::Manager::isThreadAttached() )
+        if ( !threading::Manager::isThreadAttached())
             cds::threading::Manager::attachThread();
     }
 
index c559ef86cf720ba01383e40d0a1f535f9f0702d5..e552962283cc102b13720678699b29d25e8e5182 100644 (file)
@@ -98,9 +98,9 @@ namespace cds { namespace urcu { namespace details {
 
         /// Retire pointer \p by the disposer \p pFunc
         template <typename T>
-        static void retire( T * p, void (* pFunc)(T *) )
+        static void retire( T * p, void (* pFunc)(T *))
         {
-            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ) );
+            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ));
             retire( rp );
         }
 
index d78c6836ff229a82b9f77756b17b3d3e6215e4e1..6ca3a749ef661745c21b144c233460728176e115 100644 (file)
@@ -107,7 +107,7 @@ namespace cds { namespace urcu {
         /// Returns singleton instance
         static signal_buffered * instance()
         {
-            return static_cast<signal_buffered *>( base_class::instance() );
+            return static_cast<signal_buffered *>( base_class::instance());
         }
         /// Checks if the singleton is created and ready to use
         static bool isUsed()
@@ -126,7 +126,7 @@ namespace cds { namespace urcu {
 
         ~signal_buffered()
         {
-            clear_buffer( std::numeric_limits< uint64_t >::max() );
+            clear_buffer( std::numeric_limits< uint64_t >::max());
         }
 
         void clear_buffer( uint64_t nEpoch )
@@ -137,7 +137,7 @@ namespace cds { namespace urcu {
                     p.free();
                 }
                 else {
-                    push_buffer( std::move(p) );
+                    push_buffer( std::move(p));
                     break;
                 }
             }
@@ -146,7 +146,7 @@ namespace cds { namespace urcu {
         bool push_buffer( epoch_retired_ptr&& ep )
         {
             bool bPushed = m_Buffer.push( ep );
-            if ( !bPushed || m_Buffer.size() >= capacity() ) {
+            if ( !bPushed || m_Buffer.size() >= capacity()) {
                 synchronize();
                 if ( !bPushed ) {
                     ep.free();
@@ -173,7 +173,7 @@ namespace cds { namespace urcu {
         /// Destroys singleton object
         static void Destruct( bool bDetachAll = false )
         {
-            if ( isUsed() ) {
+            if ( isUsed()) {
                 instance()->clear_buffer( std::numeric_limits< uint64_t >::max());
                 if ( bDetachAll )
                     instance()->m_ThreadList.detach_all();
index 0b3e6fa17a0207b143afc343b482ea576151f0a0..53684a99e31540cfacb2df58f9579c3949790016 100644 (file)
@@ -116,7 +116,7 @@ namespace cds { namespace urcu {
         /// Returns singleton instance
         static signal_threaded * instance()
         {
-            return static_cast<signal_threaded *>( base_class::instance() );
+            return static_cast<signal_threaded *>( base_class::instance());
         }
         /// Checks if the singleton is created and ready to use
         static bool isUsed()
@@ -137,7 +137,7 @@ namespace cds { namespace urcu {
         bool push_buffer( epoch_retired_ptr&& p )
         {
             bool bPushed = m_Buffer.push( p );
-            if ( !bPushed || m_Buffer.size() >= capacity() ) {
+            if ( !bPushed || m_Buffer.size() >= capacity()) {
                 synchronize();
                 if ( !bPushed ) {
                     p.free();
@@ -164,7 +164,7 @@ namespace cds { namespace urcu {
         static void Construct( size_t nBufferCapacity = 256, int nSignal = SIGUSR1 )
         {
             if ( !singleton_ptr::s_pRCU ) {
-                std::unique_ptr< signal_threaded, scoped_disposer > pRCU( new signal_threaded( nBufferCapacity, nSignal ) );
+                std::unique_ptr< signal_threaded, scoped_disposer > pRCU( new signal_threaded( nBufferCapacity, nSignal ));
                 pRCU->m_DisposerThread.start();
 
                 singleton_ptr::s_pRCU = pRCU.release();
@@ -174,7 +174,7 @@ namespace cds { namespace urcu {
         /// Destroys singleton object and terminates internal reclamation thread
         static void Destruct( bool bDetachAll = false )
         {
-            if ( isUsed() ) {
+            if ( isUsed()) {
                 signal_threaded * pThis = instance();
                 if ( bDetachAll )
                     pThis->m_ThreadList.detach_all();
index 463367447995360d53a39e8526e9dc2a35bda13a..98d5fde5b2ae64d373ae571f93728443f1253b4b 100644 (file)
@@ -136,7 +136,7 @@ namespace cds { namespace urcu {
             while ( ( p = pBuf->front()) != nullptr ) {
                 if ( p->m_nEpoch <= nCurEpoch ) {
                     p->free();
-                    CDS_VERIFY( pBuf->pop_front() );
+                    CDS_VERIFY( pBuf->pop_front());
                 }
                 else
                     break;
index cdc8633baa6820f20c7fa661dea6e7db012c0165..0ffd23810b0dcf90906beb424d2df3229fc95705 100644 (file)
@@ -183,8 +183,8 @@ namespace cds { namespace urcu {
         /// Disposes the pointer. Should be called only outside of RCU critical section
         void release()
         {
-            if ( !empty() ) {
-                assert( !rcu::is_locked() );
+            if ( !empty()) {
+                assert( !rcu::is_locked());
                 rcu::template retire_ptr<disposer>( m_pNode );
                 m_pNode = nullptr;
             }
index cd6af3ec8ed7c24f65d4061185e5e3dac0cf9c3e..18bc01b2d02c1b50b0e1b2877fb7ac752f6121b4 100644 (file)
@@ -97,9 +97,9 @@ namespace cds { namespace urcu {
             If the buffer is full, \ref synchronize function is invoked.
         */
         template <typename T>
-        static void retire_ptr( T * p, void (* pFunc)(T *) )
+        static void retire_ptr( T * p, void (* pFunc)(T *))
         {
-            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ) );
+            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ));
             retire_ptr( rp );
         }
 
index b8f1d90480b5552567f77e7fdaf3b6bd60a8df62..1051024ef49499f7f4cd0afd0f87eee4d167ddb5 100644 (file)
@@ -90,9 +90,9 @@ namespace cds { namespace urcu {
             and then evaluates disposing expression <tt>pFunc( p )</tt>
         */
         template <typename T>
-        static void retire_ptr( T * p, void (* pFunc)(T *) )
+        static void retire_ptr( T * p, void (* pFunc)(T *))
         {
-            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ) );
+            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ));
             retire_ptr( rp );
         }
 
index d9585693d5390f36c4f456598d9792564d9db10f..5a740c49ba766176c47c7f04be9659e464b320c9 100644 (file)
@@ -103,9 +103,9 @@ namespace cds { namespace urcu {
             If the buffer is full, \ref synchronize function is invoked.
         */
         template <typename T>
-        static void retire_ptr( T * p, void (* pFunc)(T *) )
+        static void retire_ptr( T * p, void (* pFunc)(T *))
         {
-            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ) );
+            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ));
             retire_ptr( rp );
         }
 
index 4e9aa58bcbe34c9623dfc2e228b7e524ad950b6c..f241ff9a175f23be0a57b0fe62e412b6854a0447 100644 (file)
@@ -103,9 +103,9 @@ namespace cds { namespace urcu {
             If the buffer is full, \ref synchronize function is invoked.
         */
         template <typename T>
-        static void retire_ptr( T * p, void (* pFunc)(T *) )
+        static void retire_ptr( T * p, void (* pFunc)(T *))
         {
-            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ) );
+            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ));
             retire_ptr( rp );
         }
 
index 80a5ed8c39586b7b0f39187fd004d42defecbd66..0656e8bf9166f3d893818bbf8f87a4ab58a53efb 100644 (file)
@@ -110,9 +110,9 @@ namespace cds { namespace urcu {
             If the buffer is full, \ref synchronize function is invoked.
         */
         template <typename T>
-        static void retire_ptr( T * p, void (* pFunc)(T *) )
+        static void retire_ptr( T * p, void (* pFunc)(T *))
         {
-            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ) );
+            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ));
             retire_ptr( rp );
         }
 
index c49665a45e26d558bf4849c49aff98f26a687c4e..0d08a55093250636c3fe3e47a351c9753b8c3131 100644 (file)
@@ -249,7 +249,7 @@ namespace cds { namespace gc { namespace dhp {
             details::retired_ptr_node * pBusyLast = &dummy;
             size_t nBusyCount = 0;
 
-            for ( details::guard_data * pGuard = m_GuardPool.begin(); pGuard; pGuard = pGuard->pGlobalNext.load(atomics::memory_order_acquire) )
+            for ( details::guard_data * pGuard = m_GuardPool.begin(); pGuard; pGuard = pGuard->pGlobalNext.load(atomics::memory_order_acquire))
             {
                 // get guarded pointer
                 details::guard_data::guarded_ptr valGuarded = pGuard->pPost.load(atomics::memory_order_acquire);
index 8456767155e5677d3399cac6feaa76b26d6e4f24..3cc55b82959132148fe196714918f19601edeb85 100644 (file)
@@ -92,7 +92,7 @@ static void discover_topology()
                 if (buffer)
                     free(buffer);
 
-                buffer = reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION>( ::malloc( returnLength ) );
+                buffer = reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION>( ::malloc( returnLength ));
 
                 if ( buffer == nullptr ) {
                     // allocation failed
@@ -149,7 +149,7 @@ static void discover_topology()
     // Build relationship processor -> cell
     /*
     s_arrProcessorCellRelationship = new unsigned int[s_nProcessorCount];
-    memset( s_arrProcessorCellRelationship, 0, s_nProcessorCount * sizeof(s_arrProcessorCellRelationship[0]) );
+    memset( s_arrProcessorCellRelationship, 0, s_nProcessorCount * sizeof(s_arrProcessorCellRelationship[0]));
     byteOffset = 0;
     ptr = buffer;
     while (byteOffset + sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION) <= returnLength)
@@ -159,7 +159,7 @@ static void discover_topology()
         case RelationNumaNode:
             // Non-NUMA systems report a single record of this type.
             for ( unsigned int i = 0; i < sizeof(ptr->ProcessorMask) * 8; ++i ) {
-                if ( ptr->ProcessorMask & (1 << i) ) {
+                if ( ptr->ProcessorMask & (1 << i)) {
                     assert( i < s_nProcessorCount );
                     assert( ptr->NumaNode.NodeNumber < s_nProcessorGroupCount );
                     if ( i < s_nProcessorCount )
index 46f23f0df9e75f8a825bb6b8180938f83bbe7cac..eb667c2fec5eb9dc6e0bbfa0f0cbeebb106e9b7c 100644 (file)
@@ -96,7 +96,7 @@ namespace cds { namespace gc {
             for ( hplist_node * hprec = pHead; hprec; hprec = pNext ) {
                 assert( hprec->m_idOwner.load( atomics::memory_order_relaxed ) == nullThreadId
                     || hprec->m_idOwner.load( atomics::memory_order_relaxed ) == mainThreadId
-                    || !cds::OS::is_thread_alive( hprec->m_idOwner.load( atomics::memory_order_relaxed ) )
+                    || !cds::OS::is_thread_alive( hprec->m_idOwner.load( atomics::memory_order_relaxed ))
                 );
                 details::retired_vector& vect = hprec->m_arrRetired;
                 details::retired_vector::iterator itRetired = vect.begin();
@@ -136,7 +136,7 @@ namespace cds { namespace gc {
             // First try to reuse a retired (non-active) HP record
             for ( hprec = m_pListHead.load( atomics::memory_order_acquire ); hprec; hprec = hprec->m_pNextNode ) {
                 cds::OS::ThreadId thId = nullThreadId;
-                if ( !hprec->m_idOwner.compare_exchange_strong( thId, curThreadId, atomics::memory_order_seq_cst, atomics::memory_order_relaxed ) )
+                if ( !hprec->m_idOwner.compare_exchange_strong( thId, curThreadId, atomics::memory_order_seq_cst, atomics::memory_order_relaxed ))
                     continue;
                 hprec->m_bFree.store( false, atomics::memory_order_release );
                 return hprec;
@@ -203,7 +203,7 @@ namespace cds { namespace gc {
             }
 
             // Sort plist to simplify search in
-            std::sort( plist.begin(), plist.end() );
+            std::sort( plist.begin(), plist.end());
 
             // Stage 2: Search plist
             details::retired_vector& arrRetired = pRec->m_arrRetired;
@@ -219,7 +219,7 @@ namespace cds { namespace gc {
                 std::vector< void * >::iterator itEnd = plist.end();
                 size_t nDeferredCount = 0;
                 while ( itRetired != itRetiredEnd ) {
-                    if ( std::binary_search( itBegin, itEnd, itRetired->m_p ) ) {
+                    if ( std::binary_search( itBegin, itEnd, itRetired->m_p )) {
                         arrRetired.push( *itRetired );
                         ++nDeferredCount;
                     }
@@ -274,7 +274,7 @@ namespace cds { namespace gc {
             {
                 details::retired_ptr dummyRetired;
                 while ( pNode ) {
-                    if ( !pNode->m_bFree.load( atomics::memory_order_acquire ) ) {
+                    if ( !pNode->m_bFree.load( atomics::memory_order_acquire )) {
                         for ( size_t i = 0; i < m_nHazardPointerCount; ++i ) {
                             pRec->sync();
                             void * hptr = pNode->m_hzp[i].get();
@@ -318,14 +318,14 @@ namespace cds { namespace gc {
         {
             CDS_HAZARDPTR_STATISTIC( ++m_Stat.m_HelpScanCallCount )
 
-            assert( static_cast<hplist_node *>(pThis)->m_idOwner.load(atomics::memory_order_relaxed) == cds::OS::get_current_thread_id() );
+            assert( static_cast<hplist_node *>(pThis)->m_idOwner.load(atomics::memory_order_relaxed) == cds::OS::get_current_thread_id());
 
             const cds::OS::ThreadId nullThreadId = cds::OS::c_NullThreadId;
             const cds::OS::ThreadId curThreadId = cds::OS::get_current_thread_id();
             for ( hplist_node * hprec = m_pListHead.load(atomics::memory_order_acquire); hprec; hprec = hprec->m_pNextNode ) {
 
                 // If m_bFree == true then hprec->m_arrRetired is empty - we don't need to see it
-                if ( hprec->m_bFree.load(atomics::memory_order_acquire) )
+                if ( hprec->m_bFree.load(atomics::memory_order_acquire))
                     continue;
 
                 // Owns hprec if it is empty.
@@ -396,7 +396,7 @@ namespace cds { namespace gc {
                 ++stat.nHPRecAllocated;
                 stat.nTotalRetiredPtrCount += hprec->m_arrRetired.size();
 
-                if ( hprec->m_bFree.load(atomics::memory_order_relaxed) ) {
+                if ( hprec->m_bFree.load(atomics::memory_order_relaxed)) {
                     // Free HP record
                     stat.nRetiredPtrInFreeHPRecs += hprec->m_arrRetired.size();
                 }
index 416ec6caad8991911ff45f1a434199e3ad59aeb2..6da24a3388e8b520b21e18b3f1cbc9178dbeda3e 100644 (file)
@@ -50,7 +50,7 @@ namespace cds { namespace OS { CDS_CXX11_INLINE_NAMESPACE namespace Linux {
                 std::string line;
 
                 unsigned int nProcCount = 0;
-                while ( !cpuinfo.eof() ) {
+                while ( !cpuinfo.eof()) {
                     std::getline(cpuinfo,line);
                     if (!line.size())
                         continue;
index ec56e3276764abc7951c3e7192050d072153a407..0aefacc22118d85abc1c9cdf06596c0e0fab77b4 100644 (file)
@@ -48,14 +48,14 @@ namespace cds_test {
         static void shuffle( RandomIt first, RandomIt last )
         {
             static std::random_device random_dev;
-            static std::mt19937       random_gen( random_dev() );
+            static std::mt19937       random_gen( random_dev());
 
             std::shuffle( first, last, random_gen );
         }
 
         static inline unsigned int rand( unsigned int nMax )
         {
-            double rnd = double( std::rand() ) / double( RAND_MAX );
+            double rnd = double( std::rand()) / double( RAND_MAX );
             unsigned int n = (unsigned int)(rnd * nMax);
             return n < nMax ? n : (n - 1);
         }
index 6f08e0976aa8a584379542d5ea9f296c0a8ad7e2..22d67d3ddad4c9ec7a91e6251f4636a9c5a39af5 100644 (file)
@@ -5,7 +5,7 @@
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -25,7 +25,7 @@
     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef CDSUNIT_HASH_FUNC_H
@@ -52,7 +52,7 @@ namespace cds_test {
 
         hash_type operator()( std::string const& s ) const
         {
-            return CityHash32( s.c_str(), s.length() );
+            return CityHash32( s.c_str(), s.length());
         }
 
         template <typename T>
@@ -82,7 +82,7 @@ namespace cds_test {
 
         hash_type operator()( std::string const& s ) const
         {
-            return CityHash64( s.c_str(), s.length() );
+            return CityHash64( s.c_str(), s.length());
         }
 
         template <typename T>
@@ -112,7 +112,7 @@ namespace cds_test {
 
         hash_type operator()( std::string const& s ) const
         {
-            return CityHash128( s.c_str(), s.length() );
+            return CityHash128( s.c_str(), s.length());
         }
 
         template <typename T>
index 68c60e19f4171ee201f86d9c19d70deacf630ca6..5fc11fb62db303acc129349691784caf8367eec4 100644 (file)
@@ -69,7 +69,7 @@ namespace cds_test {
 #       define CDSSTRESS_LEVELSTAT_OUT( level, field ) \
             CDSSTRESS_STAT_OUT_( "level_stat." + std::to_string(level) + "." + #field, it->field )
 
-        o << CDSSTRESS_STAT_OUT_( "stat.level_count", level_stat.size() );
+        o << CDSSTRESS_STAT_OUT_( "stat.level_count", level_stat.size());
         size_t i = 0;
         for ( auto it = level_stat.begin(); it != level_stat.end(); ++it, ++i ) {
             o << CDSSTRESS_LEVELSTAT_OUT( i, array_node_count )
index df06d9f80e54f65e0d1c8079c743c7855f08b389..ef0404d2e83e7fb9aaad711fef6999fd1c03df10 100644 (file)
@@ -43,7 +43,7 @@ namespace cds_test {
     static inline property_stream& operator <<( property_stream& o, cds::algo::flat_combining::stat<> const& s )
     {
         return o
-            << CDSSTRESS_STAT_OUT_( "combining_factor", s.combining_factor() )
+            << CDSSTRESS_STAT_OUT_( "combining_factor", s.combining_factor())
             << CDSSTRESS_STAT_OUT( s, m_nOperationCount )
             << CDSSTRESS_STAT_OUT( s, m_nCombiningCount )
             << CDSSTRESS_STAT_OUT( s, m_nCompactPublicationList )
index 71320b89f368e18caad4d4982d34271461a389b1..b108b9e5b5eaa75ae79f5db40870ef199c47752f 100644 (file)
@@ -52,7 +52,7 @@ namespace cds_test {
         return o;
     }
 
-#   define CDSSTRESS_POOLMONITOR_STAT_OUT( s, field ) CDSSTRESS_STAT_OUT_( "pool_monitor." #field, s.field.get() )
+#   define CDSSTRESS_POOLMONITOR_STAT_OUT( s, field ) CDSSTRESS_STAT_OUT_( "pool_monitor." #field, s.field.get())
 
     static inline property_stream& operator <<( property_stream& o, cds::sync::pool_monitor_traits::stat<> const& s )
     {
index dca60f3b56343fbc9fd6046e88b313da5af9fc31..e9486641bd327d84db2e5fde4bbaa82dd60e9d53 100644 (file)
@@ -45,7 +45,7 @@ namespace cds_test {
         {
             std::string strParamName( pszParamName );
             auto it = m_Cfg.find( strParamName );
-            if ( it == m_Cfg.end() )
+            if ( it == m_Cfg.end())
                 return std::string( pszDefVal ); // param not found -> returns default value
             return it->second;
         }
@@ -54,7 +54,7 @@ namespace cds_test {
         {
             std::string strParamName( pszParamName );
             cfg_map::const_iterator it = m_Cfg.find( strParamName );
-            if ( it == m_Cfg.end() )
+            if ( it == m_Cfg.end())
                 return defVal; // param not found -> returns default value
             return atoi( it->second.c_str());
         }
@@ -63,7 +63,7 @@ namespace cds_test {
         {
             std::string strParamName( pszParamName );
             cfg_map::const_iterator it = m_Cfg.find( strParamName );
-            if ( it == m_Cfg.end() )
+            if ( it == m_Cfg.end())
                 return defVal; // param not found -> returns default value
             return static_cast<unsigned int>( strtoul( it->second.c_str(), NULL, 10 ));
         }
@@ -72,7 +72,7 @@ namespace cds_test {
         {
             std::string strParamName( pszParamName );
             cfg_map::const_iterator it = m_Cfg.find( strParamName );
-            if ( it == m_Cfg.end() )
+            if ( it == m_Cfg.end())
                 return defVal; // param not found -> returns default value
             return strtol( it->second.c_str(), NULL, 10 );
         }
@@ -81,7 +81,7 @@ namespace cds_test {
         {
             std::string strParamName( pszParamName );
             cfg_map::const_iterator it = m_Cfg.find( strParamName );
-            if ( it == m_Cfg.end() )
+            if ( it == m_Cfg.end())
                 return defVal; // param not found -> returns default value
             return strtoul( it->second.c_str(), NULL, 10 );
         }
@@ -90,7 +90,7 @@ namespace cds_test {
         {
             std::string strParamName( pszParamName );
             cfg_map::const_iterator it = m_Cfg.find( strParamName );
-            if ( it == m_Cfg.end() )
+            if ( it == m_Cfg.end())
                 return defVal; // param not found -> returns default value
             return static_cast<size_t>( strtoul( it->second.c_str(), NULL, 10 ));
         }
@@ -99,7 +99,7 @@ namespace cds_test {
         {
             std::string strParamName( pszParamName );
             cfg_map::const_iterator it = m_Cfg.find( strParamName );
-            if ( it == m_Cfg.end() )
+            if ( it == m_Cfg.end())
                 return defVal; // param not found -> returns default value
             return !( it->second.empty()
                    || it->second == "0"
@@ -131,7 +131,7 @@ namespace cds_test {
     {
         std::stringstream ss;
         ss << prop.second;
-        ::testing::Test::RecordProperty( prop.first.c_str(), ss.str().c_str() );
+        ::testing::Test::RecordProperty( prop.first.c_str(), ss.str().c_str());
         return s;
     }
 
@@ -139,7 +139,7 @@ namespace cds_test {
     {
         std::stringstream ss;
         ss << prop.second.count();
-        ::testing::Test::RecordProperty( prop.first, ss.str().c_str() );
+        ::testing::Test::RecordProperty( prop.first, ss.str().c_str());
         return s;
     }
 
index 080e33604773699148c790b663e9a7d248ae6cb1..0048294b97538a7ab342cf26a535c5182b8529e7 100644 (file)
@@ -126,7 +126,7 @@ namespace cds_test {
 
         std::chrono::milliseconds run()
         {
-            return run( std::chrono::seconds::zero() );
+            return run( std::chrono::seconds::zero());
         }
 
         std::chrono::milliseconds run( std::chrono::seconds duration )
@@ -134,7 +134,7 @@ namespace cds_test {
             m_bStopped = false;
             m_doneCount = 0;
 
-            while ( m_readyCount.load() != m_threads.size() )
+            while ( m_readyCount.load() != m_threads.size())
                 std::this_thread::yield();
 
             m_bTimeElapsed.store( false, std::memory_order_release );
@@ -149,7 +149,7 @@ namespace cds_test {
                 m_cvStart.notify_all();
             }
 
-            if ( duration != std::chrono::seconds::zero() ) {
+            if ( duration != std::chrono::seconds::zero()) {
                 for ( ;; ) {
                     std::this_thread::sleep_for( native_duration );
                     auto time_now = std::chrono::steady_clock::now();
@@ -162,7 +162,7 @@ namespace cds_test {
 
             {
                 scoped_lock l( m_cvMutex );
-                while ( m_doneCount != m_threads.size() )
+                while ( m_doneCount != m_threads.size())
                     m_cvDone.wait( l );
                 m_bStopped = true;
             }
@@ -263,7 +263,7 @@ namespace cds_test {
     inline thread::thread( thread const& sample )
         : m_pool( sample.m_pool )
         , m_type( sample.m_type )
-        , m_id( m_pool.get_next_id() )
+        , m_id( m_pool.get_next_id())
         , m_impl( &thread::run, this )
     {}
 
index f414c0da29dfdfc7ae3c091aca76617076a1228c..e1933890abefe75ab168a90cfa43f6c0dba06a9b 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
         config const& operator[]( const std::string& testName ) const\r
         {\r
             auto it = m_cfg.find( testName );\r
-            if ( it != m_cfg.end() )\r
+            if ( it != m_cfg.end())\r
                 return it->second;\r
             return m_emptyCfg;\r
         }\r
@@ -56,7 +56,7 @@ namespace cds_test {
     {\r
         std::ifstream s;\r
         s.open( fileName );\r
-        if ( !s.is_open() ) {\r
+        if ( !s.is_open()) {\r
             std::cerr << "WARNING: Cannot open test cfg file " << fileName\r
                 << "\n\tUse default settings"\r
                 << std::endl;\r
@@ -68,17 +68,17 @@ namespace cds_test {
         char buf[4096];\r
 \r
         config * pMap = nullptr;\r
-        while ( !s.eof() ) {\r
-            s.getline( buf, sizeof( buf ) / sizeof( buf[0] ) );\r
+        while ( !s.eof()) {\r
+            s.getline( buf, sizeof( buf ) / sizeof( buf[0] ));\r
             char * pszStr = buf;\r
             // trim left\r
-            while ( *pszStr != 0 && (*pszStr == ' ' || *pszStr == '\t') ) ++pszStr;\r
+            while ( *pszStr != 0 && (*pszStr == ' ' || *pszStr == '\t')) ++pszStr;\r
             // trim right\r
             char * pszEnd = strchr( pszStr, 0 );\r
             if ( pszEnd == pszStr )    // empty srtring\r
                 continue;\r
             --pszEnd;\r
-            while ( pszEnd != pszStr && (*pszEnd == ' ' || *pszEnd == '\t' || *pszEnd == '\n' || *pszEnd == '\r') ) --pszEnd;\r
+            while ( pszEnd != pszStr && (*pszEnd == ' ' || *pszEnd == '\t' || *pszEnd == '\n' || *pszEnd == '\r')) --pszEnd;\r
 \r
             if ( pszStr == pszEnd )    // empty string\r
                 continue;\r
@@ -104,7 +104,7 @@ namespace cds_test {
                 continue;\r
 \r
             pszEnd = pszEq;\r
-            while ( pszStr <= --pszEnd && (*pszEnd == ' ' || *pszEnd == '\t' || *pszEnd == '\n' || *pszEnd == '\r') );\r
+            while ( pszStr <= --pszEnd && (*pszEnd == ' ' || *pszEnd == '\t' || *pszEnd == '\n' || *pszEnd == '\r'));\r
 \r
             if ( pszEnd <= pszStr )\r
                 continue;\r
index caff4bb8de2973d56ccb06e305f312819c8ab7e0..b4a7e5ff36000241901774d3b35283c84bd13845 100644 (file)
@@ -50,7 +50,7 @@ namespace cds_test {
         std::ifstream s;\r
         char const* filename = "./dictionary.txt";\r
         s.open( filename );\r
-        if ( !s.is_open() ) {\r
+        if ( !s.is_open()) {\r
             std::cerr << "WARNING: Cannot open test file " << filename << std::endl;\r
             return arrString;\r
         }\r
@@ -60,9 +60,9 @@ namespace cds_test {
 \r
         arrString.reserve( std::stoul( line ));\r
 \r
-        while ( !s.eof() ) {\r
+        while ( !s.eof()) {\r
             std::getline( s, line );\r
-            if ( !line.empty() )\r
+            if ( !line.empty())\r
                 arrString.push_back( std::move( line ));\r
         }\r
 \r
index da1922c5a96a8a99de0cce9d90157246bc53a491..6a51563eec1cfac8e69ab1d835af8cc133cdcd93 100644 (file)
@@ -175,7 +175,7 @@ namespace {
         };
 
         atomics::atomic<tagged_ptr> tp;
-        if ( tp.is_lock_free() ) {
+        if ( tp.is_lock_free()) {
             cds::intrusive::TaggedFreeList fl;
             test( fl );
         }
index 4850e8f0dc5c6cd8117c28fe0799f311c6c670b4..7ffd24465fc1f21b60b84ecffb9ccf8b7060b3c3 100644 (file)
@@ -155,7 +155,7 @@ namespace {
         };
 
         atomics::atomic<tagged_ptr> tp;
-        if ( tp.is_lock_free() ) {
+        if ( tp.is_lock_free()) {
             cds::intrusive::TaggedFreeList fl;
             test( fl );
         }
index ecf45bde45d4b0e62e67aa230eb40b1954c3296d..7419144f7a33665001524126d8396a5a0e4067fd 100644 (file)
@@ -94,8 +94,8 @@ namespace map {
             m_arrInsert[i] = i;
             m_arrRemove[i] = i;
         }
-        shuffle( m_arrInsert.begin(), m_arrInsert.end() );
-        shuffle( m_arrRemove.begin(), m_arrRemove.end() );
+        shuffle( m_arrInsert.begin(), m_arrInsert.end());
+        shuffle( m_arrRemove.begin(), m_arrRemove.end());
     }
 
     void Map_DelOdd::TearDownTestCase()
@@ -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
index bdb5f59a2a388adbe589dfd91ae95872318d77e9..623068969c5da0564c8ed59a660c9794e2d2a1ee 100644 (file)
@@ -197,7 +197,7 @@ namespace map {
 
                 std::vector<size_t>& arrData = fixture.m_arrInsert;
                 for ( size_t i = 0; i < arrData.size(); ++i ) {
-                    if ( rMap.insert( key_type( arrData[i], id() )))
+                    if ( rMap.insert( key_type( arrData[i], id())))
                         ++m_nInsertSuccess;
                     else
                         ++m_nInsertFailed;
@@ -206,7 +206,7 @@ namespace map {
                 ensure_func f;
                 for ( size_t i = arrData.size() - 1; i > 0; --i ) {
                     if ( arrData[i] & 1 ) {
-                        rMap.update( key_type( arrData[i], id() ), f );
+                        rMap.update( key_type( arrData[i], id()), f );
                     }
                 }
 
@@ -562,7 +562,7 @@ namespace map {
 
             cds_test::thread_pool& pool = get_pool();
             pool.add( new insert_thread( pool, testMap ), s_nInsThreadCount );
-            pool.add( new delete_thread( pool, testMap ), s_nDelThreadCount ? s_nDelThreadCount : cds::OS::topology::processor_count() );
+            pool.add( new delete_thread( pool, testMap ), s_nDelThreadCount ? s_nDelThreadCount : cds::OS::topology::processor_count());
 
             propout() << std::make_pair( "insert_thread_count", s_nInsThreadCount )
                 << std::make_pair( "delete_thread_count", s_nDelThreadCount )
@@ -637,7 +637,7 @@ namespace map {
             size_t nExtractFailed = 0;
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case inserter_thread:
                 {
                     insert_thread& inserter = static_cast<insert_thread&>(thr);
@@ -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;
                     }
                 }
             }
@@ -694,7 +694,7 @@ namespace map {
 
             check_before_cleanup( testMap );
             testMap.clear();
-            EXPECT_TRUE( testMap.empty() ) << "map.size=" << testMap.size();
+            EXPECT_TRUE( testMap.empty()) << "map.size=" << testMap.size();
 
             additional_check( testMap );
             additional_cleanup( testMap );
index e021106e1cb5e85b9312b9959a9e165431d5cc50..88bff4f6d9e6890a95ba88e29cfa0ec2531f9aea 100644 (file)
@@ -68,7 +68,7 @@ namespace map {
             if ( s_Data[i].bExists )
                 ++s_nRealMapSize;
         }
-        shuffle( s_Data.begin(), s_Data.end() );
+        shuffle( s_Data.begin(), s_Data.end());
     }
 
     void Map_find_int::SetUpTestCase()
@@ -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
index abacd907ffc6b8bf3ac9c7f1a994b3092ba2f2a6..51cee8d180f86cf92f121af2537fb079d64fffe4 100644 (file)
@@ -140,7 +140,7 @@ namespace map {
         hasher h;
         for ( size_t i = 0; i < s_arrString.size(); ++i ) {
             hash_type hash = h( s_arrString.at( i ));
-            if ( mapHash.insert( std::make_pair( hash, i ) ).second ) {
+            if ( mapHash.insert( std::make_pair( hash, i )).second ) {
                 if ( ++nDiffHash >= nSize )
                     break;
                 bool bExists = rand( 100 ) <= s_nPercentExists;
@@ -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
index 0b2e050b273e6a5e75cf9ceda9189fc0bdf6ea9a..cfa04626c6bc12bad91b351491432741024d7599 100644 (file)
@@ -121,7 +121,7 @@ namespace map {
                     if ( id() & 1 ) {
                         auto itEnd = s_Data.cend();
                         for ( auto it = s_Data.cbegin(); it != itEnd; ++it ) {
-                            auto bFound = rMap.contains( *(it->pKey) );
+                            auto bFound = rMap.contains( *(it->pKey));
                             if ( it->bExists ) {
                                 if ( check_result(bFound, rMap))
                                     ++m_KeyExists.nSuccess;
@@ -139,7 +139,7 @@ namespace map {
                     else {
                         auto itEnd = s_Data.crend();
                         for ( auto it = s_Data.crbegin(); it != itEnd; ++it ) {
-                            auto bFound = rMap.contains( *(it->pKey) );
+                            auto bFound = rMap.contains( *(it->pKey));
                             if ( it->bExists ) {
                                 if ( check_result(bFound, rMap))
                                     ++m_KeyExists.nSuccess;
index 9887078aa8ba199f4adc1f11e38cd3d951399cc1..6227d342a3466e13b9ae19d2c536198f6849c121 100644 (file)
@@ -99,7 +99,7 @@ namespace map {
         s_arrKeys.reserve( s_nMapSize );
         for ( size_t i = 0; i < s_nMapSize; ++i )
             s_arrKeys.push_back( i );
-        shuffle( s_arrKeys.begin(), s_arrKeys.end() );
+        shuffle( s_arrKeys.begin(), s_arrKeys.end());
     }
 
     void Map_InsDel_func::TearDownTestCase()
index 8b177a1f3fc912324070a505dc69fcf137f332ae..66e3a94936b6ad734d8ae54f1a128367520eef16 100644 (file)
@@ -460,7 +460,7 @@ namespace map {
 
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case insert_thread:
                     {
                         inserter& t = static_cast<inserter&>( thr );
@@ -502,7 +502,7 @@ namespace map {
                 << std::make_pair( "update_failed",  nUpdateFailed )
                 << std::make_pair( "update_functor_create", nEnsFuncCreated )
                 << std::make_pair( "update_functor_modify", nEnsFuncModified )
-                << std::make_pair( "finish_map_size", testMap.size() );
+                << std::make_pair( "finish_map_size", testMap.size());
 
             EXPECT_EQ( nDelValueFailed, 0u );
             EXPECT_EQ( nDelValueSuccess, nDeleteSuccess );
index 19725a0a4b6aa9896d8ec1d95801e60d0819ad86..020a70a0c9c15146d34a3953f4976192c5a165db 100644 (file)
@@ -94,7 +94,7 @@ namespace map {
         s_arrKeys.reserve( s_nMapSize );
         for ( size_t i = 0; i < s_nMapSize; ++i )
             s_arrKeys.push_back( i );
-        shuffle( s_arrKeys.begin(), s_arrKeys.end() );
+        shuffle( s_arrKeys.begin(), s_arrKeys.end());
     }
 
     void Map_InsDel_int::TearDownTestCase()
index 4a85d90d30815698c2cfb538f9e74b3021998ab1..fc1d88f196f78967da7dde2f60f3d3b15227a07a 100644 (file)
@@ -98,7 +98,7 @@ namespace map {
                 if ( id() & 1 ) {
                     for ( size_t nPass = 0; nPass < s_nThreadPassCount; ++nPass ) {
                         for ( key_array::const_iterator it = s_arrKeys.cbegin(), itEnd = s_arrKeys.cend(); it != itEnd; ++it ) {
-                            if ( rMap.insert( *it, *it * 8 ) )
+                            if ( rMap.insert( *it, *it * 8 ))
                                 ++m_nInsertSuccess;
                             else
                                 ++m_nInsertFailed;
@@ -108,7 +108,7 @@ namespace map {
                 else {
                     for ( size_t nPass = 0; nPass < s_nThreadPassCount; ++nPass ) {
                         for ( key_array::const_reverse_iterator it = s_arrKeys.crbegin(), itEnd = s_arrKeys.crend(); it != itEnd; ++it ) {
-                            if ( rMap.insert( *it, *it * 8 ) )
+                            if ( rMap.insert( *it, *it * 8 ))
                                 ++m_nInsertSuccess;
                             else
                                 ++m_nInsertFailed;
@@ -150,7 +150,7 @@ namespace map {
                 if ( id() & 1 ) {
                     for ( size_t nPass = 0; nPass < s_nThreadPassCount; ++nPass ) {
                         for ( key_array::const_iterator it = s_arrKeys.cbegin(), itEnd = s_arrKeys.cend(); it != itEnd; ++it ) {
-                            if ( rMap.erase( *it ) )
+                            if ( rMap.erase( *it ))
                                 ++m_nDeleteSuccess;
                             else
                                 ++m_nDeleteFailed;
@@ -160,7 +160,7 @@ namespace map {
                 else {
                     for ( size_t nPass = 0; nPass < s_nThreadPassCount; ++nPass ) {
                         for ( key_array::const_reverse_iterator it = s_arrKeys.crbegin(), itEnd = s_arrKeys.crend(); it != itEnd; ++it ) {
-                            if ( rMap.erase( *it ) )
+                            if ( rMap.erase( *it ))
                                 ++m_nDeleteSuccess;
                             else
                                 ++m_nDeleteFailed;
@@ -197,7 +197,7 @@ namespace map {
 
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case insert_thread:
                     {
                         inserter& t = static_cast<inserter&>( thr );
@@ -222,7 +222,7 @@ namespace map {
                 << std::make_pair( "insert_failed", nInsertFailed )
                 << std::make_pair( "delete_success", nDeleteSuccess )
                 << std::make_pair( "delete_failed", nDeleteFailed )
-                << std::make_pair( "finish_map_size", testMap.size() );
+                << std::make_pair( "finish_map_size", testMap.size());
 
             check_before_cleanup( testMap );
 
index 339caa56a790da26f1fd359a58d4fea96a3772a0..5e75000286666c689ce7729d86ca1cc46825de23 100644 (file)
@@ -206,7 +206,7 @@ namespace map {
                 v.reserve( s_nMapSize );
                 for ( size_t i = 0; i < s_nMapSize; ++i )
                     v.push_back( i );
-                shuffle( v.begin(), v.end() );
+                shuffle( v.begin(), v.end());
                 for ( auto i: v )
                     EXPECT_TRUE( testMap.insert( i, i ));
             }
@@ -233,7 +233,7 @@ namespace map {
 
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case insert_thread:
                 {
                     inserter& t = static_cast<inserter&>(thr);
@@ -267,7 +267,7 @@ namespace map {
 
             // Check if the map contains all items
             for ( size_t i = 0; i < s_nMapSize; ++i )
-                EXPECT_TRUE( testMap.contains( i ) ) << "key=" << i;
+                EXPECT_TRUE( testMap.contains( i )) << "key=" << i;
 
             check_before_cleanup( testMap );
 
index c051e2228a7059b30f28ea9600a8585dab5b442d..1dd25d5547cc5e5b3e2847f741157a0a88d0f058 100644 (file)
@@ -100,7 +100,7 @@ namespace map {
         s_arrKeys.reserve( s_nMapSize );
         std::vector<std::string> dict = load_dictionary();
         for ( size_t i = 0; i < s_nMapSize; ++i )
-            s_arrKeys.push_back( std::move( dict.at(i) ));
+            s_arrKeys.push_back( std::move( dict.at(i)));
     }
 
     void Map_InsDel_string::TearDownTestCase()
@@ -141,11 +141,11 @@ namespace map {
         size_t nDiffHash = 0;
         hasher h;
         for ( size_t i = 0; i < dict.size(); ++i ) {
-            hash_type hash = h( dict.at( i ) );
-            if ( mapHash.insert( std::make_pair( hash, i ) ).second ) {
+            hash_type hash = h( dict.at( i ));
+            if ( mapHash.insert( std::make_pair( hash, i )).second ) {
                 if ( ++nDiffHash >= nSize )
                     break;
-                s_arrKeys.push_back( std::move( dict.at( i ) ));
+                s_arrKeys.push_back( std::move( dict.at( i )));
             }
         }
         s_nMapSize = dict.size();
index 41cd6a7733178e6a73aae0d049efab39a32d3972..ec6dc671d020445c50ef51bd11ddf0149208651e 100644 (file)
@@ -205,7 +205,7 @@ namespace map {
 
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case insert_thread:
                 {
                     inserter& t = static_cast<inserter&>(thr);
@@ -230,14 +230,14 @@ namespace map {
                 << std::make_pair( "insert_failed", nInsertFailed )
                 << std::make_pair( "delete_success", nDeleteSuccess )
                 << std::make_pair( "delete_failed", nDeleteFailed )
-                << std::make_pair( "finish_map_size", testMap.size() );
+                << std::make_pair( "finish_map_size", testMap.size());
 
             check_before_cleanup( testMap );
 
             //testMap.clear();
             for ( auto const& str: s_arrKeys )
                 testMap.erase( str );
-            EXPECT_TRUE( testMap.empty() );
+            EXPECT_TRUE( testMap.empty());
             EXPECT_EQ( testMap.size(), 0u );
 
             additional_check( testMap );
index df52df45a262e5c08c6a4c0e84f96bca4b12e2c3..3c16a9a58970fdde57faa5ac2179c058d84359a7 100644 (file)
@@ -127,7 +127,7 @@ namespace map {
                 size_t const nNormalize = size_t(-1) / ( s_nMapSize * 2 );
 
                 size_t nRand = 0;
-                while ( !time_elapsed() ) {
+                while ( !time_elapsed()) {
                     nRand = cds::bitop::RandXorShift( nRand );
                     size_t n = nRand / nNormalize;
                     switch ( s_arrShuffle[i] ) {
@@ -177,7 +177,7 @@ namespace map {
                 arr.reserve( s_nMapSize );
                 for ( size_t i = 0; i < s_nMapSize; ++i )
                     arr.push_back( i * 2 + 1);
-                shuffle( arr.begin(), arr.end() );
+                shuffle( arr.begin(), arr.end());
                 for ( size_t i = 0; i < s_nMapSize; ++i )
                     testMap.insert( arr[i], arr[i] );
             }
@@ -218,7 +218,7 @@ namespace map {
                 << std::make_pair( "delete_failed", nDeleteFailed )
                 << std::make_pair( "find_success", nFindSuccess )
                 << std::make_pair( "find_failed", nFindFailed )
-                << std::make_pair( "finish_map_size", testMap.size() );
+                << std::make_pair( "finish_map_size", testMap.size());
 
             {
                 ASSERT_TRUE( std::chrono::duration_cast<std::chrono::seconds>(duration).count() > 0 );
index 7b97aed61e45a0097642c5783b862e18d643f44e..9c8daa98298246f6acd1858e90d0d0ff4743047f 100644 (file)
@@ -82,7 +82,7 @@ namespace map {
                 size_t nItem = id();
                 for ( size_t i = 0; i < nSize; nItem += nThreadCount, ++i )
                     m_arrVal[i] = nItem;
-                shuffle( m_arrVal.begin(), m_arrVal.end() );
+                shuffle( m_arrVal.begin(), m_arrVal.end());
             }
         public:
             size_t  m_nInsertSuccess = 0;
@@ -171,7 +171,7 @@ namespace map {
                 << std::make_pair( "insert_failed", nInsertFailed )
                 << std::make_pair( "find_success", nFindSuccess )
                 << std::make_pair( "find_failed", nFindFailed )
-                << std::make_pair( "finish_map_size", testMap.size() );
+                << std::make_pair( "finish_map_size", testMap.size());
 
             EXPECT_EQ( nInsertFailed, 0u );
             EXPECT_EQ( nFindFailed, 0u );
index 08373a6621ebedc1ce9d0307aa7dbf1761774eb6..44f51fb0103fd7fa273354deaa89858111d82425 100644 (file)
@@ -64,7 +64,7 @@ namespace map {
     struct cmp {
         int operator ()(Key const& k1, Key const& k2) const
         {
-            if ( less<Key>( k1, k2 ) )
+            if ( less<Key>( k1, k2 ))
                 return -1;
             return less<Key>( k2, k1 ) ? 1 : 0;
         }
index bc78537fb4a8969d3f0ca4239ee9ba7004ec320d..85b50205f53d5fc0e5cf8ba231652268f9f30554 100644 (file)
@@ -57,7 +57,7 @@ namespace map {
         template <typename Q, typename Pred>
         bool erase_with( Q const& key, Pred /*pred*/ )
         {
-            return base_class::erase_with( key, typename std::conditional< base_class::c_isSorted, Pred, typename Pred::equal_to>::type() );
+            return base_class::erase_with( key, typename std::conditional< base_class::c_isSorted, Pred, typename Pred::equal_to>::type());
         }
 
         // for testing
@@ -295,7 +295,7 @@ namespace map {
     static inline void print_stat( cds_test::property_stream& o, CuckooMap< Key, V, Traits > const& s )
     {
         typedef CuckooMap< Key, V, Traits > map_type;
-        print_stat( o, static_cast<typename map_type::base_class const&>(s) );
+        print_stat( o, static_cast<typename map_type::base_class const&>(s));
     }
 
 }   // namespace map
index f9265e3b278de364bef0ea620b7b6f73dc9d6ddb..27ba541908e315349a6e306ded37b97d1927e35e 100644 (file)
@@ -259,13 +259,13 @@ namespace map {
     static inline void additional_check( EllenBinTreeMap<GC, Key, T, Traits>& m )
     {
         GC::force_dispose();
-        ellen_bintree_check::check_stat( m.statistics() );
+        ellen_bintree_check::check_stat( m.statistics());
     }
 
     template <typename GC, typename Key, typename T, typename Traits>
     static inline void check_before_cleanup( EllenBinTreeMap<GC, Key, T, Traits>& m )
     {
-        EXPECT_TRUE( m.check_consistency() );
+        EXPECT_TRUE( m.check_consistency());
     }
 }   // namespace map
 
index 3a729820d3f6ee9be7d23d5a83ba70f54fa80e3d..0f3c00598152e70812044bf752e992f9b35b1dae 100644 (file)
@@ -73,14 +73,14 @@ namespace map {
         bool insert( const Key& key, const Value& val )
         {
             scoped_lock al( m_lock );
-            return base_class::insert( typename base_class::value_type( key, val ) ).second;
+            return base_class::insert( typename base_class::value_type( key, val )).second;
         }
 
         template <typename T, typename Func>
         bool insert( const Key& key, const T& val, Func func )
         {
             scoped_lock al( m_lock );
-            std::pair<typename base_class::iterator, bool> pRet = base_class::insert( typename base_class::value_type( key, Value() ) );
+            std::pair<typename base_class::iterator, bool> 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<bool, bool> update( const T& key, Func func, bool /*bAllowInsert*/ = true )
         {
             scoped_lock al( m_lock );
-            std::pair<typename base_class::iterator, bool> pRet = base_class::insert( typename base_class::value_type( key, Value() ) );
+            std::pair<typename base_class::iterator, bool> pRet = base_class::insert( typename base_class::value_type( key, Value()) );
             if ( pRet.second ) {
                 func( true, *pRet.first );
                 return std::make_pair( true, true );
@@ -114,8 +114,8 @@ namespace map {
         {
             scoped_lock al( m_lock );
             typename base_class::iterator it = base_class::find( key );
-            if ( it != base_class::end() ) {
-                func( (*it) );
+            if ( it != base_class::end()) {
+                func( (*it));
                 base_class::erase( it );
                 return true;
             }
@@ -180,7 +180,7 @@ namespace map {
         bool insert( const Key& key, const T& val, Func func )
         {
             scoped_lock al( m_lock );
-            std::pair<typename base_class::iterator, bool> pRet = base_class::insert( typename base_class::value_type(key, Value() ));
+            std::pair<typename base_class::iterator, bool> pRet = base_class::insert( typename base_class::value_type(key, Value()));
             if ( pRet.second ) {
                 func( pRet.first->second, val );
                 return true;
@@ -192,7 +192,7 @@ namespace map {
         std::pair<bool, bool> update( const T& key, Func func, bool /*bAllowInsert*/ = true )
         {
             scoped_lock al( m_lock );
-            std::pair<typename base_class::iterator, bool> pRet = base_class::insert( typename base_class::value_type( key, Value() ));
+            std::pair<typename base_class::iterator, bool> pRet = base_class::insert( typename base_class::value_type( key, Value()));
             if ( pRet.second ) {
                 func( true, *pRet.first );
                 return std::make_pair( true, true );
@@ -214,7 +214,7 @@ namespace map {
         {
             scoped_lock al( m_lock );
             typename base_class::iterator it = base_class::find( key );
-            if ( it != base_class::end() ) {
+            if ( it != base_class::end()) {
                 func( *it );
                 return base_class::erase( key ) != 0;
             }
index 6d0d01f42bfd6e95b90291a926ba516f734ae23f..5ab145119286ce6a143b9215626f4c0d6d32be06 100644 (file)
@@ -80,7 +80,7 @@ namespace map {
         public:
             template <class Config>
             StripedHashMap_seq( Config const& cfg )
-                : base_class( cfg.s_nMapSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nLoadFactor )) )
+                : base_class( cfg.s_nMapSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nLoadFactor )))
             {}
 
             empty_stat statistics() const
@@ -113,7 +113,7 @@ namespace map {
         public:
             template <class Config>
             StripedHashMap_ord( Config const& cfg )
-                : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )) )
+                : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )))
             {}
 
             empty_stat statistics() const
@@ -229,7 +229,7 @@ namespace map {
         public:
             template <class Config>
             RefinableHashMap_ord( Config const& cfg )
-                : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )) )
+                : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )))
             {}
 
             empty_stat statistics() const
index 89b0241fe6d172ecb79c6ecb1c7eebf29bff82a0..dc97912103093d0bee72cf1aba11dd5ad121c511 100644 (file)
@@ -124,12 +124,12 @@ namespace {
                 arr.reserve( s_nQueueSize );
                 for ( size_t i = 0; i < s_nQueueSize; ++i )
                     arr.push_back( i );
-                shuffle( arr.begin(), arr.end() );
+                shuffle( arr.begin(), arr.end());
 
                 size_t nPushError = 0;
                 typedef typename PQueue::value_type value_type;
                 for ( auto it = arr.begin(); it != arr.end(); ++it ) {
-                    if ( !q.push( value_type( *it ) ))
+                    if ( !q.push( value_type( *it )))
                         ++nPushError;
                 }
                 s_nQueueSize -= nPushError;
@@ -158,11 +158,11 @@ namespace {
                     nTotalErrorEq += cons.m_nPopErrorEq;
                     nTotalFailed  += cons.m_nPopFailed;
 
-                    if ( !cons.m_arrFailedPops.empty() ) {
+                    if ( !cons.m_arrFailedPops.empty()) {
                         std::cerr << "Priority violations, thread " << i;
                         for ( size_t k = 0; k < cons.m_arrFailedPops.size(); ++k ) {
                             std::cerr << "\n    " << "prev_key=" << cons.m_arrFailedPops[k].prev_key << " popped_key=" << cons.m_arrFailedPops[k].popped_key;
-                            if ( cons.m_arrFailedPops[k].next_key != static_cast<size_t>(-1) )
+                            if ( cons.m_arrFailedPops[k].next_key != static_cast<size_t>(-1))
                                 std::cerr << " next_key=" << cons.m_arrFailedPops[k].next_key;
                             else
                                 std::cerr << " next_key unspecified";
@@ -218,7 +218,7 @@ namespace {
     { \
         typedef pqueue::Types<pqueue::simple_value>::pqueue_t pqueue_type; \
         std::unique_ptr< pqueue_type > pq( new pqueue_type ); \
-        test( *pq.get() ); \
+        test( *pq.get()); \
     }
     //CDSSTRESS_MSPriorityQueue( pqueue_pop, MSPriorityQueue_static_less )
     //CDSSTRESS_MSPriorityQueue( pqueue_pop, MSPriorityQueue_static_less_stat )
index 455d357150f917fa3df68b55ed87c81c9c63b41b..60b86f70675350c5eae585f91e03f1b933235171 100644 (file)
@@ -92,7 +92,7 @@ namespace pqueue {
             bool pop( value_type& dest )
             {
                 scoped_lock l( m_Lock );
-                if ( !m_PQueue.empty() ) {
+                if ( !m_PQueue.empty()) {
                     dest = m_PQueue.top();
                     m_PQueue.pop();
                     return true;
@@ -104,8 +104,8 @@ namespace pqueue {
             bool pop_with( Q& dest, MoveFunc f )
             {
                 scoped_lock l( m_Lock );
-                if ( !m_PQueue.empty() ) {
-                    f( dest, m_PQueue.top() );
+                if ( !m_PQueue.empty()) {
+                    f( dest, m_PQueue.top());
                     m_PQueue.pop();
                     return true;
                 }
@@ -115,7 +115,7 @@ namespace pqueue {
             void clear()
             {
                 scoped_lock l( m_Lock );
-                while ( !m_PQueue.empty() )
+                while ( !m_PQueue.empty())
                     m_PQueue.pop();
             }
 
@@ -123,8 +123,8 @@ namespace pqueue {
             void clear_with( Func f )
             {
                 scoped_lock l( m_Lock );
-                while ( !m_PQueue.empty() ) {
-                    f( m_PQueue.top() );
+                while ( !m_PQueue.empty()) {
+                    f( m_PQueue.top());
                     m_PQueue.pop();
                 }
             }
@@ -152,7 +152,7 @@ namespace pqueue {
             template <typename T, typename Tree>
             bool operator()( T& dest, Tree& container ) const
             {
-                typename Tree::guarded_ptr gp( container.extract_max() );
+                typename Tree::guarded_ptr gp( container.extract_max());
                 if ( gp )
                     dest = *gp;
                 return !gp.empty();
@@ -165,7 +165,7 @@ namespace pqueue {
             template <typename T, typename Tree>
             bool operator()( T& dest, Tree& container ) const
             {
-                typename Tree::exempt_ptr ep( container.extract_max() );
+                typename Tree::exempt_ptr ep( container.extract_max());
                 if ( ep )
                     dest = *ep;
                 return !ep.empty();
@@ -178,7 +178,7 @@ namespace pqueue {
             template <typename T, typename Tree>
             bool operator()( T& dest, Tree& container ) const
             {
-                typename Tree::guarded_ptr gp( container.extract_min() );
+                typename Tree::guarded_ptr gp( container.extract_min());
                 if ( gp )
                     dest = *gp;
                 return !gp.empty();
@@ -191,7 +191,7 @@ namespace pqueue {
             template <typename T, typename Tree>
             bool operator()( T& dest, Tree& container ) const
             {
-                typename Tree::exempt_ptr ep( container.extract_min() );
+                typename Tree::exempt_ptr ep( container.extract_min());
                 if ( ep )
                     dest = *ep;
                 return !ep.empty();
@@ -248,7 +248,7 @@ namespace pqueue {
             template <typename T, typename Set>
             bool operator()( T& dest, Set& container ) const
             {
-                typename Set::guarded_ptr gp( container.extract_max() );
+                typename Set::guarded_ptr gp( container.extract_max());
                 if ( gp )
                     dest = *gp;
                 return !gp.empty();
@@ -261,7 +261,7 @@ namespace pqueue {
             template <typename T, typename Set>
             bool operator()( T& dest, Set& container ) const
             {
-                typename Set::exempt_ptr ep( container.extract_max() );
+                typename Set::exempt_ptr ep( container.extract_max());
                 if ( ep )
                     dest = *ep;
                 return !ep.empty();
@@ -274,7 +274,7 @@ namespace pqueue {
             template <typename T, typename Set>
             bool operator()( T& dest, Set& container ) const
             {
-                typename Set::guarded_ptr gp( container.extract_min() );
+                typename Set::guarded_ptr gp( container.extract_min());
                 if ( gp )
                     dest = *gp;
                 return !gp.empty();
@@ -287,7 +287,7 @@ namespace pqueue {
             template <typename T, typename Set>
             bool operator()( T& dest, Set& container ) const
             {
-                typename Set::exempt_ptr ep( container.extract_min() );
+                typename Set::exempt_ptr ep( container.extract_min());
                 if ( ep )
                     dest = *ep;
                 return !ep.empty();
index eb5b0813b6cf5e3560c2572ed1ce238be1db9df7..f945d7a45ed441b1ffc2a9cd3f1aaf58c720e5c4 100644 (file)
@@ -67,7 +67,7 @@ namespace pqueue {
                 typedef typename PQueue::value_type value_type;
 
                 for ( auto it = m_arr.begin(); it != m_arr.end(); ++it ) {
-                    if ( !m_Queue.push( value_type( *it ) ))
+                    if ( !m_Queue.push( value_type( *it )))
                         ++m_nPushError;
                 }
             }
@@ -77,7 +77,7 @@ namespace pqueue {
                 m_arr.reserve( nEnd - nStart );
                 for ( size_t i = nStart; i < nEnd; ++i )
                     m_arr.push_back( i );
-                shuffle( m_arr.begin(), m_arr.end() );
+                shuffle( m_arr.begin(), m_arr.end());
             }
 
         public:
@@ -179,7 +179,7 @@ namespace pqueue {
     { \
         typedef pqueue::Types<pqueue::simple_value>::pqueue_t pqueue_type; \
         std::unique_ptr< pqueue_type > pq( new pqueue_type ); \
-        test( *pq.get() ); \
+        test( *pq.get()); \
     }
     //CDSSTRESS_MSPriorityQueue( pqueue_push, MSPriorityQueue_static_less )
     //CDSSTRESS_MSPriorityQueue( pqueue_push, MSPriorityQueue_static_less_stat )
index f1df9d64fabf64d1c5124a717a03fcd7348fa7be..adfca3c44f86779709ee6cbb8fda5fb91afbd11e 100644 (file)
@@ -86,7 +86,7 @@ namespace {
                 m_arr.reserve( nEnd - nStart );
                 for ( size_t i = nStart; i < nEnd; ++i )
                     m_arr.push_back( i );
-                shuffle( m_arr.begin(), m_arr.end() );
+                shuffle( m_arr.begin(), m_arr.end());
             }
 
         public:
@@ -121,7 +121,7 @@ namespace {
             virtual void test()
             {
                 typename PQueue::value_type val;
-                while ( s_nProducerCount.load( atomics::memory_order_relaxed ) != 0 || !m_Queue.empty() ) {
+                while ( s_nProducerCount.load( atomics::memory_order_relaxed ) != 0 || !m_Queue.empty()) {
                     if ( m_Queue.pop( val ))
                         ++m_nPopSuccess;
                     else
@@ -192,7 +192,7 @@ namespace {
             EXPECT_EQ( nTotalPopped, s_nQueueSize );
             EXPECT_EQ( nPushFailed, 0u );
 
-            //check_statistics( testQueue.statistics() );
+            //check_statistics( testQueue.statistics());
             propout() << q.statistics();
         }
 
@@ -233,7 +233,7 @@ namespace {
     { \
         typedef pqueue::Types<pqueue::simple_value>::pqueue_t pqueue_type; \
         std::unique_ptr< pqueue_type > pq( new pqueue_type ); \
-        test( *pq.get() ); \
+        test( *pq.get()); \
     }
     //CDSSTRESS_MSPriorityQueue( pqueue_push_pop, MSPriorityQueue_static_less )
     //CDSSTRESS_MSPriorityQueue( pqueue_push_pop, MSPriorityQueue_static_less_stat )
index 1429d99631760d18a5c2d1596d95b3939d054e5a..a3a7c5b87c68cb6cf7d86aabc85c97e40f7bed28 100644 (file)
@@ -175,7 +175,7 @@ namespace {
                     }
                     else {
                         ++m_nPopEmpty;
-                        if ( s_nProducerCount.load( atomics::memory_order_acquire ) == 0 && m_Queue.empty() )
+                        if ( s_nProducerCount.load( atomics::memory_order_acquire ) == 0 && m_Queue.empty())
                             break;
                     }
                 }
@@ -225,7 +225,7 @@ namespace {
             typedef typename Reader::const_data_iterator    ReaderIterator;
 
             size_t nPostTestPops = 0;
-            while ( testQueue.pop() )
+            while ( testQueue.pop())
                 ++nPostTestPops;
 
             size_t nTotalPops = 0;
@@ -272,7 +272,7 @@ namespace {
 
             size_t nQueueSize = s_nThreadPushCount * s_nWriterThreadCount;
             EXPECT_EQ( nTotalPops + nPostTestPops, nQueueSize );
-            EXPECT_TRUE( testQueue.empty() );
+            EXPECT_TRUE( testQueue.empty());
 
             // Test that all items have been popped
             // Test FIFO order
@@ -294,7 +294,7 @@ namespace {
                     for ( it = arrReaders[nReader]->m_WriterData[nWriter].begin(); it != itEnd; ++it )
                         arrData.push_back( *it );
                 }
-                std::sort( arrData.begin(), arrData.end() );
+                std::sort( arrData.begin(), arrData.end());
                 for ( size_t i=1; i < arrData.size(); ++i ) {
                     if ( arrData[i-1] + 1 != arrData[i] ) {
                         EXPECT_EQ( arrData[i-1] + 1,  arrData[i] ) << "Writer " << nWriter << ": [" << (i-1) << "]=" << arrData[i-1]
@@ -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
index c4740563c041315d221eb43d5fd4b03ba4c3cb49..4a88e80ad99a054ff8b72c0858aefd25d41f9239 100644 (file)
@@ -82,7 +82,7 @@ namespace queue {
             value_type * pop()
             {
                 lock_guard l( m_Lock );
-                if ( m_List.empty() )
+                if ( m_List.empty())
                     return nullptr;
                 value_type& v = m_List.front();
                 m_List.pop_front();
index 4bcf68c61933ab6d2d9373337f9cb79bc0747646..2747d125712d89ecfa37ebacdfbaca06810456ac 100644 (file)
@@ -91,7 +91,7 @@ namespace {
                 typedef typename Queue::value_type value_type;
                 value_type value;
                 size_t nPopCount = 0;
-                while ( m_Queue.pop( value ) ) {
+                while ( m_Queue.pop( value )) {
                     ++m_arr[ value.nNo ];
                     ++nPopCount;
                 }
index ed4963f890b677e067cad231169ea931a18d93ac..0be51017ec51ce81dc475702b70833d1ba24a096 100644 (file)
@@ -150,7 +150,7 @@ namespace {
                 Producer<Queue>& thread = static_cast<Producer<Queue>&>(pool.get( i ));
                 EXPECT_EQ( thread.m_nPushError, 0u ) << " producer thread " << i;
             }
-            EXPECT_TRUE( !q.empty() );
+            EXPECT_TRUE( !q.empty());
 
             std::unique_ptr< uint8_t[] > arr( new uint8_t[s_nQueueSize] );
             memset( arr.get(), 0, sizeof(arr[0]) * s_nQueueSize );
index 0d2b37bf51d0bec271da3e27ef386935614d8b2b..927712d076599b86b06aea274853e5a9e735257e 100644 (file)
@@ -167,7 +167,7 @@ namespace {
                 const size_t nTotalWriters = s_nProducerThreadCount;
                 value_type v;
                 while ( true ) {
-                    if ( m_Queue.pop( v ) ) {
+                    if ( m_Queue.pop( v )) {
                         ++m_nPopped;
                         if ( v.nWriterNo < nTotalWriters )
                             m_WriterData[ v.nWriterNo ].push_back( v.nNo );
@@ -178,7 +178,7 @@ namespace {
                         ++m_nPopEmpty;
 
                         if ( s_nProducerDone.load() >= nTotalWriters ) {
-                            if ( m_Queue.empty() )
+                            if ( m_Queue.empty())
                                 break;
                         }
                     }
@@ -238,7 +238,7 @@ namespace {
             EXPECT_EQ( nTotalPops, nPoppedItems );
 
             EXPECT_EQ( nTotalPops + nPostTestPops, s_nQueueSize ) << "nTotalPops=" << nTotalPops << ", nPostTestPops=" << nPostTestPops;
-            EXPECT_TRUE( q.empty() );
+            EXPECT_TRUE( q.empty());
 
             // Test consistency of popped sequence
             for ( size_t nWriter = 0; nWriter < s_nProducerThreadCount; ++nWriter ) {
@@ -259,7 +259,7 @@ namespace {
                         arrData.push_back( *it );
                 }
 
-                std::sort( arrData.begin(), arrData.end() );
+                std::sort( arrData.begin(), arrData.end());
                 for ( size_t i=1; i < arrData.size(); ++i ) {
                     EXPECT_EQ( arrData[i - 1] + 1, arrData[i] ) << "producer=" << nWriter;
                 }
index 1094d82e0dff434f07c48a2febebe74da2f50c21..2e7cbe1b2fea62fb9910dc864f366275014c25fa 100644 (file)
@@ -180,7 +180,7 @@ namespace {
         template <class Queue>
         void analyze( Queue& q  )
         {
-            EXPECT_TRUE( q.empty() );
+            EXPECT_TRUE( q.empty());
 
             std::vector< size_t > arrPushCount;
             arrPushCount.resize( s_nThreadCount, 0 );
index c488b1f46e8e8826af245e82b03f33faabedbde3..344923410141a415a92d4db5dc43e2b7cf9d29a1 100644 (file)
@@ -56,7 +56,7 @@ namespace queue {
         bool dequeue( T& data )
         {
             std::unique_lock<Lock> a(m_Locker);
-            if ( base_class::empty() )
+            if ( base_class::empty())
                 return false;
 
             data = base_class::front();
index bbef04baf0cb9a3d633ed3138c8b16de469ee0e4..b2d43292ae0d8c391f82230876441fab18fad9ce 100644 (file)
@@ -89,7 +89,7 @@ namespace set {
         m_arrData.resize( s_nSetSize );
         for ( size_t i = 0; i < s_nSetSize; ++i )
             m_arrData[i] = i;
-        shuffle( m_arrData.begin(), m_arrData.end() );
+        shuffle( m_arrData.begin(), m_arrData.end());
     }
 
     void Set_DelOdd::TearDownTestCase()
@@ -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
index cfa99f63f2826b2e127cf4c7446811a1750ad684..4c98268e0b7e6c96760e5f500bd4440875feaa96 100644 (file)
@@ -193,7 +193,7 @@ namespace set {
 
                 std::vector<size_t>& arrData = fixture.m_arrData;
                 for ( size_t i = 0; i < arrData.size(); ++i ) {
-                    if ( rSet.insert( key_type( arrData[i], id() )))
+                    if ( rSet.insert( key_type( arrData[i], id())))
                         ++m_nInsertSuccess;
                     else
                         ++m_nInsertFailed;
@@ -202,7 +202,7 @@ namespace set {
                 update_functor f;
                 for ( size_t i = arrData.size() - 1; i > 0; --i ) {
                     if ( arrData[i] & 1 )
-                        rSet.update( key_type( arrData[i], id() ), f, true );
+                        rSet.update( key_type( arrData[i], id()), f, true );
                 }
 
                 fixture.m_nInsThreadCount.fetch_sub( 1, atomics::memory_order_release );
@@ -311,7 +311,7 @@ namespace set {
             struct eraser {
                 static bool erase( SetType& s, size_t key, size_t /*thread*/)
                 {
-                    return s.erase_with( key, key_less() );
+                    return s.erase_with( key, key_less());
                 }
             };
 
@@ -641,7 +641,7 @@ namespace set {
             size_t nExtractFailed = 0;
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case inserter_thread:
                     {
                         insert_thread& inserter = static_cast<insert_thread&>( thr );
@@ -695,7 +695,7 @@ namespace set {
             check_before_clear( testSet );
 
             testSet.clear();
-            EXPECT_TRUE( testSet.empty() ) << "set.size=" << testSet.size();
+            EXPECT_TRUE( testSet.empty()) << "set.size=" << testSet.size();
 
             additional_check( testSet );
             print_stat( propout(), testSet );
index 7ac63b1856e869b2bc3dff435a79e9ad5b1002d5..5989ba499f5fd4abe2e2dae0dd449032e263da80 100644 (file)
@@ -108,7 +108,7 @@ namespace set {
                 size_t const nNormalize = size_t(-1) / ( fixture.s_nSetSize * 2);
 
                 size_t nRand = 0;
-                while ( !time_elapsed() ) {
+                while ( !time_elapsed()) {
                     nRand = cds::bitop::RandXorShift(nRand);
                     size_t n = nRand / nNormalize;
                     switch ( pAct[i] ) {
@@ -152,7 +152,7 @@ namespace set {
                     pInitArr[i] = i * 2 + 1;
                 shuffle( pInitArr, pEnd );
                 for ( size_t * p = pInitArr; p < pEnd; ++p )
-                    testSet.insert( typename Set::value_type( *p, *p ) );
+                    testSet.insert( typename Set::value_type( *p, *p ));
                 delete [] pInitArr;
             }
 
@@ -196,7 +196,7 @@ namespace set {
             {
                 ASSERT_TRUE( std::chrono::duration_cast<std::chrono::seconds>(duration).count() > 0 );
                 size_t nTotalOps = nInsertSuccess + nInsertFailed + nDeleteSuccess + nDeleteFailed + nFindSuccess + nFindFailed;
-                propout() << std::make_pair( "avg_speed", nTotalOps / std::chrono::duration_cast<std::chrono::seconds>(duration).count() );
+                propout() << std::make_pair( "avg_speed", nTotalOps / std::chrono::duration_cast<std::chrono::seconds>(duration).count());
             }
 
 
index 2d7232c0e8648b3400d7d9d76df5dbe0075e85e4..20e88f13706a9945a4bd8b4f9811ab25d0c9a721 100644 (file)
@@ -72,7 +72,7 @@ namespace set {
                 , nData(0)
                 , nUpdateCall(0)
                 , bInitialized( false )
-                , threadId( cds::OS::get_current_thread_id() )
+                , threadId( cds::OS::get_current_thread_id())
             {}
 
             value( value const& s )
@@ -80,7 +80,7 @@ namespace set {
                 , nData(s.nData)
                 , nUpdateCall(s.nUpdateCall.load(atomics::memory_order_relaxed))
                 , bInitialized( s.bInitialized )
-                , threadId( cds::OS::get_current_thread_id() )
+                , threadId( cds::OS::get_current_thread_id())
                 , m_access()
             {}
 
@@ -455,7 +455,7 @@ namespace set {
 
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case insert_thread:
                     {
                         InserterThread& inserter = static_cast<InserterThread&>( thr );
@@ -494,7 +494,7 @@ namespace set {
                 << std::make_pair( "update_created", nUpdateCreated )
                 << std::make_pair( "update_modified", nUpdateModified )
                 << std::make_pair( "update_failed", nUpdateFailed )
-                << std::make_pair( "final_set_size", testSet.size() );
+                << std::make_pair( "final_set_size", testSet.size());
 
 
             EXPECT_EQ( nDelValueFailed, 0u );
@@ -511,7 +511,7 @@ namespace set {
             for ( size_t * p = m_pKeyFirst; p != m_pKeyLast; ++p )
                 testSet.erase( *p );
 
-            EXPECT_TRUE( testSet.empty() );
+            EXPECT_TRUE( testSet.empty());
             EXPECT_EQ( testSet.size(), 0u );
 
             additional_check( testSet );
index 6f1e8494999b67d400b34d30f53eed94912af0bb..6e03537dd2aa1d1c77674199d6f0c83d5c618971 100644 (file)
@@ -358,7 +358,7 @@ namespace set {
             size_t nDeleteFailed = 0;
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case insert_thread:
                     {
                         InserterThread& inserter = static_cast<InserterThread&>( thr );
@@ -383,12 +383,12 @@ namespace set {
                 << std::make_pair( "delete_success", nDeleteSuccess )
                 << std::make_pair( "insert_failed", nInsertFailed )
                 << std::make_pair( "delete_failed", nDeleteFailed )
-                << std::make_pair( "final_set_size", testSet.size() );
+                << std::make_pair( "final_set_size", testSet.size());
 
             //testSet.clear();
             for (auto const& str: m_arrString )
                 testSet.erase( str );
-            EXPECT_TRUE( testSet.empty() );
+            EXPECT_TRUE( testSet.empty());
             EXPECT_EQ( testSet.size(), 0u );
 
             additional_check( testSet );
@@ -429,7 +429,7 @@ namespace set {
             size_t nExtractFailed = 0;
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case insert_thread:
                     {
                         InserterThread& inserter = static_cast<InserterThread&>(thr);
@@ -463,12 +463,12 @@ namespace set {
                 << std::make_pair( "insert_failed",  nInsertFailed )
                 << std::make_pair( "delete_failed",  nDeleteFailed )
                 << std::make_pair( "extract_failed", nExtractFailed )
-                << std::make_pair( "final_set_size", testSet.size() );
+                << std::make_pair( "final_set_size", testSet.size());
 
             //testSet.clear();
             for ( auto const& str : m_arrString )
                 testSet.erase( str );
-            EXPECT_TRUE( testSet.empty() );
+            EXPECT_TRUE( testSet.empty());
             EXPECT_EQ( testSet.size(), 0u );
 
             additional_check( testSet );
index d1385fe79844de49a1ffbc147dc8dd46e5be2e73..127e47a235b12105edee5fc37890c5bb38cfdc61 100644 (file)
@@ -403,7 +403,7 @@ namespace set {
                 Set& rSet = m_Set;
 
                 Set_Iteration& fixture = pool().template fixture<Set_Iteration>();
-                while ( !fixture.all_modifiers_done() ) {
+                while ( !fixture.all_modifiers_done()) {
                     ++m_nPassCount;
                     typename Set::iterator it;
                     typename Set::iterator itEnd;
@@ -453,12 +453,12 @@ namespace set {
                 Set& rSet = m_Set;
 
                 Set_Iteration& fixture = pool().template fixture<Set_Iteration>();
-                while ( !fixture.all_modifiers_done() ) {
+                while ( !fixture.all_modifiers_done()) {
                     ++m_nPassCount;
                     typename Set::rcu_lock l;
                     for ( auto it = rSet.begin(); it != rSet.end(); ++it ) {
 #if CDS_BUILD_BITS == 64
-                        it->val.hash = CityHash64( it->key.c_str(), it->key.length() );
+                        it->val.hash = CityHash64( it->key.c_str(), it->key.length());
 #else
                         it->val.hash = std::hash<std::string>()(it->key);
 #endif
@@ -500,7 +500,7 @@ namespace set {
             size_t nIteratorVisitCount = 0;
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case insert_thread:
                     {
                         InserterThread& inserter = static_cast<InserterThread&>( thr );
@@ -534,10 +534,10 @@ namespace set {
                 << std::make_pair( "delete_failed", nDeleteFailed )
                 << std::make_pair( "iterator_pass_count", nIteratorPassCount )
                 << std::make_pair( "iterator_visit_count", nIteratorVisitCount )
-                << std::make_pair( "final_set_size", testSet.size() );
+                << std::make_pair( "final_set_size", testSet.size());
 
             testSet.clear();
-            EXPECT_TRUE( testSet.empty() );
+            EXPECT_TRUE( testSet.empty());
 
             additional_check( testSet );
             print_stat( propout(), testSet );
@@ -583,7 +583,7 @@ namespace set {
             size_t nIteratorVisitCount = 0;
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 cds_test::thread& thr = pool.get( i );
-                switch ( thr.type() ) {
+                switch ( thr.type()) {
                 case insert_thread:
                     {
                         InserterThread& inserter = static_cast<InserterThread&>(thr);
@@ -626,10 +626,10 @@ namespace set {
                 << std::make_pair( "extract_failed", nExtractFailed )
                 << std::make_pair( "iterator_pass_count", nIteratorPassCount )
                 << std::make_pair( "iterator_visit_count", nIteratorVisitCount )
-                << std::make_pair( "final_set_size", testSet.size() );
+                << std::make_pair( "final_set_size", testSet.size());
 
             testSet.clear();
-            EXPECT_TRUE( testSet.empty() );
+            EXPECT_TRUE( testSet.empty());
 
             additional_check( testSet );
             print_stat( propout(), testSet );
index 1023c7b81b10d38723b07ff4314ad20994bf40b9..0fa5182bb1a4e342b460bf6a16383d279b96a470 100644 (file)
@@ -63,7 +63,7 @@ namespace set {
     {
         int operator ()(Key const& k1, Key const& k2) const
         {
-            if ( less<Key>( k1, k2 ) )
+            if ( less<Key>( k1, k2 ))
                 return -1;
             return less<Key>( k2, k1 ) ? 1 : 0;
         }
index 614582b12e9c1b4c8c662417c6b18eaf49914e7a..dd76322d5f50ee65ac97139e73c91dfa5ae6427e 100644 (file)
@@ -57,7 +57,7 @@ namespace set {
         template <typename Q, typename Pred>
         bool erase_with( Q const& key, Pred /*pred*/ )
         {
-            return cuckoo_base_class::erase_with( key, typename std::conditional< cuckoo_base_class::c_isSorted, Pred, typename Pred::equal_to>::type() );
+            return cuckoo_base_class::erase_with( key, typename std::conditional< cuckoo_base_class::c_isSorted, Pred, typename Pred::equal_to>::type());
         }
 
         // for testing
@@ -202,7 +202,7 @@ namespace set {
     static inline void print_stat( cds_test::property_stream& o, CuckooSet< V, Traits > const& s )
     {
         typedef CuckooSet< V, Traits > set_type;
-        print_stat( o, static_cast<typename set_type::cuckoo_base_class const&>(s) );
+        print_stat( o, static_cast<typename set_type::cuckoo_base_class const&>(s));
     }
 
 } // namespace set
index 9ae452c51ee558861b3130e44ebd6e5f150feddc..a04ce5037e9b2fb11d4566d6644e2e788ee7a9e4 100644 (file)
@@ -286,10 +286,10 @@ namespace set {
         {
             EXPECT_EQ( stat.m_nInternalNodeCreated, stat.m_nInternalNodeDeleted );
             EXPECT_EQ( stat.m_nUpdateDescCreated, stat.m_nUpdateDescDeleted );
-            //EXPECT_EQ( ellen_bintree_pool::internal_node_counter::m_nAlloc.get(), ellen_bintree_pool::internal_node_counter::m_nFree.get() );
+            //EXPECT_EQ( ellen_bintree_pool::internal_node_counter::m_nAlloc.get(), ellen_bintree_pool::internal_node_counter::m_nFree.get());
             EXPECT_EQ( ellen_bintree_pool::internal_node_counter::m_nAlloc.get(), stat.m_nInternalNodeCreated );
             // true if RCU is not threaded
-            //EXPECT_EQ( stat.m_nInternalNodeDeleted, ellen_bintree_pool::internal_node_counter::m_nFree.get() );
+            //EXPECT_EQ( stat.m_nInternalNodeDeleted, ellen_bintree_pool::internal_node_counter::m_nFree.get());
         }
     }   // namespace ellen_bintree_check
 
@@ -320,7 +320,7 @@ namespace set {
     template <typename GC, typename Key, typename T, typename Traits>
     static inline void check_before_clear( cds::container::EllenBinTreeSet<GC, Key, T, Traits>& s )
     {
-        EXPECT_TRUE( s.check_consistency() );
+        EXPECT_TRUE( s.check_consistency());
     }
 } // namespace set
 
index 8e20b1bad628505295513de71e7fd6c2a249f8fe..44c3ddf4c806bdb4c569387295b3c2c7c0402ade 100644 (file)
@@ -83,13 +83,13 @@ namespace set {
         template <typename Q>
         extracted_ptr extract(Q const& key)
         {
-            return base_class::extract( hasher()(key) );
+            return base_class::extract( hasher()(key));
         }
 
         template <typename Q>
         bool contains( Q const& key )
         {
-            return base_class::contains( hasher()(key) );
+            return base_class::contains( hasher()(key));
         }
 
         // for testing
index 68b55b4864e9484910afb3607739b4350a8e3d83..54e265c96a0f1ed615fcfa3f60ea772093155baa 100644 (file)
@@ -73,7 +73,7 @@ namespace set {
         bool contains( const Key& key )
         {
             scoped_lock al( m_lock );
-            return base_class::find( value_type(key) ) != base_class::end();
+            return base_class::find( value_type(key)) != base_class::end();
         }
 
         template <typename Key>
@@ -115,15 +115,15 @@ namespace set {
         bool erase( const Key& key )
         {
             scoped_lock al( m_lock );
-            return base_class::erase( value_type(key) ) != 0;
+            return base_class::erase( value_type(key)) != 0;
         }
 
         template <typename T, typename Func>
         bool erase( const T& key, Func func )
         {
             scoped_lock al( m_lock );
-            typename base_class::iterator it = base_class::find( value_type(key) );
-            if ( it != base_class::end() ) {
+            typename base_class::iterator it = base_class::find( value_type(key));
+            if ( it != base_class::end()) {
                 func( *it );
                 return base_class::erase( it ) != base_class::end();
             }
@@ -201,15 +201,15 @@ namespace set {
         bool erase( const Key& key )
         {
             scoped_lock al( m_lock );
-            return base_class::erase( value_type(key) ) != 0;
+            return base_class::erase( value_type(key)) != 0;
         }
 
         template <typename T, typename Func>
         bool erase( const T& key, Func func )
         {
             scoped_lock al( m_lock );
-            typename base_class::iterator it = base_class::find( value_type(key) );
-            if ( it != base_class::end() ) {
+            typename base_class::iterator it = base_class::find( value_type(key));
+            if ( it != base_class::end()) {
                 func( *it );
 
                 base_class::erase( it );
index 2da0665f18c345be56bac6f2fcb24443449af0d1..94268f11c726fcf361fd47cdbf6baa9174baa259 100644 (file)
@@ -89,7 +89,7 @@ namespace set {
         public:
             template <class Config>
             StripedHashSet_seq( Config const& cfg )
-                : base_class( cfg.s_nSetSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nLoadFactor )) )
+                : base_class( cfg.s_nSetSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nLoadFactor )))
             {}
 
             empty_stat statistics() const
@@ -130,7 +130,7 @@ namespace set {
         public:
             template <class Config>
             StripedHashSet_seq_rational( Config const& cfg ) // LoadFactor = 1 / nDenominator
-                : base_class( cfg.s_nSetSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( 1, cfg.s_nLoadFactor )) )
+                : base_class( cfg.s_nSetSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( 1, cfg.s_nLoadFactor )))
             {}
 
             empty_stat statistics() const
@@ -172,7 +172,7 @@ namespace set {
         public:
             template <class Config>
             StripedHashSet_ord( Config const& cfg )
-                : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )) )
+                : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )))
             {}
 
             empty_stat statistics() const
@@ -369,7 +369,7 @@ namespace set {
         public:
             template <class Config>
             RefinableHashSet_seq( Config const& cfg )
-                : base_class( cfg.s_nSetSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nLoadFactor )) )
+                : base_class( cfg.s_nSetSize / cfg.s_nLoadFactor / 16, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nLoadFactor )))
             {}
 
             empty_stat statistics() const
@@ -442,7 +442,7 @@ namespace set {
         public:
             template <class Config>
             RefinableHashSet_ord( Config const& cfg )
-                : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )) )
+                : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( cfg.s_nMaxLoadFactor * 1024 )))
             {}
 
             empty_stat statistics() const
index 10ab177c8358600922e379c7535363dc44387ad8..da9f083a3cfcc5f46643092013432f04e822ebc3 100644 (file)
@@ -89,9 +89,9 @@ namespace {
         {
             EXPECT_EQ( s.m_PushCount.get() + s.m_ActivePushCollision.get() + s.m_PassivePushCollision.get(), s_nStackSize );
             EXPECT_EQ( s.m_PopCount.get() + s.m_ActivePopCollision.get() + s.m_PassivePopCollision.get(), s_nStackSize );
-            EXPECT_EQ( s.m_PushCount.get(), s.m_PopCount.get() );
-            EXPECT_EQ( s.m_ActivePopCollision.get(), s.m_PassivePushCollision.get() );
-            EXPECT_EQ( s.m_ActivePushCollision.get(), s.m_PassivePopCollision.get() );
+            EXPECT_EQ( s.m_PushCount.get(), s.m_PopCount.get());
+            EXPECT_EQ( s.m_ActivePopCollision.get(), s.m_PassivePushCollision.get());
+            EXPECT_EQ( s.m_ActivePushCollision.get(), s.m_PassivePopCollision.get());
         }
 
         template <typename Stack>
@@ -101,7 +101,7 @@ namespace {
             {
                 Stack stack( s_nEliminationSize );
                 do_test( stack, arrValue );
-                check_elimination_stat( stack.statistics() );
+                check_elimination_stat( stack.statistics());
             }
             Stack::gc::force_dispose();
         }
index 0fb9fcf3b5e62e7d3151ae81648bf33aeeb2708d..d835d621fba9bb40800190ed4ea8e9526fbfab34 100644 (file)
@@ -61,7 +61,7 @@ namespace {
                 }
             }
 
-            if ( args.empty() ) {
+            if ( args.empty()) {
                 if ( nFCCompactFactor && nFCCombinePassCount )
                     args.push_back( { nFCCompactFactor, nFCCombinePassCount } );
                 else
index 168bb8b53871b81846e6464220ca2ebaf25056ae..4a2c33a2444fb56a440a1a49154430cca356ea1c 100644 (file)
@@ -107,14 +107,14 @@ namespace cds_test {
             virtual void test()
             {
                 m_nPushError = 0;
-                memset( m_arrPush, 0, sizeof( m_arrPush ) );
+                memset( m_arrPush, 0, sizeof( m_arrPush ));
 
                 size_t i = 0;
                 for ( typename Stack::value_type * p = m_pStart; p < m_pEnd; ++p, ++i ) {
                     p->nProducer = id();
                     size_t no;
                     p->nNo.store( no = i % c_nValArraySize, atomics::memory_order_release );
-                    if ( m_Stack.push( *p ) )
+                    if ( m_Stack.push( *p ))
                         ++m_arrPush[no];
                     else
                         ++m_nPushError;
@@ -161,15 +161,15 @@ namespace cds_test {
                 m_nPopEmpty = 0;
                 m_nPopCount = 0;
                 m_nDirtyPop = 0;
-                memset( m_arrPop, 0, sizeof( m_arrPop ) );
+                memset( m_arrPop, 0, sizeof( m_arrPop ));
 
-                while ( !(s_nWorkingProducers.load( atomics::memory_order_acquire ) == 0 && m_Stack.empty()) ) {
+                while ( !(s_nWorkingProducers.load( atomics::memory_order_acquire ) == 0 && m_Stack.empty())) {
                     typename Stack::value_type * p = m_Stack.pop();
                     if ( p ) {
                         p->nConsumer = id();
                         ++m_nPopCount;
                         size_t no = p->nNo.load( atomics::memory_order_acquire );
-                        if ( no < sizeof( m_arrPop ) / sizeof( m_arrPop[0] ) )
+                        if ( no < sizeof( m_arrPop ) / sizeof( m_arrPop[0] ))
                             ++m_arrPop[no];
                         else
                             ++m_nDirtyPop;
@@ -207,7 +207,7 @@ namespace cds_test {
             size_t nPopEmpty = 0;
             size_t nPopCount = 0;
             size_t arrVal[c_nValArraySize];
-            memset( arrVal, 0, sizeof( arrVal ) );
+            memset( arrVal, 0, sizeof( arrVal ));
             size_t nDirtyPop = 0;
 
             for ( size_t threadNo = 0; threadNo < pool.size(); ++threadNo ) {
index 078dc6784826f6c78109cb1e936f4d445985cf29..308237f60adaa2e86650f4fcf2be5f3e4b519195 100644 (file)
@@ -74,7 +74,7 @@ namespace istack {
             T * pop()
             {
                 unique_lock l( m_Lock );
-                if ( !m_Impl.empty() ) {
+                if ( !m_Impl.empty()) {
                      T * v = m_Impl.top();
                     m_Impl.pop();
                     return v;
index 6ef3dee09ae2a821963209b91856add1d3ecc236..0a7c30e4ac79bd8a36eebefd3ddfc91aa2cd5ddd 100644 (file)
@@ -86,7 +86,7 @@ namespace {
                 value_type v;
                 v.nThread = id();
                 for ( v.nNo = m_nStartItem; v.nNo < m_nEndItem; ++v.nNo ) {
-                    if ( !m_stack.push( v ) )
+                    if ( !m_stack.push( v ))
                         ++m_nPushError;
                 }
             }
@@ -145,7 +145,7 @@ namespace {
         void test_elimination( Stack& stack )
         {
             test( stack );
-            check_elimination_stat( stack.statistics() );
+            check_elimination_stat( stack.statistics());
         }
 
         void check_elimination_stat( cds::container::treiber_stack::empty_stat const& )
@@ -153,7 +153,7 @@ namespace {
 
         void check_elimination_stat( cds::container::treiber_stack::stat<> const& s )
         {
-            EXPECT_EQ( s.m_PushCount.get(), s.m_PopCount.get() );
+            EXPECT_EQ( s.m_PushCount.get(), s.m_PopCount.get());
         }
 
         template <class Stack>
index 1246ea44b8bfd0d10eea4a9da7850e04d8d9dfed..83acfb71a1ac0327514de78a99fc605a35b68d5c 100644 (file)
@@ -91,13 +91,13 @@ namespace {
 
             virtual void test()
             {
-                memset( m_arrPush, 0, sizeof( m_arrPush ) );
+                memset( m_arrPush, 0, sizeof( m_arrPush ));
 
                 value_type v;
                 v.nThread = id();
                 for ( size_t i = 0; i < m_nItemCount; ++i ) {
                     v.nNo = i % c_nValArraySize;
-                    if ( m_stack.push( v ) )
+                    if ( m_stack.push( v ))
                         ++m_arrPush[v.nNo];
                     else
                         ++m_nPushError;
@@ -142,13 +142,13 @@ namespace {
 
             virtual void test()
             {
-                memset( m_arrPop, 0, sizeof( m_arrPop ) );
+                memset( m_arrPop, 0, sizeof( m_arrPop ));
 
                 value_type v;
-                while ( !( s_nWorkingProducers.load( atomics::memory_order_acquire ) == 0 && m_stack.empty()) ) {
-                    if ( m_stack.pop( v ) ) {
+                while ( !( s_nWorkingProducers.load( atomics::memory_order_acquire ) == 0 && m_stack.empty())) {
+                    if ( m_stack.pop( v )) {
                         ++m_nPopCount;
-                        if ( v.nNo < sizeof( m_arrPop ) / sizeof( m_arrPop[0] ) )
+                        if ( v.nNo < sizeof( m_arrPop ) / sizeof( m_arrPop[0] ))
                             ++m_arrPop[v.nNo];
                         else
                             ++m_nDirtyPop;
@@ -214,7 +214,7 @@ namespace {
         void test_elimination( Stack& stack )
         {
             test( stack );
-            check_elimination_stat( stack.statistics() );
+            check_elimination_stat( stack.statistics());
         }
 
         void check_elimination_stat( cds::container::treiber_stack::empty_stat const& )
@@ -224,9 +224,9 @@ namespace {
         {
             EXPECT_EQ( s.m_PushCount.get() + s.m_ActivePushCollision.get() + s.m_PassivePushCollision.get(), s_nStackSize );
             EXPECT_EQ( s.m_PopCount.get() + s.m_ActivePopCollision.get() + s.m_PassivePopCollision.get(), s_nStackSize );
-            EXPECT_EQ( s.m_PushCount.get(), s.m_PopCount.get() );
-            EXPECT_EQ( s.m_ActivePopCollision.get(), s.m_PassivePushCollision.get() );
-            EXPECT_EQ( s.m_ActivePushCollision.get(), s.m_PassivePopCollision.get() );
+            EXPECT_EQ( s.m_PushCount.get(), s.m_PopCount.get());
+            EXPECT_EQ( s.m_ActivePopCollision.get(), s.m_PassivePushCollision.get());
+            EXPECT_EQ( s.m_ActivePushCollision.get(), s.m_PassivePopCollision.get());
         }
 
         template< class Stack>
@@ -238,7 +238,7 @@ namespace {
             size_t nPopEmpty = 0;
             size_t nPopCount = 0;
             size_t arrVal[c_nValArraySize];
-            memset( arrVal, 0, sizeof( arrVal ) );
+            memset( arrVal, 0, sizeof( arrVal ));
             size_t nDirtyPop = 0;
 
             for ( size_t threadNo = 0; threadNo < pool.size(); ++threadNo ) {
index be262c885aa82e2e148de628332c9aded19d154c..5c1dff20187afdaafd085305b979f852d95aadd0 100644 (file)
@@ -123,7 +123,7 @@ namespace stack {
             bool pop( T& v )
             {
                 unique_lock l( m_Lock );
-                if ( !m_Impl.empty() ) {
+                if ( !m_Impl.empty()) {
                     v = m_Impl.top();
                     m_Impl.pop();
                     return true;
index 3968f0cb8b5c42599a93bdfd832550af839274eb..d8e5b367867254c707baa651f8893ebd4d3a6811 100644 (file)
@@ -44,13 +44,13 @@ namespace {
 
             // push_front/pop_front
             for ( int i = 0; i < static_cast<int>( c_nSize ); ++i )
-                EXPECT_TRUE( dq.push_front( i ) );
+                EXPECT_TRUE( dq.push_front( i ));
             EXPECT_EQ( dq.size(), c_nSize );
 
             size_t nCount = 0;
             int val;
-            while ( !dq.empty() ) {
-                EXPECT_TRUE( dq.pop_front( val ) );
+            while ( !dq.empty()) {
+                EXPECT_TRUE( dq.pop_front( val ));
                 ++nCount;
                 EXPECT_EQ( static_cast<int>(c_nSize - nCount), val );
             }
@@ -58,12 +58,12 @@ namespace {
 
             // push_back/pop_back
             for ( int i = 0; i < static_cast<int>( c_nSize ); ++i )
-                EXPECT_TRUE( dq.push_back( i ) );
+                EXPECT_TRUE( dq.push_back( i ));
             EXPECT_EQ( dq.size(), c_nSize );
 
             nCount = 0;
-            while ( !dq.empty() ) {
-                EXPECT_TRUE( dq.pop_back( val ) );
+            while ( !dq.empty()) {
+                EXPECT_TRUE( dq.pop_back( val ));
                 ++nCount;
                 EXPECT_EQ( static_cast<int>(c_nSize - nCount), val );
             }
@@ -71,12 +71,12 @@ namespace {
 
             // push_back/pop_front
             for ( int i = 0; i < static_cast<int>( c_nSize ); ++i )
-                EXPECT_TRUE( dq.push_back( i ) );
+                EXPECT_TRUE( dq.push_back( i ));
             EXPECT_EQ( dq.size(), c_nSize );
 
             nCount = 0;
-            while ( !dq.empty() ) {
-                EXPECT_TRUE( dq.pop_front( val ) );
+            while ( !dq.empty()) {
+                EXPECT_TRUE( dq.pop_front( val ));
                 EXPECT_EQ( static_cast<int>( nCount ), val );
                 ++nCount;
             }
@@ -84,12 +84,12 @@ namespace {
 
             // push_front/pop_back
             for ( int i = 0; i < static_cast<int>( c_nSize ); ++i )
-                EXPECT_TRUE( dq.push_front( i ) );
+                EXPECT_TRUE( dq.push_front( i ));
             EXPECT_EQ( dq.size(), c_nSize );
 
             nCount = 0;
-            while ( !dq.empty() ) {
-                EXPECT_TRUE( dq.pop_back( val ) );
+            while ( !dq.empty()) {
+                EXPECT_TRUE( dq.pop_back( val ));
                 EXPECT_EQ( static_cast<int>( nCount ), val );
                 ++nCount;
             }
@@ -97,12 +97,12 @@ namespace {
 
             // clear
             for ( int i = 0; i < static_cast<int>( c_nSize ); ++i )
-                EXPECT_TRUE( dq.push_front( i ) );
+                EXPECT_TRUE( dq.push_front( i ));
             EXPECT_EQ( dq.size(), c_nSize );
 
-            EXPECT_FALSE( dq.empty() );
+            EXPECT_FALSE( dq.empty());
             dq.clear();
-            EXPECT_TRUE( dq.empty() );
+            EXPECT_TRUE( dq.empty());
         }
     };
 
index 278b16cacf8780762cd8862c53ed7ecc5770d309..5d45600d599b34e39aa1c25d955855bf34bf41c8 100644 (file)
@@ -62,7 +62,7 @@ namespace cds_test {
 
             stat& operator =( const stat& s )
             {
-                memcpy( this, &s, sizeof( s ) );
+                memcpy( this, &s, sizeof( s ));
                 return *this;
             }
         };
@@ -150,7 +150,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -166,7 +166,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()( const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -232,7 +232,7 @@ namespace cds_test {
             shuffle( arr, arr + nSize );
             shuffle( arr2, arr2 + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             typedef typename List::iterator iterator;
@@ -293,7 +293,7 @@ namespace cds_test {
                 EXPECT_TRUE( l.contains( i.nKey ));
                 EXPECT_TRUE( l.contains( i ));
                 EXPECT_TRUE( l.contains( other_item( i.nKey ), other_less()));
-                EXPECT_FALSE( l.find( i.nKey ) == l.end() );
+                EXPECT_FALSE( l.find( i.nKey ) == l.end());
                 EXPECT_TRUE( l.find( i.nKey, []( value_type& item, int ) { ++item.s.nFindCall; } ));
                 EXPECT_EQ( i.s.nFindCall, 1 );
                 EXPECT_TRUE( l.find( i, []( value_type& item, value_type const& ) { ++item.s.nFindCall; } ));
@@ -301,27 +301,27 @@ namespace cds_test {
                 EXPECT_TRUE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
                 EXPECT_EQ( i.s.nFindCall, 3 );
 
-                EXPECT_FALSE( l.insert( i ) );
-                ASSERT_FALSE( l.empty() );
+                EXPECT_FALSE( l.insert( i ));
+                ASSERT_FALSE( l.empty());
 
                 int const ckey = i.nKey;
                 iterator it = l.find( ckey );
-                ASSERT_FALSE( it == l.end() );
+                ASSERT_FALSE( it == l.end());
                 EXPECT_EQ( it->nKey, i.nKey );
                 EXPECT_EQ( (*it).nVal, i.nVal );
-                check_ordered( it, l.end() );
+                check_ordered( it, l.end());
 
                 it = l.find( i.nKey );
-                ASSERT_FALSE( it == l.end() );
+                ASSERT_FALSE( it == l.end());
                 EXPECT_EQ( it->nKey, i.nKey );
                 EXPECT_EQ( (*it).nVal, i.nVal );
-                check_ordered( it, l.end() );
+                check_ordered( it, l.end());
 
-                it = l.find_with( other_item( i.nKey ), other_less() );
-                ASSERT_FALSE( it == l.end() );
+                it = l.find_with( other_item( i.nKey ), other_less());
+                ASSERT_FALSE( it == l.end());
                 EXPECT_EQ( it->nKey, i.nKey );
                 EXPECT_EQ( it->nVal, i.nVal );
-                check_ordered( it, l.end() );
+                check_ordered( it, l.end());
 
             }
             ASSERT_CONTAINER_SIZE( l, nSize );
@@ -338,13 +338,13 @@ namespace cds_test {
                 EXPECT_TRUE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
                 EXPECT_EQ( i.s.nFindCall, 6 );
             }
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             ASSERT_CONTAINER_SIZE( l, nSize );
 
             // update existing test
             for ( auto& i : arr2 ) {
                 EXPECT_EQ( i.s.nUpdateExistsCall, 0 );
-                std::pair<bool, bool> ret = l.update( i, update_functor() );
+                std::pair<bool, bool> ret = l.update( i, update_functor());
                 EXPECT_TRUE( ret.first );
                 EXPECT_FALSE( ret.second );
                 EXPECT_EQ( i.s.nUpdateExistsCall, 1 );
@@ -353,7 +353,7 @@ namespace cds_test {
             // update with the same value must be empty - no functor is called
             for ( auto& i : arr2 ) {
                 EXPECT_EQ( i.s.nUpdateExistsCall, 1 );
-                std::pair<bool, bool> ret = l.update( i, update_functor() );
+                std::pair<bool, bool> ret = l.update( i, update_functor());
                 EXPECT_TRUE( ret.first );
                 EXPECT_FALSE( ret.second );
                 EXPECT_EQ( i.s.nUpdateExistsCall, 1 );
@@ -379,11 +379,11 @@ namespace cds_test {
                 if ( i.nKey & 1 )
                     EXPECT_TRUE( l.erase( i.nKey ));
                 else
-                    EXPECT_TRUE( l.erase_with( other_item( i.nKey ), other_less() ));
+                    EXPECT_TRUE( l.erase_with( other_item( i.nKey ), other_less()));
 
                 EXPECT_FALSE( l.contains( i ));
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
@@ -407,7 +407,7 @@ namespace cds_test {
                 EXPECT_TRUE( ret.second );
                 EXPECT_EQ( i.s.nUpdateNewCall, updateNewCall + 1 );
             }
-            EXPECT_FALSE( l.empty() );
+            EXPECT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             for ( auto const& i : arr ) {
@@ -423,7 +423,7 @@ namespace cds_test {
                 EXPECT_EQ( i.s.nEraseCall, 1 );
                 EXPECT_FALSE( l.contains( i.nKey ));
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
@@ -436,12 +436,12 @@ namespace cds_test {
             for ( auto& i : arr )
                 EXPECT_TRUE( l.insert( i ));
 
-            EXPECT_FALSE( l.empty() );
+            EXPECT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             l.clear();
 
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
@@ -453,24 +453,24 @@ namespace cds_test {
 
             // unlink test
             for ( auto& i : arr )
-                EXPECT_TRUE( l.insert( i ) );
+                EXPECT_TRUE( l.insert( i ));
             for ( auto& i : arr ) {
                 value_type val( i );
                 EXPECT_TRUE( l.contains( val ));
                 EXPECT_FALSE( l.unlink( val ));
-                EXPECT_TRUE( l.contains( val ) );
+                EXPECT_TRUE( l.contains( val ));
                 EXPECT_TRUE( l.unlink( i ));
                 EXPECT_FALSE( l.unlink( i ));
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 5 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
 
             // Iterators on empty list
@@ -509,11 +509,11 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
-                EXPECT_TRUE( l.insert( i ) );
+                EXPECT_TRUE( l.insert( i ));
 
             int key = 0;
             for ( auto it = l.begin(); it != l.end(); ++it ) {
@@ -533,7 +533,7 @@ namespace cds_test {
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 1 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
         }
 
index f3faa2246e34f0e84a8915524298e371bd7cb1d9..1a7983ff860f820698f96731c3143354e4189914 100644 (file)
@@ -55,7 +55,7 @@ namespace cds_test {
 
             typedef typename List::guarded_ptr guarded_ptr;
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             guarded_ptr gp;
@@ -64,16 +64,16 @@ namespace cds_test {
             for ( auto& i : arr ) {
                 gp = l.get( i.nKey );
                 EXPECT_TRUE( !gp );
-                gp = l.get_with( other_item( i.nKey ), other_less() );
+                gp = l.get_with( other_item( i.nKey ), other_less());
                 EXPECT_TRUE( !gp );
 
-                EXPECT_TRUE( l.insert( i ) );
+                EXPECT_TRUE( l.insert( i ));
 
                 gp = l.get( i.nKey );
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->nKey, i.nKey );
                 EXPECT_EQ( gp->nVal, i.nVal );
-                gp = l.get_with( other_item( i.nKey ), other_less() );
+                gp = l.get_with( other_item( i.nKey ), other_less());
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->nKey, i.nKey );
                 EXPECT_EQ( gp->nVal, i.nVal );
@@ -84,23 +84,23 @@ namespace cds_test {
                 if ( i & 1 )
                     gp = l.extract( i );
                 else
-                    gp = l.extract_with( other_item( i ), other_less() );
+                    gp = l.extract_with( other_item( i ), other_less());
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->nKey, i );
 
                 gp = l.extract( i );
                 EXPECT_TRUE( !gp );
-                gp = l.extract_with( other_item( i ), other_less() );
+                gp = l.extract_with( other_item( i ), other_less());
                 EXPECT_TRUE( !gp );
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 1 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
         }
     };
index dae49ae01a9ef59ed976f0f1ad65b9ca9b1cc7e3..563fb70de64955204a96c653a81030445ffe9865 100644 (file)
@@ -62,7 +62,7 @@ namespace cds_test {
 
             stat& operator =( const stat& s )
             {
-                memcpy( this, &s, sizeof( s ) );
+                memcpy( this, &s, sizeof( s ));
                 return *this;
             }
         };
@@ -194,7 +194,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -210,7 +210,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()( const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -272,7 +272,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             // insert / find
@@ -302,8 +302,8 @@ namespace cds_test {
                 EXPECT_TRUE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
                 EXPECT_EQ( i.s.nFindCall, 3 );
 
-                EXPECT_FALSE( l.insert( i ) );
-                ASSERT_FALSE( l.empty() );
+                EXPECT_FALSE( l.insert( i ));
+                ASSERT_FALSE( l.empty());
             }
             ASSERT_CONTAINER_SIZE( l, nSize );
 
@@ -319,13 +319,13 @@ namespace cds_test {
                 EXPECT_TRUE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
                 EXPECT_EQ( i.s.nFindCall, 6 );
             }
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             ASSERT_CONTAINER_SIZE( l, nSize );
 
             // update existing test
             for ( auto& i : arr ) {
                 EXPECT_EQ( i.s.nUpdateExistsCall, 0 );
-                std::pair<bool, bool> ret = l.update( i, update_functor() );
+                std::pair<bool, bool> ret = l.update( i, update_functor());
                 EXPECT_TRUE( ret.first );
                 EXPECT_FALSE( ret.second );
                 EXPECT_EQ( i.s.nUpdateExistsCall, 1 );
@@ -346,11 +346,11 @@ namespace cds_test {
                 if ( i.nKey & 1 )
                     EXPECT_TRUE( l.erase( i.nKey ));
                 else
-                    EXPECT_TRUE( l.erase_with( other_item( i.nKey ), other_less() ));
+                    EXPECT_TRUE( l.erase_with( other_item( i.nKey ), other_less()));
 
                 EXPECT_FALSE( l.contains( i ));
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
@@ -370,7 +370,7 @@ namespace cds_test {
                 EXPECT_TRUE( ret.second );
                 EXPECT_EQ( i.s.nUpdateNewCall, 1 );
             }
-            EXPECT_FALSE( l.empty() );
+            EXPECT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             for ( auto const& i : arr ) {
@@ -386,7 +386,7 @@ namespace cds_test {
                 EXPECT_EQ( i.s.nEraseCall, 1 );
                 EXPECT_FALSE( l.contains( i.nKey ));
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
@@ -399,12 +399,12 @@ namespace cds_test {
             for ( auto& i : arr )
                 EXPECT_TRUE( l.insert( i ));
 
-            EXPECT_FALSE( l.empty() );
+            EXPECT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             l.clear();
 
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
@@ -416,24 +416,24 @@ namespace cds_test {
 
             // unlink test
             for ( auto& i : arr )
-                EXPECT_TRUE( l.insert( i ) );
+                EXPECT_TRUE( l.insert( i ));
             for ( auto& i : arr ) {
                 value_type val( i );
                 EXPECT_TRUE( l.contains( val ));
                 EXPECT_FALSE( l.unlink( val ));
-                EXPECT_TRUE( l.contains( val ) );
+                EXPECT_TRUE( l.contains( val ));
                 EXPECT_TRUE( l.unlink( i ));
                 EXPECT_FALSE( l.unlink( i ));
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 4 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
 
             // Iterators on empty list
@@ -472,11 +472,11 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
-                EXPECT_TRUE( l.insert( i ) );
+                EXPECT_TRUE( l.insert( i ));
 
             int key = 0;
             for ( auto it = l.begin(); it != l.end(); ++it ) {
@@ -496,7 +496,7 @@ namespace cds_test {
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 1 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
         }
     };
index 0d3936a2717ca9735c90f8e5f42b98fd4f51756a..dab47f1304b47b583ef749243da937c8da8f2d37 100644 (file)
@@ -55,7 +55,7 @@ namespace cds_test {
 
             typedef typename List::guarded_ptr guarded_ptr;
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             guarded_ptr gp;
@@ -73,7 +73,7 @@ namespace cds_test {
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->nKey, i.nKey );
                 EXPECT_EQ( gp->nVal, i.nVal );
-                gp = l.get_with( other_item( i.nKey ), other_less() );
+                gp = l.get_with( other_item( i.nKey ), other_less());
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->nKey, i.nKey );
                 EXPECT_EQ( gp->nVal, i.nVal );
@@ -90,17 +90,17 @@ namespace cds_test {
 
                 gp = l.extract( i );
                 EXPECT_TRUE( !gp );
-                gp = l.extract_with( other_item( i ), other_less() );
+                gp = l.extract_with( other_item( i ), other_less());
                 EXPECT_TRUE( !gp );
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 1 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
         }
     };
index d1aa273e807ee9534c61ac19133fda58c426c132..69f636f320eec299fd8b460683840b98c14fb099 100644 (file)
@@ -58,7 +58,7 @@ namespace cds_test {
 
             stat& operator =( const stat& s )
             {
-                memcpy( this, &s, sizeof( s ) );
+                memcpy( this, &s, sizeof( s ));
                 return *this;
             }
         };
@@ -190,7 +190,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -206,7 +206,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()( const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -277,7 +277,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             // insert / find
@@ -301,8 +301,8 @@ namespace cds_test {
                 EXPECT_TRUE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
                 EXPECT_EQ( i.s.nFindCall, 3 );
 
-                EXPECT_FALSE( l.insert( i ) );
-                ASSERT_FALSE( l.empty() );
+                EXPECT_FALSE( l.insert( i ));
+                ASSERT_FALSE( l.empty());
             }
             ASSERT_CONTAINER_SIZE( l, nSize );
 
@@ -318,13 +318,13 @@ namespace cds_test {
                 EXPECT_TRUE( l.find_with( other_item( i.nKey ), other_less(), []( value_type& item, other_item const& ) { ++item.s.nFindCall; } ));
                 EXPECT_EQ( i.s.nFindCall, 6 );
             }
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             ASSERT_CONTAINER_SIZE( l, nSize );
 
             // update existing test
             for ( auto& i : arr ) {
                 EXPECT_EQ( i.s.nUpdateExistsCall, 0 );
-                std::pair<bool, bool> ret = l.update( i, update_functor() );
+                std::pair<bool, bool> ret = l.update( i, update_functor());
                 EXPECT_TRUE( ret.first );
                 EXPECT_FALSE( ret.second );
                 EXPECT_EQ( i.s.nUpdateExistsCall, 1 );
@@ -342,14 +342,14 @@ namespace cds_test {
 
             // clear() test
             l.clear();
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 1 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
 
 
@@ -364,12 +364,12 @@ namespace cds_test {
                 EXPECT_EQ( i.s.nUpdateNewCall, 1 );
             }
 
-            EXPECT_FALSE( l.empty() );
+            EXPECT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             l.clear( mock_disposer2());
 
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // Apply retired pointer to clean links
@@ -415,11 +415,11 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
-                EXPECT_TRUE( l.insert( i ) );
+                EXPECT_TRUE( l.insert( i ));
 
             int key = 0;
             for ( auto it = l.begin(); it != l.end(); ++it ) {
@@ -439,7 +439,7 @@ namespace cds_test {
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 1 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
         }
 
@@ -459,11 +459,11 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
-                EXPECT_TRUE( l.insert( i ) );
+                EXPECT_TRUE( l.insert( i ));
 
             size_t idx = 0;
             for ( auto it = l.begin(); it != l.end(); ++it, ++idx ) {
@@ -483,7 +483,7 @@ namespace cds_test {
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 1 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
         }
     };
index ecc764de85345b81f171297b6b13a938763fa03d..ac2a4e3ae109d52e93f8f4221668d395d48ad99a 100644 (file)
@@ -57,7 +57,7 @@ namespace cds_test {
             typedef typename List::raw_ptr    raw_ptr;
             typedef typename List::rcu_lock   rcu_lock;
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             // get() test
@@ -81,7 +81,7 @@ namespace cds_test {
                 }
                 {
                     rcu_lock lock;
-                    raw_ptr rp = l.get_with( other_item( i.nKey ), other_less() );
+                    raw_ptr rp = l.get_with( other_item( i.nKey ), other_less());
                     ASSERT_FALSE( !rp );
                     EXPECT_EQ( rp->nKey, i.nKey );
                     EXPECT_EQ( rp->nVal, i.nVal );
@@ -109,7 +109,7 @@ namespace cds_test {
 
                         gp = l.extract( i );
                         EXPECT_TRUE( !gp );
-                        gp = l.extract_with( other_item( i ), other_less() );
+                        gp = l.extract_with( other_item( i ), other_less());
                         EXPECT_TRUE( !gp );
                     }
                 }
@@ -119,24 +119,24 @@ namespace cds_test {
                     if ( i & 1 )
                         gp = l.extract( i );
                     else
-                        gp = l.extract_with( other_item( i ), other_less() );
+                        gp = l.extract_with( other_item( i ), other_less());
                     ASSERT_FALSE( !gp );
                     EXPECT_EQ( gp->nKey, i );
 
                     gp = l.extract( i );
                     EXPECT_TRUE( !gp );
-                    gp = l.extract_with( other_item( i ), other_less() );
+                    gp = l.extract_with( other_item( i ), other_less());
                     EXPECT_TRUE( !gp );
                 }
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             List::gc::force_dispose();
             for ( auto const& i : arr ) {
                 EXPECT_EQ( i.s.nDisposeCount, 1 );
-                EXPECT_FALSE( l.contains( i ) );
+                EXPECT_FALSE( l.contains( i ));
             }
         }
     };
index 476a2417d6b6e4b6f774155738bc124b5292f988..c0e16d23f529e79c89236363d217d3432df9a9ce 100644 (file)
@@ -59,7 +59,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -153,9 +153,9 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
-            size_t const nSetSize = std::max( s.head_size() * 2, static_cast<size_t>(100) );
+            size_t const nSetSize = std::max( s.head_size() * 2, static_cast<size_t>(100));
 
             typedef typename Set::value_type value_type;
 
@@ -167,7 +167,7 @@ namespace cds_test {
                 data.push_back( value_type( static_cast<int>( key )));
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
@@ -194,7 +194,7 @@ namespace cds_test {
                     EXPECT_EQ( i.nInsertCount, 0u );
                     ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nInsertCount;} ));
                     EXPECT_EQ( i.nInsertCount, 1u );
-                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nInsertCount;} ) );
+                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nInsertCount;} ));
                     EXPECT_EQ( i.nInsertCount, 1u );
                     i.nInsertCount = 0;
                     break;
@@ -205,12 +205,12 @@ namespace cds_test {
                     break;
                 }
 
-                ASSERT_TRUE( s.contains( i.nKey ) );
+                ASSERT_TRUE( s.contains( i.nKey ));
                 EXPECT_EQ( i.nFindCount, 0u );
                 ASSERT_TRUE( s.find( i.nKey, []( value_type& v ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 1u );
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             std::for_each( data.begin(), data.end(), []( value_type& v ) { v.clear_stat(); });
@@ -223,13 +223,13 @@ namespace cds_test {
             }
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[ idx ];
 
-                ASSERT_TRUE( s.contains( i.nKey ) );
+                ASSERT_TRUE( s.contains( i.nKey ));
                 EXPECT_EQ( i.nFindCount, 0u );
-                ASSERT_TRUE( s.find( i.nKey, []( value_type& v ) { ++v.nFindCount; } ) );
+                ASSERT_TRUE( s.find( i.nKey, []( value_type& v ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 1u );
 
                 value_type v( i );
@@ -237,11 +237,11 @@ namespace cds_test {
                 case 0:
                     ASSERT_FALSE( s.unlink( v ));
                     ASSERT_TRUE( s.unlink( i ));
-                    ASSERT_FALSE( s.unlink( i ) );
+                    ASSERT_FALSE( s.unlink( i ));
                     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 );
@@ -255,7 +255,7 @@ namespace cds_test {
                 ASSERT_FALSE( s.contains( i.nKey ));
                 ASSERT_FALSE( s.find( i.nKey, []( value_type const& ) {} ));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // Force retiring cycle
@@ -269,7 +269,7 @@ namespace cds_test {
                 i.clear_stat();
                 ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // Forward iterator test
@@ -297,8 +297,8 @@ namespace cds_test {
 
             ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
-            ASSERT_TRUE( s.begin() == s.end() );
-            ASSERT_TRUE( s.cbegin() == s.cend() );
+            ASSERT_TRUE( s.begin() == s.end());
+            ASSERT_TRUE( s.cbegin() == s.cend());
 
             // Force retiring cycle
             Set::gc::force_dispose();
index 9036861da01e5bc31539084cf799d30fb973bb78..e5b1507d6ac8034fbaecd9fc5d4223aeb68cd227 100644 (file)
@@ -49,7 +49,7 @@ namespace cds_test {
 
             base_class::test( s );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             typedef typename Set::value_type value_type;
@@ -60,10 +60,10 @@ namespace cds_test {
             data.reserve( nSetSize );
             indices.reserve( nSetSize );
             for ( size_t key = 0; key < nSetSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             typename Set::guarded_ptr gp;
 
@@ -71,7 +71,7 @@ namespace cds_test {
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                gp = s.get( i.key() );
+                gp = s.get( i.key());
                 ASSERT_TRUE( !gp );
 
                 gp = s.extract( i.key());
@@ -81,7 +81,7 @@ namespace cds_test {
             // fill set
             for ( auto& i : data ) {
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
             // get/extract
@@ -89,7 +89,7 @@ namespace cds_test {
                 auto& i = data[idx];
 
                 EXPECT_EQ( i.nFindCount, 0u );
-                gp = s.get( i.key() );
+                gp = s.get( i.key());
                 ASSERT_FALSE( !gp );
                 ++gp->nFindCount;
                 EXPECT_EQ( i.nFindCount, 1u );
@@ -99,15 +99,15 @@ namespace cds_test {
                 ++gp->nEraseCount;
                 EXPECT_EQ( i.nEraseCount, 1u );
 
-                gp = s.extract( i.key() );
+                gp = s.extract( i.key());
                 ASSERT_TRUE( !gp );
 
-                gp = s.get( i.key() );
+                gp = s.get( i.key());
                 ASSERT_TRUE( !gp );
             }
             gp.release();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // Force retiring cycle
@@ -119,16 +119,16 @@ namespace cds_test {
             // erase_at( iterator )
             for ( auto& i : data ) {
                 i.clear_stat();
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             for ( auto it = s.begin(); it != s.end(); ++it ) {
-                ASSERT_TRUE( s.erase_at( it ) );
-                ASSERT_FALSE( s.erase_at( it ) );
+                ASSERT_TRUE( s.erase_at( it ));
+                ASSERT_FALSE( s.erase_at( it ));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // Force retiring cycle
@@ -140,16 +140,16 @@ namespace cds_test {
             // erase_at( reverse_iterator )
             for ( auto& i : data ) {
                 i.clear_stat();
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             for ( auto it = s.rbegin(); it != s.rend(); ++it ) {
-                ASSERT_TRUE( s.erase_at( it ) );
-                ASSERT_FALSE( s.erase_at( it ) );
+                ASSERT_TRUE( s.erase_at( it ));
+                ASSERT_FALSE( s.erase_at( it ));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // Force retiring cycle
index d7af35ca58bb3c9a0ae9507ee43aed2ce2c4161c..d8f795d547b04ca3a05e8bb2f95c23130161ea44 100644 (file)
@@ -54,21 +54,21 @@ protected:
 
         base_class::test( s );
 
-        ASSERT_TRUE( s.empty() );
+        ASSERT_TRUE( s.empty());
         ASSERT_CONTAINER_SIZE( s, 0 );
 
         typedef typename Set::value_type value_type;
-        size_t const nSetSize = std::max( s.head_size() * 2, static_cast<size_t>(100) );
+        size_t const nSetSize = std::max( s.head_size() * 2, static_cast<size_t>(100));
 
         std::vector< value_type > data;
         std::vector< size_t> indices;
         data.reserve( nSetSize );
         indices.reserve( nSetSize );
         for ( size_t key = 0; key < nSetSize; ++key ) {
-            data.push_back( value_type( static_cast<int>(key) ) );
+            data.push_back( value_type( static_cast<int>(key)) );
             indices.push_back( key );
         }
-        shuffle( indices.begin(), indices.end() );
+        shuffle( indices.begin(), indices.end());
 
         typename Set::exempt_ptr xp;
         value_type * rp;
@@ -80,18 +80,18 @@ protected:
 
             {
                 rcu_lock l;
-                rp = s.get( i.key() );
+                rp = s.get( i.key());
                 ASSERT_TRUE( !rp );
             }
 
-            xp = s.extract( i.key() );
+            xp = s.extract( i.key());
             ASSERT_TRUE( !xp );
         }
 
         // fill set
         for ( auto& i : data ) {
             i.nDisposeCount = 0;
-            ASSERT_TRUE( s.insert( i ) );
+            ASSERT_TRUE( s.insert( i ));
         }
 
         // get/extract
@@ -101,7 +101,7 @@ protected:
             {
                 rcu_lock l;
                 EXPECT_EQ( i.nFindCount, 0u );
-                rp = s.get( i.key() );
+                rp = s.get( i.key());
                 ASSERT_FALSE( !rp );
                 ++rp->nFindCount;
                 EXPECT_EQ( i.nFindCount, 1u );
@@ -113,11 +113,11 @@ protected:
             ++xp->nEraseCount;
             EXPECT_EQ( i.nEraseCount, 1u );
 
-            xp = s.extract( i.key() );
+            xp = s.extract( i.key());
             ASSERT_TRUE( !xp );
         }
 
-        ASSERT_TRUE( s.empty() );
+        ASSERT_TRUE( s.empty());
         ASSERT_CONTAINER_SIZE( s, 0 );
 
         // Force retiring cycle
index aa47b6ef0abc4428a5f1f207f4ed81642f594149..3af0cbe506975b07689ff8448d97f031345eb7df 100644 (file)
@@ -65,7 +65,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -152,7 +152,7 @@ namespace cds_test {
         struct cmp {
             int operator ()(const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -168,7 +168,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()(const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -211,7 +211,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -225,7 +225,7 @@ namespace cds_test {
                 data.push_back( value_type( static_cast<int>( key )));
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
@@ -237,7 +237,7 @@ namespace cds_test {
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
                 ASSERT_TRUE( s.find( i.nKey ) == s.end());
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less()) == s.end());
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less()) == s.end());
 
                 std::pair<bool, bool> updResult;
 
@@ -259,7 +259,7 @@ namespace cds_test {
                     updResult = s.update( i, []( value_type& val, value_type* arg)
                         {
                             ASSERT_TRUE( arg != nullptr );
-                            EXPECT_EQ( val.key(), arg->key() );
+                            EXPECT_EQ( val.key(), arg->key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     EXPECT_FALSE( updResult.second );
@@ -268,7 +268,7 @@ namespace cds_test {
                     EXPECT_EQ( i.nUpdateNewCount, 0u );
                     ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
                     EXPECT_EQ( i.nUpdateNewCount, 1u );
-                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ) );
+                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
                     EXPECT_EQ( i.nUpdateNewCount, 1u );
                     i.nUpdateNewCount = 0;
                     break;
@@ -287,41 +287,41 @@ namespace cds_test {
                     break;
                 }
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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 );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
-                ASSERT_TRUE( s.find( i.nKey ) != s.end() );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less() ) != s.end() );
-                EXPECT_EQ( s.find( i.nKey )->nKey, i.key() );
-                EXPECT_EQ( s.find_with( other_item( i.key() ), other_less())->nKey, i.key() );
+                ASSERT_TRUE( s.find( i.nKey ) != s.end());
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less()) != s.end());
+                EXPECT_EQ( s.find( i.nKey )->nKey, i.key());
+                EXPECT_EQ( s.find_with( other_item( i.key()), other_less())->nKey, i.key());
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             std::for_each( data.begin(), data.end(), []( value_type& v ) { v.clear_stat(); });
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[ idx ];
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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; } ) );
+                ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 1u );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ) );
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
-                ASSERT_TRUE( s.find( i.nKey ) != s.end() );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less()) != s.end() );
-                EXPECT_EQ( s.find( i.nKey )->nKey, i.key() );
-                EXPECT_EQ( s.find_with( other_item( i.key() ), other_less())->nKey, i.key() );
+                ASSERT_TRUE( s.find( i.nKey ) != s.end());
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less()) != s.end());
+                EXPECT_EQ( s.find( i.nKey )->nKey, i.key());
+                EXPECT_EQ( s.find_with( other_item( i.key()), other_less())->nKey, i.key());
 
 
                 value_type v( i );
@@ -329,19 +329,19 @@ namespace cds_test {
                 case 0:
                     ASSERT_FALSE( s.unlink( v ));
                     ASSERT_TRUE( s.unlink( i ));
-                    ASSERT_FALSE( s.unlink( i ) );
+                    ASSERT_FALSE( s.unlink( i ));
                     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 ));
-                    ASSERT_FALSE( s.erase( v ) );
+                    ASSERT_FALSE( s.erase( v ));
                     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 );
@@ -352,9 +352,9 @@ namespace cds_test {
                     break;
                 case 5:
                     EXPECT_EQ( i.nEraseCount, 0u );
-                    ASSERT_TRUE( s.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    ASSERT_TRUE( s.erase_with( other_item( i.key()), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
                     EXPECT_EQ( i.nEraseCount, 1u );
-                    ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
                     EXPECT_EQ( i.nEraseCount, 1u );
                     break;
                 }
@@ -364,10 +364,10 @@ namespace cds_test {
                 ASSERT_FALSE( s.contains( other_item( i.key()), other_less()));
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
-                ASSERT_TRUE( s.find( i.nKey ) == s.end() );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less() ) == s.end() );
+                ASSERT_TRUE( s.find( i.nKey ) == s.end());
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less()) == s.end());
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
             // Force retiring cycle
@@ -381,7 +381,7 @@ namespace cds_test {
                 i.clear_stat();
                 ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // Iterator test
@@ -400,8 +400,8 @@ namespace cds_test {
 
             ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
-            ASSERT_TRUE( s.begin() == s.end() );
-            ASSERT_TRUE( s.cbegin() == s.cend() );
+            ASSERT_TRUE( s.begin() == s.end());
+            ASSERT_TRUE( s.cbegin() == s.cend());
 
             // Force retiring cycle
             Set::gc::force_dispose();
index b6a36a47d1714b6e57d2bf7662fda13c011982cb..cc644ab829d25b4464dbc0621002963ad52b06f7 100644 (file)
@@ -55,7 +55,7 @@ namespace cds_test {
 
             base_class::test( s );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             typedef typename Set::value_type value_type;
@@ -65,10 +65,10 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             typename Set::guarded_ptr gp;
 
@@ -78,7 +78,7 @@ namespace cds_test {
 
                 gp = s.get( i );
                 ASSERT_TRUE( !gp );
-                gp = s.get( i.key() );
+                gp = s.get( i.key());
                 ASSERT_TRUE( !gp );
                 gp = s.get_with( other_item( i.key()), other_less());
                 ASSERT_TRUE( !gp );
@@ -94,7 +94,7 @@ namespace cds_test {
             // fill set
             for ( auto& i : data ) {
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
             // get/extract
@@ -107,7 +107,7 @@ namespace cds_test {
                 ++gp->nFindCount;
                 EXPECT_EQ( i.nFindCount, 1u );
 
-                gp = s.get( i.key() );
+                gp = s.get( i.key());
                 ASSERT_FALSE( !gp );
                 ++gp->nFindCount;
                 EXPECT_EQ( i.nFindCount, 2u );
@@ -126,7 +126,7 @@ namespace cds_test {
                     gp = s.extract( i );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     break;
                 }
                 ASSERT_FALSE( !gp );
@@ -135,15 +135,15 @@ namespace cds_test {
 
                 gp = s.extract( i );
                 ASSERT_TRUE( !gp );
-                gp = s.extract( i.key() );
+                gp = s.extract( i.key());
                 ASSERT_TRUE( !gp );
-                gp = s.extract_with( other_item( i.key() ), other_less() );
+                gp = s.extract_with( other_item( i.key()), other_less());
                 ASSERT_TRUE( !gp );
             }
 
             gp.release();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // Force retiring cycle
index 06114b8ecc3789ec68e21c094a5414571102e96c..b99e1fee27446864edc603858af90b9d9d1f8ce3 100644 (file)
@@ -65,7 +65,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -147,7 +147,7 @@ namespace cds_test {
             template <typename Item>
             size_t operator()( const Item& i ) const
             {
-                return (*this)( i.key() );
+                return (*this)( i.key());
             }
         };
 
@@ -206,7 +206,7 @@ namespace cds_test {
         struct cmp {
             int operator ()(const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -222,7 +222,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()(const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -265,7 +265,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -279,7 +279,7 @@ namespace cds_test {
                 data.push_back( value_type( static_cast<int>( key )));
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
@@ -316,7 +316,7 @@ namespace cds_test {
                     EXPECT_EQ( i.nUpdateNewCount, 0u );
                     ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
                     EXPECT_EQ( i.nUpdateNewCount, 1u );
-                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ) );
+                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
                     EXPECT_EQ( i.nUpdateNewCount, 1u );
                     i.nUpdateNewCount = 0;
                     break;
@@ -331,32 +331,32 @@ namespace cds_test {
                     break;
                 }
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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 );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             std::for_each( data.begin(), data.end(), []( value_type& v ) { v.clear_stat(); });
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[ idx ];
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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; } ) );
+                ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 1u );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ) );
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
 
                 value_type v( i );
@@ -364,19 +364,19 @@ namespace cds_test {
                 case 0:
                     ASSERT_FALSE( s.unlink( v ));
                     ASSERT_TRUE( s.unlink( i ));
-                    ASSERT_FALSE( s.unlink( i ) );
+                    ASSERT_FALSE( s.unlink( i ));
                     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 ));
-                    ASSERT_FALSE( s.erase( v ) );
+                    ASSERT_FALSE( s.erase( v ));
                     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 );
@@ -387,9 +387,9 @@ namespace cds_test {
                     break;
                 case 5:
                     EXPECT_EQ( i.nEraseCount, 0u );
-                    ASSERT_TRUE( s.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    ASSERT_TRUE( s.erase_with( other_item( i.key()), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
                     EXPECT_EQ( i.nEraseCount, 1u );
-                    ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
                     EXPECT_EQ( i.nEraseCount, 1u );
                     break;
                 }
@@ -400,7 +400,7 @@ namespace cds_test {
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
             // Force retiring cycle
@@ -414,7 +414,7 @@ namespace cds_test {
                 i.clear_stat();
                 ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // Iterator test
@@ -433,8 +433,8 @@ namespace cds_test {
 
             ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
-            ASSERT_TRUE( s.begin() == s.end() );
-            ASSERT_TRUE( s.cbegin() == s.cend() );
+            ASSERT_TRUE( s.begin() == s.end());
+            ASSERT_TRUE( s.cbegin() == s.cend());
 
             // Force retiring cycle
             Set::gc::force_dispose();
index 29eb9442cb71fd73101558c7eb0848ee5fc87bbc..90746509d8a5aa2e882fac493efb0bda2d4d0759 100644 (file)
@@ -55,7 +55,7 @@ namespace cds_test {
 
             base_class::test( s );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             typedef typename Set::value_type value_type;
@@ -65,10 +65,10 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             typename Set::guarded_ptr gp;
 
@@ -78,7 +78,7 @@ namespace cds_test {
 
                 gp = s.get( i );
                 ASSERT_TRUE( !gp );
-                gp = s.get( i.key() );
+                gp = s.get( i.key());
                 ASSERT_TRUE( !gp );
                 gp = s.get_with( other_item( i.key()), other_less());
                 ASSERT_TRUE( !gp );
@@ -94,7 +94,7 @@ namespace cds_test {
             // fill set
             for ( auto& i : data ) {
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
             // get/extract
@@ -107,7 +107,7 @@ namespace cds_test {
                 ++gp->nFindCount;
                 EXPECT_EQ( i.nFindCount, 1u );
 
-                gp = s.get( i.key() );
+                gp = s.get( i.key());
                 ASSERT_FALSE( !gp );
                 ++gp->nFindCount;
                 EXPECT_EQ( i.nFindCount, 2u );
@@ -126,7 +126,7 @@ namespace cds_test {
                     gp = s.extract( i );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     break;
                 }
                 ASSERT_FALSE( !gp );
@@ -135,15 +135,15 @@ namespace cds_test {
 
                 gp = s.extract( i );
                 ASSERT_TRUE( !gp );
-                gp = s.extract( i.key() );
+                gp = s.extract( i.key());
                 ASSERT_TRUE( !gp );
-                gp = s.extract_with( other_item( i.key() ), other_less() );
+                gp = s.extract_with( other_item( i.key()), other_less());
                 ASSERT_TRUE( !gp );
             }
 
             gp.release();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
             // Force retiring cycle
index 74f6d046671ae5016f392844dfd12f499bf31323..7782d0b580c74904a231c160d3eda59bbb49a858 100644 (file)
@@ -64,7 +64,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -146,7 +146,7 @@ namespace cds_test {
             template <typename Item>
             size_t operator()( const Item& i ) const
             {
-                return (*this)( i.key() );
+                return (*this)( i.key());
             }
         };
 
@@ -205,7 +205,7 @@ namespace cds_test {
         struct cmp {
             int operator ()(const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -221,7 +221,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()(const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -264,7 +264,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -278,7 +278,7 @@ namespace cds_test {
                 data.push_back( value_type( static_cast<int>( key )));
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
@@ -330,14 +330,14 @@ namespace cds_test {
 
                 ASSERT_TRUE( s.contains( i.nKey ) == &i );
                 ASSERT_TRUE( s.contains( i ) == &i );
-                ASSERT_TRUE( s.contains( other_item( i.key() ), other_less()) == &i );
+                ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) == &i );
                 EXPECT_EQ( i.nFindCount, 0u );
                 ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 1u );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             std::for_each( data.begin(), data.end(), []( value_type& v ) { v.clear_stat(); });
@@ -364,8 +364,8 @@ namespace cds_test {
 
             ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
-            ASSERT_TRUE( s.begin() == s.end() );
-            ASSERT_TRUE( s.cbegin() == s.cend() );
+            ASSERT_TRUE( s.begin() == s.end());
+            ASSERT_TRUE( s.cbegin() == s.cend());
         }
     };
 
index c82e5741ce0e949c385a65f5c5b1875960eb2bdd..bef48af808fa6c3f2fcf3cb28fa1da7cb03a67af 100644 (file)
@@ -55,7 +55,7 @@ namespace cds_test {
 
             base_class::test( s );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             typedef typename Set::value_type value_type;
@@ -65,10 +65,10 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             typename Set::exempt_ptr xp;
             typename Set::raw_ptr rp;
@@ -82,7 +82,7 @@ namespace cds_test {
                     rcu_lock l;
                     rp = s.get( i );
                     ASSERT_TRUE( !rp );
-                    rp = s.get( i.key() );
+                    rp = s.get( i.key());
                     ASSERT_TRUE( !rp );
                     rp = s.get_with( other_item( i.key()), other_less());
                     ASSERT_TRUE( !rp );
@@ -93,17 +93,17 @@ namespace cds_test {
 
                     xp = s.extract( i );
                     ASSERT_TRUE( !xp );
-                    xp = s.extract( i.key() );
+                    xp = s.extract( i.key());
                     ASSERT_TRUE( !xp );
-                    xp = s.extract_with( other_item( i.key() ), other_less() );
+                    xp = s.extract_with( other_item( i.key()), other_less());
                     ASSERT_TRUE( !xp );
                 }
                 else {
                     xp = s.extract( i );
                     ASSERT_TRUE( !xp );
-                    xp = s.extract( i.key() );
+                    xp = s.extract( i.key());
                     ASSERT_TRUE( !xp );
-                    xp = s.extract_with( other_item( i.key() ), other_less() );
+                    xp = s.extract_with( other_item( i.key()), other_less());
                     ASSERT_TRUE( !xp );
                 }
             }
@@ -111,7 +111,7 @@ namespace cds_test {
             // fill set
             for ( auto& i : data ) {
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
             // get/extract
@@ -126,7 +126,7 @@ namespace cds_test {
                     ++rp->nFindCount;
                     EXPECT_EQ( i.nFindCount, 1u );
 
-                    rp = s.get( i.key() );
+                    rp = s.get( i.key());
                     ASSERT_FALSE( !rp );
                     ++rp->nFindCount;
                     EXPECT_EQ( i.nFindCount, 2u );
@@ -150,7 +150,7 @@ namespace cds_test {
                             xp = s.extract( i );
                             break;
                         case 2:
-                            xp = s.extract_with( other_item( i.key() ), other_less() );
+                            xp = s.extract_with( other_item( i.key()), other_less());
                             break;
                         }
                         ASSERT_FALSE( !xp );
@@ -164,9 +164,9 @@ namespace cds_test {
 
                         xp = s.extract( i );
                         ASSERT_TRUE( !xp );
-                        xp = s.extract( i.key() );
+                        xp = s.extract( i.key());
                         ASSERT_TRUE( !xp );
-                        xp = s.extract_with( other_item( i.key() ), other_less() );
+                        xp = s.extract_with( other_item( i.key()), other_less());
                         ASSERT_TRUE( !xp );
                     }
                 }
@@ -180,7 +180,7 @@ namespace cds_test {
                         xp = s.extract( i );
                         break;
                     case 2:
-                        xp = s.extract_with( other_item( i.key() ), other_less() );
+                        xp = s.extract_with( other_item( i.key()), other_less());
                         break;
                     }
                     ASSERT_FALSE( !xp );
@@ -189,14 +189,14 @@ namespace cds_test {
 
                     xp = s.extract( i );
                     ASSERT_TRUE( !xp );
-                    xp = s.extract( i.key() );
+                    xp = s.extract( i.key());
                     ASSERT_TRUE( !xp );
-                    xp = s.extract_with( other_item( i.key() ), other_less() );
+                    xp = s.extract_with( other_item( i.key()), other_less());
                     ASSERT_TRUE( !xp );
                 }
             }
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // Force retiring cycle
index 9efbf9151f33f0c5b9e871d7ea55b5b8ada7c5fc..2043306a892997a997d8af07e6566e9d6e484e2a 100644 (file)
@@ -65,7 +65,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -153,7 +153,7 @@ namespace cds_test {
         struct cmp {
             int operator ()(const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -169,7 +169,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()(const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -212,7 +212,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -226,7 +226,7 @@ namespace cds_test {
                 data.push_back( value_type( static_cast<int>( key )));
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
@@ -238,7 +238,7 @@ namespace cds_test {
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
                 ASSERT_TRUE( s.find( i.nKey ) == s.end());
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less()) == s.end());
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less()) == s.end());
 
                 std::pair<bool, bool> updResult;
 
@@ -260,7 +260,7 @@ namespace cds_test {
                     updResult = s.update( i, []( value_type& val, value_type* arg)
                         {
                             ASSERT_TRUE( arg != nullptr );
-                            EXPECT_EQ( val.key(), arg->key() );
+                            EXPECT_EQ( val.key(), arg->key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     EXPECT_FALSE( updResult.second );
@@ -269,7 +269,7 @@ namespace cds_test {
                     EXPECT_EQ( i.nUpdateNewCount, 0u );
                     ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
                     EXPECT_EQ( i.nUpdateNewCount, 1u );
-                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ) );
+                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
                     EXPECT_EQ( i.nUpdateNewCount, 1u );
                     i.nUpdateNewCount = 0;
                     break;
@@ -288,41 +288,41 @@ namespace cds_test {
                     break;
                 }
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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 );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
-                ASSERT_TRUE( s.find( i.nKey ) != s.end() );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less() ) != s.end() );
-                EXPECT_EQ( s.find( i.nKey )->nKey, i.key() );
-                EXPECT_EQ( s.find_with( other_item( i.key() ), other_less())->nKey, i.key() );
+                ASSERT_TRUE( s.find( i.nKey ) != s.end());
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less()) != s.end());
+                EXPECT_EQ( s.find( i.nKey )->nKey, i.key());
+                EXPECT_EQ( s.find_with( other_item( i.key()), other_less())->nKey, i.key());
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             std::for_each( data.begin(), data.end(), []( value_type& v ) { v.clear_stat(); });
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[ idx ];
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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; } ) );
+                ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 1u );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ) );
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
-                ASSERT_TRUE( s.find( i.nKey ) != s.end() );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less()) != s.end() );
-                EXPECT_EQ( s.find( i.nKey )->nKey, i.key() );
-                EXPECT_EQ( s.find_with( other_item( i.key() ), other_less())->nKey, i.key() );
+                ASSERT_TRUE( s.find( i.nKey ) != s.end());
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less()) != s.end());
+                EXPECT_EQ( s.find( i.nKey )->nKey, i.key());
+                EXPECT_EQ( s.find_with( other_item( i.key()), other_less())->nKey, i.key());
 
 
                 value_type v( i );
@@ -330,19 +330,19 @@ namespace cds_test {
                 case 0:
                     ASSERT_FALSE( s.unlink( v ));
                     ASSERT_TRUE( s.unlink( i ));
-                    ASSERT_FALSE( s.unlink( i ) );
+                    ASSERT_FALSE( s.unlink( i ));
                     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 ));
-                    ASSERT_FALSE( s.erase( v ) );
+                    ASSERT_FALSE( s.erase( v ));
                     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 );
@@ -353,9 +353,9 @@ namespace cds_test {
                     break;
                 case 5:
                     EXPECT_EQ( i.nEraseCount, 0u );
-                    ASSERT_TRUE( s.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    ASSERT_TRUE( s.erase_with( other_item( i.key()), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
                     EXPECT_EQ( i.nEraseCount, 1u );
-                    ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    ASSERT_FALSE( s.erase_with( other_item( i.key()), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
                     EXPECT_EQ( i.nEraseCount, 1u );
                     break;
                 }
@@ -365,10 +365,10 @@ namespace cds_test {
                 ASSERT_FALSE( s.contains( other_item( i.key()), other_less()));
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
-                ASSERT_TRUE( s.find( i.nKey ) == s.end() );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less() ) == s.end() );
+                ASSERT_TRUE( s.find( i.nKey ) == s.end());
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less()) == s.end());
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
             // Force retiring cycle
@@ -382,7 +382,7 @@ namespace cds_test {
                 i.clear_stat();
                 ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // Iterator test
@@ -401,8 +401,8 @@ namespace cds_test {
 
             ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
-            ASSERT_TRUE( s.begin() == s.end() );
-            ASSERT_TRUE( s.cbegin() == s.cend() );
+            ASSERT_TRUE( s.begin() == s.end());
+            ASSERT_TRUE( s.cbegin() == s.cend());
 
             // Force retiring cycle
             Set::gc::force_dispose();
index 05a5b7c262061e60236241d17c65e6b53c33e37d..1d634f309bd3de8abbaac3327ffd7ce5a691c62c 100644 (file)
@@ -55,7 +55,7 @@ namespace cds_test {
 
             base_class::test( s );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             typedef typename Set::value_type value_type;
@@ -65,10 +65,10 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             typename Set::guarded_ptr gp;
 
@@ -78,7 +78,7 @@ namespace cds_test {
 
                 gp = s.get( i );
                 ASSERT_TRUE( !gp );
-                gp = s.get( i.key() );
+                gp = s.get( i.key());
                 ASSERT_TRUE( !gp );
                 gp = s.get_with( other_item( i.key()), other_less());
                 ASSERT_TRUE( !gp );
@@ -94,7 +94,7 @@ namespace cds_test {
             // fill set
             for ( auto& i : data ) {
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
             // get/extract
@@ -107,7 +107,7 @@ namespace cds_test {
                 ++gp->nFindCount;
                 EXPECT_EQ( i.nFindCount, 1u );
 
-                gp = s.get( i.key() );
+                gp = s.get( i.key());
                 ASSERT_FALSE( !gp );
                 ++gp->nFindCount;
                 EXPECT_EQ( i.nFindCount, 2u );
@@ -126,7 +126,7 @@ namespace cds_test {
                     gp = s.extract( i );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     break;
                 }
                 ASSERT_FALSE( !gp );
@@ -135,15 +135,15 @@ namespace cds_test {
 
                 gp = s.extract( i );
                 ASSERT_TRUE( !gp );
-                gp = s.extract( i.key() );
+                gp = s.extract( i.key());
                 ASSERT_TRUE( !gp );
-                gp = s.extract_with( other_item( i.key() ), other_less() );
+                gp = s.extract_with( other_item( i.key()), other_less());
                 ASSERT_TRUE( !gp );
             }
 
             gp.release();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // Force retiring cycle
index 498eeb4362ef2f3f9ba30657f2d7525d55e270e3..e9e3e9c07e09f07970c01450bbe42ab1ae608014 100644 (file)
@@ -92,7 +92,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -108,7 +108,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()( const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -152,7 +152,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             // insert/find
@@ -246,10 +246,10 @@ namespace cds_test {
                     EXPECT_EQ( key.nKey, n.nKey );
                     EXPECT_EQ( n.nKey * 5, n.nVal );
                 } ));
-                ASSERT_FALSE( l.find( i ) == l.end() );
+                ASSERT_FALSE( l.find( i ) == l.end());
                 EXPECT_EQ( l.find( i.nKey )->nKey, i.nKey );
-                ASSERT_FALSE( l.find_with( other_item( i.nKey ), other_less() ) == l.end() );
-                EXPECT_EQ( l.find_with( other_item( i.nKey ), other_less() )->nKey, i.nKey );
+                ASSERT_FALSE( l.find_with( other_item( i.nKey ), other_less()) == l.end());
+                EXPECT_EQ( l.find_with( other_item( i.nKey ), other_less())->nKey, i.nKey );
 
                 auto pair = l.upsert( i.nKey, false );
                 EXPECT_TRUE( pair.first );
@@ -264,18 +264,18 @@ namespace cds_test {
                 EXPECT_TRUE( pair.first );
                 EXPECT_FALSE( pair.second );
 
-                EXPECT_FALSE( l.empty() );
+                EXPECT_FALSE( l.empty());
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             // erase
             for ( auto const&i : arr ) {
-                ASSERT_FALSE( l.find( i.nKey ) == l.end() );
+                ASSERT_FALSE( l.find( i.nKey ) == l.end());
                 EXPECT_EQ( l.find( i.nKey )->nKey, i.nKey );
-                ASSERT_FALSE( l.find_with( other_item( i.nKey ), other_less() ) == l.end() );
-                EXPECT_EQ( l.find_with( other_item( i.nKey ), other_less() )->nKey, i.nKey );
+                ASSERT_FALSE( l.find_with( other_item( i.nKey ), other_less()) == l.end());
+                EXPECT_EQ( l.find_with( other_item( i.nKey ), other_less())->nKey, i.nKey );
 
                 switch ( i.nKey % 4 ) {
                     case 0:
@@ -303,24 +303,24 @@ namespace cds_test {
                 EXPECT_FALSE( l.find( i, []( value_type&, value_type const&) {} ));
                 EXPECT_FALSE( l.find( i.nKey, []( value_type&, int ) {} ));
                 EXPECT_FALSE( l.find_with( other_item( i.nKey ), other_less(), []( value_type&, other_item const& ) {} ));
-                EXPECT_TRUE( l.find( i ) == l.end() );
-                EXPECT_TRUE( l.find( i.nKey ) == l.end() );
-                EXPECT_TRUE( l.find_with( other_item( i.nKey ), other_less() ) == l.end() );
+                EXPECT_TRUE( l.find( i ) == l.end());
+                EXPECT_TRUE( l.find( i.nKey ) == l.end());
+                EXPECT_TRUE( l.find_with( other_item( i.nKey ), other_less()) == l.end());
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // clear test
             for ( auto& i : arr )
                 EXPECT_TRUE( l.insert( i ));
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             l.clear();
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // empty list iterator test
@@ -350,7 +350,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
@@ -395,7 +395,7 @@ namespace cds_test {
             EXPECT_EQ( static_cast<size_t>(key), nSize );
 
             l.clear();
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
         }
     };
index a716d11547bbaa6bd9dbdfdc4970082055059cf3..dde76085b645621f0c7963ae5d474664922da345 100644 (file)
@@ -55,7 +55,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             guarded_ptr gp;
@@ -83,16 +83,16 @@ namespace cds_test {
                 gp->nVal = gp->nKey * 10;
 
                 ++nCount;
-                ASSERT_FALSE( l.empty() );
+                ASSERT_FALSE( l.empty());
                 ASSERT_CONTAINER_SIZE( l, nCount );
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             ASSERT_CONTAINER_SIZE( l, nSize );
 
             // extract() test
             for ( auto const& i : arr ) {
-                ASSERT_FALSE( l.empty() );
+                ASSERT_FALSE( l.empty());
                 ASSERT_CONTAINER_SIZE( l, nCount );
                 --nCount;
 
@@ -126,7 +126,7 @@ namespace cds_test {
                 EXPECT_FALSE( gp );
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
         }
     };
index 1ed50b5f9f2c3a993420e97b727f6ffa933656c2..e148161f42d8512ff8c147b89980baee5658f463 100644 (file)
@@ -171,7 +171,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             // insert/find
@@ -182,7 +182,7 @@ namespace cds_test {
                 EXPECT_FALSE( l.find( i.key, []( list_value_type& ) {} ));
                 EXPECT_FALSE( l.find( key_type( i.key ), []( list_value_type& ) {} ));
                 EXPECT_FALSE( l.find_with( other_key( i.key ), other_less(), []( list_value_type& ) {} ));
-                EXPECT_TRUE( l.find( i.key ) == l.end() );
+                EXPECT_TRUE( l.find( i.key ) == l.end());
                 EXPECT_TRUE( l.find_with( other_key( i.key ), other_less()) == l.end());
 
                 switch ( i.key % 6 ) {
@@ -275,7 +275,7 @@ namespace cds_test {
                             ret = l.upsert( i.key, i.val );
                             EXPECT_TRUE( ret.first );
                             EXPECT_TRUE( ret.second );
-                            EXPECT_TRUE( l.contains( i.key ) );
+                            EXPECT_TRUE( l.contains( i.key ));
 
                             ret = l.upsert( i.key, i.key * 12 );
                             EXPECT_TRUE( ret.first );
@@ -309,17 +309,17 @@ namespace cds_test {
                 EXPECT_TRUE( pair.first );
                 EXPECT_FALSE( pair.second );
 
-                EXPECT_FALSE( l.find( i.key ) == l.end() );
+                EXPECT_FALSE( l.find( i.key ) == l.end());
                 EXPECT_EQ( l.find( i.key )->first.nKey, i.key );
                 EXPECT_EQ( l.find( i.key )->second.val, i.key * 3 );
-                EXPECT_FALSE( l.find_with( other_key( i.key ), other_less() ) == l.end() );
+                EXPECT_FALSE( l.find_with( other_key( i.key ), other_less()) == l.end());
                 EXPECT_EQ( l.find_with( other_key( i.key ), other_less())->first.nKey, i.key );
                 EXPECT_EQ( l.find_with( other_key( i.key ), other_less())->second.val, i.key * 3 );
 
-                EXPECT_FALSE( l.empty() );
+                EXPECT_FALSE( l.empty());
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             // erase
@@ -352,19 +352,19 @@ namespace cds_test {
                 EXPECT_FALSE( l.find_with( other_key( i.key ), other_less(), []( list_value_type& ) {} ));
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // clear test
             for ( auto& i : arr )
                 EXPECT_TRUE( l.insert( i.key, i.val ));
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             l.clear();
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // empty list iterator test
@@ -397,7 +397,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
@@ -405,8 +405,8 @@ namespace cds_test {
 
             int key = 0;
             for ( auto& it : l ) {
-                EXPECT_EQ( key, it.first.key() );
-                EXPECT_EQ( it.second.val, it.first.key() );
+                EXPECT_EQ( key, it.first.key());
+                EXPECT_EQ( it.second.val, it.first.key());
                 it.second.val = it.first.key() * 10;
                 ++key;
             }
@@ -414,7 +414,7 @@ namespace cds_test {
 
             key = 0;
             for ( auto it = l.cbegin(); it != l.cend(); ++it ) {
-                EXPECT_EQ( key, it->first.key() );
+                EXPECT_EQ( key, it->first.key());
                 EXPECT_EQ( it->first.key() * 10, it->second.val );
                 ++key;
             }
@@ -422,7 +422,7 @@ namespace cds_test {
 
             key = 0;
             for ( auto it = l.begin(); it != l.end(); ++it ) {
-                EXPECT_EQ( key, it->first.key() );
+                EXPECT_EQ( key, it->first.key());
                 EXPECT_EQ( it->first.key() * 10, it->second.val );
                 it->second.val = it->first.key() * 2;
                 ++key;
@@ -439,7 +439,7 @@ namespace cds_test {
             EXPECT_EQ( static_cast<size_t>(key), nSize );
 
             l.clear();
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
         }
     };
index 79c9c9449c4e59a343247625d09c03310454ca8f..348475137592df73e41e2ccab136805b987293e5 100644 (file)
@@ -59,7 +59,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             guarded_ptr gp;
@@ -87,16 +87,16 @@ namespace cds_test {
                 gp->second.val = gp->first.nKey * 10;
 
                 ++nCount;
-                ASSERT_FALSE( l.empty() );
+                ASSERT_FALSE( l.empty());
                 ASSERT_CONTAINER_SIZE( l, nCount );
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             ASSERT_CONTAINER_SIZE( l, nSize );
 
             // extract() test
             for ( auto const& i : arr ) {
-                ASSERT_FALSE( l.empty() );
+                ASSERT_FALSE( l.empty());
                 ASSERT_CONTAINER_SIZE( l, nCount );
                 --nCount;
 
@@ -125,7 +125,7 @@ namespace cds_test {
                 EXPECT_FALSE( gp );
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
         }
     };
index ecdc379a078709518194e5e11e7773bc79101748..558cc676987b67cbdc86e9bcf3feaec03cf86f87 100644 (file)
@@ -171,7 +171,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             // insert/find
@@ -286,10 +286,10 @@ namespace cds_test {
                 EXPECT_TRUE( pair.first );
                 EXPECT_FALSE( pair.second );
 
-                EXPECT_FALSE( l.empty() );
+                EXPECT_FALSE( l.empty());
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             // erase
@@ -322,19 +322,19 @@ namespace cds_test {
                 EXPECT_FALSE( l.find_with( other_key( i.key ), other_less(), []( list_value_type& ) {} ));
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // clear test
             for ( auto& i : arr )
                 EXPECT_TRUE( l.insert( i.key, i.val ));
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             l.clear();
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // empty list iterator test
@@ -367,7 +367,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
@@ -375,8 +375,8 @@ namespace cds_test {
 
             int key = 0;
             for ( auto& it : l ) {
-                EXPECT_EQ( key, it.first.key() );
-                EXPECT_EQ( it.second.val, it.first.key() );
+                EXPECT_EQ( key, it.first.key());
+                EXPECT_EQ( it.second.val, it.first.key());
                 it.second.val = it.first.key() * 10;
                 ++key;
             }
@@ -384,7 +384,7 @@ namespace cds_test {
 
             key = 0;
             for ( auto it = l.cbegin(); it != l.cend(); ++it ) {
-                EXPECT_EQ( key, it->first.key() );
+                EXPECT_EQ( key, it->first.key());
                 EXPECT_EQ( it->first.key() * 10, it->second.val );
                 ++key;
             }
@@ -392,7 +392,7 @@ namespace cds_test {
 
             key = 0;
             for ( auto it = l.begin(); it != l.end(); ++it ) {
-                EXPECT_EQ( key, it->first.key() );
+                EXPECT_EQ( key, it->first.key());
                 EXPECT_EQ( it->first.key() * 10, it->second.val );
                 it->second.val = it->first.key() * 2;
                 ++key;
@@ -409,7 +409,7 @@ namespace cds_test {
             EXPECT_EQ( static_cast<size_t>(key), nSize );
 
             l.clear();
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
         }
     };
index b4bab92db905c759db8b98cb1690e1afbac296b0..55f4ae00ad358a587f6764f60daebfe9af9d0df4 100644 (file)
@@ -59,7 +59,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             guarded_ptr gp;
@@ -87,16 +87,16 @@ namespace cds_test {
                 gp->second.val = gp->first.nKey * 10;
 
                 ++nCount;
-                ASSERT_FALSE( l.empty() );
+                ASSERT_FALSE( l.empty());
                 ASSERT_CONTAINER_SIZE( l, nCount );
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             ASSERT_CONTAINER_SIZE( l, nSize );
 
             // extract() test
             for ( auto const& i : arr ) {
-                ASSERT_FALSE( l.empty() );
+                ASSERT_FALSE( l.empty());
                 ASSERT_CONTAINER_SIZE( l, nCount );
                 --nCount;
 
@@ -125,7 +125,7 @@ namespace cds_test {
                 EXPECT_FALSE( gp );
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
         }
     };
index cec703fb1f016363a8febe5b5956e882f6736058..d9761fe5ec059ad3ecd6f5356dd23cc7fcf2a45e 100644 (file)
@@ -161,7 +161,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             // insert/find
@@ -178,39 +178,39 @@ namespace cds_test {
                         EXPECT_EQ( it->first.key, i.key );
                         EXPECT_EQ( it->second.val, 0 );
                         it = l.contains( i.key );
-                        EXPECT_FALSE( it == l.end() );
+                        EXPECT_FALSE( it == l.end());
                         EXPECT_EQ( it->first.key, i.key );
                         EXPECT_EQ( it->second.val, 0 );
                         it = l.insert( i.key );
-                        EXPECT_TRUE( it == l.end() );
+                        EXPECT_TRUE( it == l.end());
                         break;
                     }
                     case 1:
                     {
                         auto it = l.insert( i.key, i.val );
-                        ASSERT_FALSE( it == l.end() );
+                        ASSERT_FALSE( it == l.end());
                         EXPECT_EQ( it->first.key, i.key );
                         EXPECT_EQ( it->second.val, i.val );
                         it = l.contains( key_type( i.key ));
-                        EXPECT_FALSE( it == l.end() );
+                        EXPECT_FALSE( it == l.end());
                         EXPECT_EQ( it->first.key, i.key );
                         EXPECT_EQ( it->second.val, i.val );
                         it = l.insert( key_type( i.key ), i.val );
-                        EXPECT_TRUE( it == l.end() );
+                        EXPECT_TRUE( it == l.end());
                         break;
                     }
                     case 2:
                     {
                         auto it = l.emplace( i.key, i.key * 100 );
-                        ASSERT_FALSE( it == l.end() );
+                        ASSERT_FALSE( it == l.end());
                         EXPECT_EQ( it->first.key, i.key );
                         EXPECT_EQ( it->second.val, i.key * 100 );
                         it = l.contains( other_key( i.key ), other_less());
-                        ASSERT_FALSE( it == l.end() );
+                        ASSERT_FALSE( it == l.end());
                         EXPECT_EQ( it->first.key, i.key );
                         EXPECT_EQ( it->second.val, i.key * 100 );
                         it = l.emplace( i.key, i.key * 50 );
-                        EXPECT_TRUE( it == l.end() );
+                        EXPECT_TRUE( it == l.end());
                         break;
                     }
                     case 3:
@@ -220,25 +220,25 @@ namespace cds_test {
                         EXPECT_FALSE( pair.second );
 
                         pair = l.update( i.key );
-                        ASSERT_FALSE( pair.first == l.end() );
+                        ASSERT_FALSE( pair.first == l.end());
                         EXPECT_TRUE( pair.second );
                         pair.first->second.val = i.key * 3;
 
-                        auto it = l.contains( other_key( i.key ), other_less() );
-                        ASSERT_FALSE( it == l.end() );
+                        auto it = l.contains( other_key( i.key ), other_less());
+                        ASSERT_FALSE( it == l.end());
                         EXPECT_TRUE( it == pair.first );
                         EXPECT_EQ( it->first.key, i.key );
                         EXPECT_EQ( it->second.val, i.key * 3 );
 
                         pair = l.update( i.key, false );
-                        ASSERT_FALSE( pair.first == l.end() );
+                        ASSERT_FALSE( pair.first == l.end());
                         EXPECT_TRUE( pair.first == it );
                         EXPECT_FALSE( pair.second );
                         EXPECT_EQ( pair.first->first.key, i.key );
                         pair.first->second.val = i.key * 5;
 
-                        it = l.contains( other_key( i.key ), other_less() );
-                        ASSERT_FALSE( it == l.end() );
+                        it = l.contains( other_key( i.key ), other_less());
+                        ASSERT_FALSE( it == l.end());
                         EXPECT_TRUE( it == pair.first );
                         EXPECT_EQ( it->first.key, i.key );
                         EXPECT_EQ( it->second.val, i.key * 5 );
@@ -250,17 +250,17 @@ namespace cds_test {
                             EXPECT_EQ( i.key, n.first.key );
                             n.second.val = n.first.key * 7;
                         });
-                        ASSERT_FALSE( it == l.end() );
+                        ASSERT_FALSE( it == l.end());
                         EXPECT_EQ( it->first.key, i.key );
                         EXPECT_EQ( it->second.val, i.key * 7 );
                         it = l.contains( i.key );
-                        ASSERT_FALSE( it == l.end() );
+                        ASSERT_FALSE( it == l.end());
                         EXPECT_EQ( it->first.key, i.key );
                         EXPECT_EQ( it->second.val, i.key * 7 );
                         it = l.insert_with( i.key, []( list_value_type& ) {
                             EXPECT_TRUE( false );
                         });
-                        EXPECT_TRUE( it == l.end() );
+                        EXPECT_TRUE( it == l.end());
                         break;
                     }
                 }
@@ -269,15 +269,15 @@ namespace cds_test {
                 EXPECT_TRUE( l.contains( key_type( i.key )) != l.end());
                 EXPECT_TRUE( l.contains( other_key( i.key ), other_less()) != l.end());
 
-                EXPECT_FALSE( l.empty() );
+                EXPECT_FALSE( l.empty());
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             l.clear();
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // empty list iterator test
@@ -311,7 +311,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
@@ -354,7 +354,7 @@ namespace cds_test {
             EXPECT_EQ( static_cast<size_t>(key), nSize );
 
             l.clear();
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
         }
     };
index 660c37b1121037b4cffd5a17d561f3556d834cf5..6a247747aa49d23b6599b9f4633a5a8ca949dc39 100644 (file)
@@ -57,7 +57,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             typedef typename List::exempt_ptr exempt_ptr;
@@ -70,7 +70,7 @@ namespace cds_test {
                     rcu_lock lock;
                     raw_ptr rp = l.get( i.key );
                     EXPECT_TRUE( !rp );
-                    rp = l.get_with( other_key( i.key ), other_less() );
+                    rp = l.get_with( other_key( i.key ), other_less());
                     EXPECT_TRUE( !rp );
                 }
 
@@ -99,7 +99,7 @@ namespace cds_test {
                 }
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             ASSERT_CONTAINER_SIZE( l, nSize );
 
             // extract()
@@ -144,7 +144,7 @@ namespace cds_test {
                 }
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
         }
     };
index 12d01ea39b9f56c373a0c3525f5ffcd941c0afeb..97e88e7041563ac25b376c5d7b8b706b10305a42 100644 (file)
@@ -92,7 +92,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -108,7 +108,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()( const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -152,7 +152,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             // insert/find
@@ -240,10 +240,10 @@ namespace cds_test {
                 EXPECT_TRUE( pair.first );
                 EXPECT_FALSE( pair.second );
 
-                EXPECT_FALSE( l.empty() );
+                EXPECT_FALSE( l.empty());
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             // erase
@@ -276,19 +276,19 @@ namespace cds_test {
                 EXPECT_FALSE( l.find_with( other_item( i.nKey ), other_less(), []( value_type&, other_item const& ) {} ));
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // clear test
             for ( auto& i : arr )
                 EXPECT_TRUE( l.insert( i ));
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             l.clear();
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // empty list iterator test
@@ -318,7 +318,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
@@ -363,7 +363,7 @@ namespace cds_test {
             EXPECT_EQ( static_cast<size_t>(key), nSize );
 
             l.clear();
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
         }
     };
index 2ba6872566132a2b4d95ed8d3a5361f9b286f0fd..6c4a3975d69c01d73f81adcb0395410c1899db7d 100644 (file)
@@ -55,7 +55,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             guarded_ptr gp;
@@ -83,16 +83,16 @@ namespace cds_test {
                 gp->nVal = gp->nKey * 10;
 
                 ++nCount;
-                ASSERT_FALSE( l.empty() );
+                ASSERT_FALSE( l.empty());
                 ASSERT_CONTAINER_SIZE( l, nCount );
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             ASSERT_CONTAINER_SIZE( l, nSize );
 
             // extract() test
             for ( auto const& i : arr ) {
-                ASSERT_FALSE( l.empty() );
+                ASSERT_FALSE( l.empty());
                 ASSERT_CONTAINER_SIZE( l, nCount );
                 --nCount;
 
@@ -126,7 +126,7 @@ namespace cds_test {
                 EXPECT_FALSE( gp );
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
         }
     };
index 21d9c03b721aacb2a734941feb8e911d8ffcaa4f..d78ada68b033faa4fdc84a6c281b11346e0d789c 100644 (file)
@@ -92,7 +92,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -108,7 +108,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()( const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -152,7 +152,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             // insert/find
@@ -169,39 +169,39 @@ namespace cds_test {
                         EXPECT_EQ( it->nKey, i.nKey );
                         EXPECT_EQ( it->nVal, it->nKey * 2 );
                         it = l.contains( i.nKey );
-                        EXPECT_FALSE( it == l.end() );
+                        EXPECT_FALSE( it == l.end());
                         EXPECT_EQ( it->nKey, i.nKey );
                         EXPECT_EQ( it->nVal, it->nKey * 2 );
                         it = l.insert( i.nKey );
-                        EXPECT_TRUE( it == l.end() );
+                        EXPECT_TRUE( it == l.end());
                         break;
                     }
                     case 1:
                     {
                         auto it = l.insert( i );
-                        EXPECT_FALSE( it == l.end() );
+                        EXPECT_FALSE( it == l.end());
                         EXPECT_EQ( it->nKey, i.nKey );
                         EXPECT_EQ( it->nVal, i.nVal );
                         it = l.contains( i );
-                        EXPECT_FALSE( it == l.end() );
+                        EXPECT_FALSE( it == l.end());
                         EXPECT_EQ( it->nKey, i.nKey );
                         EXPECT_EQ( it->nVal, i.nVal );
                         it = l.insert( i );
-                        EXPECT_TRUE( it == l.end() );
+                        EXPECT_TRUE( it == l.end());
                         break;
                     }
                     case 2:
                     {
                         auto it = l.emplace( i.nKey, i.nKey * 100 );
-                        EXPECT_FALSE( it == l.end() );
+                        EXPECT_FALSE( it == l.end());
                         EXPECT_EQ( it->nKey, i.nKey );
                         EXPECT_EQ( it->nVal, i.nKey * 100 );
                         it = l.contains( other_item( i.nKey ), other_less());
-                        EXPECT_FALSE( it == l.end() );
+                        EXPECT_FALSE( it == l.end());
                         EXPECT_EQ( it->nKey, i.nKey );
                         EXPECT_EQ( it->nVal, i.nKey * 100 );
                         it = l.emplace( i.nKey, i.nKey * 50 );
-                        EXPECT_TRUE( it == l.end() );
+                        EXPECT_TRUE( it == l.end());
                         break;
                     }
                     case 3:
@@ -211,26 +211,26 @@ namespace cds_test {
                         EXPECT_FALSE( pair.second );
 
                         pair = l.update( i.nKey );
-                        EXPECT_FALSE( pair.first == l.end() );
+                        EXPECT_FALSE( pair.first == l.end());
                         EXPECT_TRUE( pair.second );
                         pair.first->nVal = i.nKey * 3;
                         EXPECT_EQ( pair.first->nKey, i.nKey );
 
-                        auto it = l.contains( other_item( i.nKey ), other_less() );
-                        EXPECT_FALSE( it == l.end() );
+                        auto it = l.contains( other_item( i.nKey ), other_less());
+                        EXPECT_FALSE( it == l.end());
                         EXPECT_TRUE( it == pair.first );
                         EXPECT_EQ( it->nKey, i.nKey );
                         EXPECT_EQ( it->nVal, i.nKey * 3 );
 
                         pair = l.update( i.nKey, false );
-                        EXPECT_FALSE( pair.first == l.end() );
+                        EXPECT_FALSE( pair.first == l.end());
                         EXPECT_TRUE( pair.first == it );
                         EXPECT_FALSE( pair.second );
                         EXPECT_EQ( pair.first->nKey, i.nKey );
                         pair.first->nVal = i.nKey * 5;
 
-                        it = l.contains( other_item( i.nKey ), other_less() );
-                        EXPECT_FALSE( it == l.end() );
+                        it = l.contains( other_item( i.nKey ), other_less());
+                        EXPECT_FALSE( it == l.end());
                         EXPECT_TRUE( it == pair.first );
                         EXPECT_EQ( it->nKey, i.nKey );
                         EXPECT_EQ( it->nVal, i.nKey * 5 );
@@ -242,15 +242,15 @@ namespace cds_test {
                 EXPECT_TRUE( l.contains( i.nKey ) != l.end());
                 EXPECT_TRUE( l.contains( other_item( i.nKey ), other_less()) != l.end());
 
-                EXPECT_FALSE( l.empty() );
+                EXPECT_FALSE( l.empty());
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             EXPECT_CONTAINER_SIZE( l, nSize );
 
             l.clear();
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             // empty list iterator test
@@ -280,7 +280,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             for ( auto& i : arr )
@@ -325,7 +325,7 @@ namespace cds_test {
             EXPECT_EQ( static_cast<size_t>(key), nSize );
 
             l.clear();
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
         }
     };
index cf4b2cb1bb5489e2c34b79dd785ce2dc54c3fe6e..eff095dd2225c90163a065b2c9c46b25b8905d25 100644 (file)
@@ -54,7 +54,7 @@ namespace cds_test {
             }
             shuffle( arr, arr + nSize );
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
 
             typedef typename List::exempt_ptr exempt_ptr;
@@ -67,11 +67,11 @@ namespace cds_test {
                     rcu_lock lock;
                     raw_ptr rp = l.get( i.nKey );
                     EXPECT_TRUE( !rp );
-                    rp = l.get_with( other_item( i.nKey ), other_less() );
+                    rp = l.get_with( other_item( i.nKey ), other_less());
                     EXPECT_TRUE( !rp );
                 }
 
-                EXPECT_TRUE( l.insert( i ) );
+                EXPECT_TRUE( l.insert( i ));
 
                 {
                     rcu_lock lock;
@@ -96,7 +96,7 @@ namespace cds_test {
                 }
             }
 
-            ASSERT_FALSE( l.empty() );
+            ASSERT_FALSE( l.empty());
             ASSERT_CONTAINER_SIZE( l, nSize );
 
             // extract()
@@ -141,7 +141,7 @@ namespace cds_test {
                 }
             }
 
-            ASSERT_TRUE( l.empty() );
+            ASSERT_TRUE( l.empty());
             ASSERT_CONTAINER_SIZE( l, 0 );
         }
     };
index 47fa0fdd0b97dfb5786c3f40c1200f15f09d3a9f..68ea52dfe9d89f7a2ff1fd63933f710724800bc5 100644 (file)
@@ -49,7 +49,7 @@ namespace {
 
             base_class::test( m );
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             typedef typename Map::value_type map_pair;
@@ -69,7 +69,7 @@ namespace {
             }
 
             m.clear();
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // get_max
index ea78222795ba7ebd2645d54c2f4bd63801ec1e36..90ea6e309320ba0a13b636117b7cb6b958a4e165 100644 (file)
@@ -52,7 +52,7 @@ namespace cds_test {
             // Precondition: map is empty
             // Postcondition: map is empty
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             typedef typename Map::value_type map_pair;
@@ -60,8 +60,8 @@ namespace cds_test {
 
             std::vector<key_type> arrKeys;
             for ( int i = 0; i < static_cast<int>(kkSize); ++i )
-                arrKeys.push_back( key_type( i ) );
-            shuffle( arrKeys.begin(), arrKeys.end() );
+                arrKeys.push_back( key_type( i ));
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             std::vector< value_type > arrVals;
             for ( size_t i = 0; i < kkSize; ++i ) {
@@ -73,82 +73,82 @@ namespace cds_test {
 
             // insert/find
             for ( auto const& i : arrKeys ) {
-                value_type const& val( arrVals.at( i.nKey ) );
+                value_type const& val( arrVals.at( i.nKey ));
 
-                ASSERT_FALSE( m.contains( i.nKey ) );
-                ASSERT_FALSE( m.contains( i ) );
+                ASSERT_FALSE( m.contains( i.nKey ));
+                ASSERT_FALSE( m.contains( i ));
                 ASSERT_FALSE( m.find( i, []( map_pair const& ) {
                     ASSERT_TRUE( false );
-                } ) );
+                } ));
                 ASSERT_FALSE( m.find( i.nKey, []( map_pair const& ) {
                     EXPECT_TRUE( false );
-                } ) );
+                } ));
 
                 std::pair< bool, bool > updResult;
 
                 switch ( i.nKey % 16 ) {
                 case 0:
-                    ASSERT_TRUE( m.insert( i ) );
-                    ASSERT_FALSE( m.insert( i ) );
+                    ASSERT_TRUE( m.insert( i ));
+                    ASSERT_FALSE( m.insert( i ));
                     ASSERT_TRUE( m.find( i.nKey, []( map_pair& v ) {
                         v.second.nVal = v.first.nKey;
                         v.second.strVal = std::to_string( v.first.nKey );
-                    } ) );
+                    } ));
                     break;
                 case 1:
-                    ASSERT_TRUE( m.insert( i.nKey ) );
-                    ASSERT_FALSE( m.insert( i.nKey ) );
+                    ASSERT_TRUE( m.insert( i.nKey ));
+                    ASSERT_FALSE( m.insert( 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 );
-                    } ) );
+                    } ));
                     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 );
-                    } ) );
+                    } ));
                     break;
                 case 3:
-                    ASSERT_TRUE( m.insert( i, val ) );
-                    ASSERT_FALSE( m.insert( i, val ) );
+                    ASSERT_TRUE( m.insert( i, val ));
+                    ASSERT_FALSE( m.insert( i, val ));
                     break;
                 case 4:
-                    ASSERT_TRUE( m.insert( i.nKey, val.strVal ) );
-                    ASSERT_FALSE( m.insert( i.nKey, val.strVal ) );
+                    ASSERT_TRUE( m.insert( i.nKey, val.strVal ));
+                    ASSERT_FALSE( m.insert( i.nKey, val.strVal ));
                     break;
                 case 5:
-                    ASSERT_TRUE( m.insert( val.strVal, i.nKey ) );
-                    ASSERT_FALSE( m.insert( val.strVal, i.nKey ) );
+                    ASSERT_TRUE( m.insert( val.strVal, i.nKey ));
+                    ASSERT_FALSE( m.insert( val.strVal, i.nKey ));
                     break;
                 case 6:
                     ASSERT_TRUE( m.insert_with( i, []( map_pair& v ) {
                         v.second.nVal = v.first.nKey;
                         v.second.strVal = std::to_string( v.first.nKey );
-                    } ) );
+                    } ));
                     ASSERT_FALSE( m.insert_with( i, []( map_pair& ) {
                         EXPECT_TRUE( false );
-                    } ) );
+                    } ));
                     break;
                 case 7:
                     ASSERT_TRUE( m.insert_with( i.nKey, []( map_pair& v ) {
                         v.second.nVal = v.first.nKey;
                         v.second.strVal = std::to_string( v.first.nKey );
-                    } ) );
+                    } ));
                     ASSERT_FALSE( m.insert_with( i.nKey, []( map_pair& ) {
                         EXPECT_TRUE( false );
-                    } ) );
+                    } ));
                     break;
                 case 8:
                     ASSERT_TRUE( m.insert_with( val.strVal, []( map_pair& v ) {
                         v.second.nVal = v.first.nKey;
                         v.second.strVal = std::to_string( v.first.nKey );
-                    } ) );
+                    } ));
                     ASSERT_FALSE( m.insert_with( val.strVal, []( map_pair& ) {
                         EXPECT_TRUE( false );
-                    } ) );
+                    } ));
                     break;
                 case 9:
                     updResult = m.update( i.nKey, []( map_pair&, map_pair* ) {
@@ -220,56 +220,56 @@ namespace cds_test {
                     ASSERT_FALSE( updResult.second );
                     break;
                 case 12:
-                    ASSERT_TRUE( m.emplace( i.nKey ) );
-                    ASSERT_FALSE( m.emplace( i.nKey ) );
+                    ASSERT_TRUE( m.emplace( i.nKey ));
+                    ASSERT_FALSE( m.emplace( 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 );
-                    } ) );
+                    } ));
                     break;
                 case 13:
-                    ASSERT_TRUE( m.emplace( i, i.nKey ) );
-                    ASSERT_FALSE( m.emplace( i, i.nKey ) );
+                    ASSERT_TRUE( m.emplace( i, i.nKey ));
+                    ASSERT_FALSE( m.emplace( i, i.nKey ));
                     break;
                 case 14:
                 {
                     std::string str = val.strVal;
-                    ASSERT_TRUE( m.emplace( i, std::move( str ) ) );
-                    ASSERT_TRUE( str.empty() );
+                    ASSERT_TRUE( m.emplace( i, std::move( str )) );
+                    ASSERT_TRUE( str.empty());
                     str = val.strVal;
-                    ASSERT_FALSE( m.emplace( i, std::move( str ) ) );
-                    ASSERT_TRUE( str.empty() );
+                    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( str.empty() );
+                    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_TRUE( str.empty() );
+                    ASSERT_FALSE( m.emplace( i, i.nKey, std::move( str )) );
+                    ASSERT_TRUE( str.empty());
                 }
                 break;
                 }
 
-                ASSERT_TRUE( m.contains( i.nKey ) );
-                ASSERT_TRUE( m.contains( i ) );
+                ASSERT_TRUE( m.contains( i.nKey ));
+                ASSERT_TRUE( m.contains( i ));
                 ASSERT_TRUE( m.find( i, []( map_pair const& v ) {
                     EXPECT_EQ( v.first.nKey, v.second.nVal );
                     EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
-                } ) );
+                } ));
                 ASSERT_TRUE( m.find( i.nKey, []( map_pair const& v ) {
                     EXPECT_EQ( v.first.nKey, v.second.nVal );
                     EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
-                } ) );
+                } ));
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
-            ASSERT_FALSE( m.begin() == m.end() );
-            ASSERT_FALSE( m.cbegin() == m.cend() );
+            ASSERT_FALSE( m.begin() == m.end());
+            ASSERT_FALSE( m.cbegin() == m.cend());
 
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             {
                 std::vector< typename Map::level_statistics > vect;
@@ -278,88 +278,88 @@ namespace cds_test {
 
             // erase/find
             for ( auto const& i : arrKeys ) {
-                value_type const& val( arrVals.at( i.nKey ) );
+                value_type const& val( arrVals.at( i.nKey ));
 
-                ASSERT_TRUE( m.contains( i.nKey ) );
-                ASSERT_TRUE( m.contains( val.strVal ) );
-                ASSERT_TRUE( m.contains( i ) );
+                ASSERT_TRUE( m.contains( i.nKey ));
+                ASSERT_TRUE( m.contains( val.strVal ));
+                ASSERT_TRUE( m.contains( i ));
                 ASSERT_TRUE( m.find( i, []( map_pair const& v ) {
                     EXPECT_EQ( v.first.nKey, v.second.nVal );
                     EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
-                } ) );
+                } ));
                 ASSERT_TRUE( m.find( i.nKey, []( map_pair const& v ) {
                     EXPECT_EQ( v.first.nKey, v.second.nVal );
                     EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
-                } ) );
+                } ));
 
                 switch ( i.nKey % 6 ) {
                 case 0:
-                    ASSERT_TRUE( m.erase( i ) );
-                    ASSERT_FALSE( m.erase( i ) );
+                    ASSERT_TRUE( m.erase( i ));
+                    ASSERT_FALSE( m.erase( i ));
                     break;
                 case 1:
-                    ASSERT_TRUE( m.erase( i.nKey ) );
-                    ASSERT_FALSE( m.erase( i.nKey ) );
+                    ASSERT_TRUE( m.erase( i.nKey ));
+                    ASSERT_FALSE( m.erase( i.nKey ));
                     break;
                 case 2:
-                    ASSERT_TRUE( m.erase( val.strVal ) );
-                    ASSERT_FALSE( m.erase( val.strVal ) );
+                    ASSERT_TRUE( m.erase( val.strVal ));
+                    ASSERT_FALSE( m.erase( val.strVal ));
                     break;
                 case 3:
                     ASSERT_TRUE( m.erase( i, []( map_pair& v ) {
                         EXPECT_EQ( v.first.nKey, v.second.nVal );
                         EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
-                    } ) );
+                    } ));
                     ASSERT_FALSE( m.erase( i, []( map_pair& ) {
                         EXPECT_TRUE( false );
-                    } ) );
+                    } ));
                     break;
                 case 4:
                     ASSERT_TRUE( m.erase( i.nKey, []( map_pair& v ) {
                         EXPECT_EQ( v.first.nKey, v.second.nVal );
                         EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
-                    } ) );
+                    } ));
                     ASSERT_FALSE( m.erase( i.nKey, []( map_pair& ) {
                         EXPECT_TRUE( false );
-                    } ) );
+                    } ));
                     break;
                 case 5:
                     ASSERT_TRUE( m.erase( val.strVal, []( map_pair& v ) {
                         EXPECT_EQ( v.first.nKey, v.second.nVal );
                         EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
-                    } ) );
+                    } ));
                     ASSERT_FALSE( m.erase( val.strVal, []( map_pair& ) {
                         EXPECT_TRUE( false );
-                    } ) );
+                    } ));
                     break;
                 }
 
-                ASSERT_FALSE( m.contains( i.nKey ) );
-                ASSERT_FALSE( m.contains( i ) );
-                ASSERT_FALSE( m.contains( val.strVal ) );
+                ASSERT_FALSE( m.contains( i.nKey ));
+                ASSERT_FALSE( m.contains( i ));
+                ASSERT_FALSE( m.contains( val.strVal ));
                 ASSERT_FALSE( m.find( i, []( map_pair const& ) {
                     ASSERT_TRUE( false );
-                } ) );
+                } ));
                 ASSERT_FALSE( m.find( i.nKey, []( map_pair const& ) {
                     EXPECT_TRUE( false );
-                } ) );
+                } ));
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
-            ASSERT_TRUE( m.begin() == m.end() );
-            ASSERT_TRUE( m.cbegin() == m.cend() );
+            ASSERT_TRUE( m.begin() == m.end());
+            ASSERT_TRUE( m.cbegin() == m.cend());
 
             // clear
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
+                ASSERT_TRUE( m.insert( i ));
 
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             m.clear();
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
         }
     };
index 0c55aaa69ab85ff32212fe995121f4ec221b10e6..3b22a9fba7711f4ca6e88ccbacd529744d3154b3 100644 (file)
@@ -68,8 +68,8 @@ namespace cds_test {
             }
 
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             // iterators
@@ -139,13 +139,13 @@ namespace cds_test {
                 gp = m.get( i );
                 ASSERT_TRUE( !gp );
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // erase_at( iterator )
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             nCount = 0;
@@ -155,55 +155,55 @@ namespace cds_test {
                 ++nCount;
             }
             EXPECT_EQ( nCount, kkSize );
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // erase_at( reverse_iterator )
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             nCount = 0;
             for ( auto it = m.rbegin(); it != m.rend(); ++it ) {
                 EXPECT_EQ( it->second.nVal, 0 );
-                ASSERT_TRUE( m.erase_at( it ) );
+                ASSERT_TRUE( m.erase_at( it ));
                 ++nCount;
             }
             EXPECT_EQ( nCount, kkSize );
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // erase_at( const_reverse_iterator )
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             nCount = 0;
             for ( auto it = m.crbegin(); it != m.crend(); ++it ) {
                 EXPECT_EQ( it->second.nVal, 0 );
-                ASSERT_TRUE( m.erase_at( it ) );
+                ASSERT_TRUE( m.erase_at( it ));
                 ++nCount;
             }
             EXPECT_EQ( nCount, kkSize );
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // erase_at( const_iterator )
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             nCount = 0;
             for ( auto it = m.cbegin(); it != m.cend(); ++it ) {
                 EXPECT_EQ( it->second.nVal, 0 );
-                ASSERT_TRUE( m.erase_at( it ) );
+                ASSERT_TRUE( m.erase_at( it ));
                 ++nCount;
             }
             EXPECT_EQ( nCount, kkSize );
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
         }
     };
index 3a2f18df67bbe788f98bd9a1a10a55a2d96c3025..65fc5c222c542c7fcee6eaeefb2d7718c5f61ac4 100644 (file)
@@ -75,8 +75,8 @@ namespace {
             }
 
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             // iterators
@@ -157,7 +157,7 @@ namespace {
                     EXPECT_TRUE( p == nullptr );
                 }
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
         }
 
index b8c86477a2fa7c0b8e423e9e175156f4bd72bf7a..6593f3b6c9f1749199330f9c0f9403002d25f56e 100644 (file)
@@ -268,19 +268,19 @@ namespace cds_test {
                     EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
                 } ));
             }
-            EXPECT_FALSE( m.empty() );
+            EXPECT_FALSE( m.empty());
             EXPECT_CONTAINER_SIZE( m, kkSize );
-            EXPECT_FALSE( m.begin() == m.end() );
-            EXPECT_FALSE( m.cbegin() == m.cend() );
+            EXPECT_FALSE( m.begin() == m.end());
+            EXPECT_FALSE( m.cbegin() == m.cend());
 
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             // erase/find
             for ( auto const& i : arrKeys ) {
-                value_type const& val( arrVals.at( i.nKey ) );
+                value_type const& val( arrVals.at( i.nKey ));
 
                 EXPECT_TRUE( m.contains( i.nKey ));
-                EXPECT_TRUE( m.contains( val.strVal ) );
+                EXPECT_TRUE( m.contains( val.strVal ));
                 EXPECT_TRUE( m.contains( i ));
                 EXPECT_TRUE( m.contains( other_item( i.nKey ), other_less()));
                 EXPECT_TRUE( m.find( i, []( map_pair const& v ) {
@@ -366,7 +366,7 @@ namespace cds_test {
                     EXPECT_TRUE( false );
                 } ));
             }
-            EXPECT_TRUE( m.empty() );
+            EXPECT_TRUE( m.empty());
             EXPECT_CONTAINER_SIZE( m, 0 );
 
             EXPECT_TRUE( m.begin() == m.end());
@@ -376,12 +376,12 @@ namespace cds_test {
             for ( auto const& i : arrKeys )
                 EXPECT_TRUE( m.insert( i ));
 
-            EXPECT_FALSE( m.empty() );
+            EXPECT_FALSE( m.empty());
             EXPECT_CONTAINER_SIZE( m, kkSize );
 
             m.clear();
 
-            EXPECT_TRUE( m.empty() );
+            EXPECT_TRUE( m.empty());
             EXPECT_CONTAINER_SIZE( m, 0 );
         }
     };
index b0797ac273b27881237ef1de61e28bb5bcf30dbc..294dae558e6593642b4439af563f85792a7b8b5e 100644 (file)
@@ -67,8 +67,8 @@ namespace cds_test {
             }
 
             for ( auto const& i : arrKeys )
-                EXPECT_TRUE( m.insert( i ) );
-            EXPECT_FALSE( m.empty() );
+                EXPECT_TRUE( m.insert( i ));
+            EXPECT_FALSE( m.empty());
             EXPECT_CONTAINER_SIZE( m, kkSize );
 
             // iterators
@@ -128,10 +128,10 @@ namespace cds_test {
                 ASSERT_TRUE( !gp );
                 gp = m.get( i );
                 ASSERT_TRUE( !gp );
-                gp = m.get_with( other_item( i.nKey ), other_less() );
+                gp = m.get_with( other_item( i.nKey ), other_less());
                 ASSERT_TRUE( !gp );
             }
-            EXPECT_TRUE( m.empty() );
+            EXPECT_TRUE( m.empty());
             EXPECT_CONTAINER_SIZE( m, 0 );
         }
     };
index 1f5dbf19bb610ff70d3e294416b70ee7a9524ab1..ddf12bfaf99449c262fe5dc229b9c2e89ebf1326 100644 (file)
@@ -90,31 +90,31 @@ namespace cds_test {
                     break;
                 case 1:
                     it = m.insert( i.nKey );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert( i.nKey ) == m.end());
                     it->second.nVal = it->first.nKey;
                     it->second.strVal = std::to_string( it->first.nKey );
                     break;
                 case 2:
                     it = m.insert( std::to_string( i.nKey ));
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert( std::to_string( i.nKey )) == m.end());
                     it->second.nVal = it->first.nKey;
                     it->second.strVal = std::to_string( it->first.nKey );
                     break;
                 case 3:
                     it = m.insert( i, val );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert( i, val ) == m.end());
                     break;
                 case 4:
                     it = m.insert( i.nKey, val.strVal );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert( i.nKey, val.strVal ) == m.end());
                     break;
                 case 5:
                     it = m.insert( val.strVal, i.nKey );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert( val.strVal, i.nKey ) == m.end());
                     break;
                 case 6:
@@ -122,7 +122,7 @@ namespace cds_test {
                         v.second.nVal = v.first.nKey;
                         v.second.strVal = std::to_string( v.first.nKey );
                     } );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert_with( i, []( map_pair& ) {
                         EXPECT_TRUE( false );
                     } ) == m.end());
@@ -132,7 +132,7 @@ namespace cds_test {
                         v.second.nVal = v.first.nKey;
                         v.second.strVal = std::to_string( v.first.nKey );
                     } );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert_with( i.nKey, []( map_pair& ) {
                         EXPECT_TRUE( false );
                     } ) == m.end());
@@ -142,14 +142,14 @@ namespace cds_test {
                         v.second.nVal = v.first.nKey;
                         v.second.strVal = std::to_string( v.first.nKey );
                     } );
-                    ASSERT_FALSE( it == m.end() );
+                    ASSERT_FALSE( it == m.end());
                     ASSERT_TRUE( m.insert_with( val.strVal, []( map_pair& ) {
                         EXPECT_TRUE( false );
                     } ) == m.end());
                     break;
                 case 9:
                     updResult = m.update( i.nKey, false );
-                    ASSERT_TRUE( updResult.first == m.end() );
+                    ASSERT_TRUE( updResult.first == m.end());
                     ASSERT_FALSE( updResult.second );
 
                     updResult = m.update( i.nKey );
@@ -158,14 +158,14 @@ namespace cds_test {
                     updResult.first->second.nVal = updResult.first->first.nKey;
 
                     updResult = m.update( i.nKey, false );
-                    ASSERT_TRUE( updResult.first != m.end() );
+                    ASSERT_TRUE( updResult.first != m.end());
                     ASSERT_FALSE( updResult.second );
                     EXPECT_EQ( updResult.first->first.nKey, updResult.first->second.nVal );
                     updResult.first->second.strVal = std::to_string( updResult.first->second.nVal );
                     break;
                 case 10:
                     updResult = m.update( i, false );
-                    ASSERT_TRUE( updResult.first == m.end() );
+                    ASSERT_TRUE( updResult.first == m.end());
                     ASSERT_FALSE( updResult.second );
 
                     updResult = m.update( i );
@@ -204,14 +204,14 @@ namespace cds_test {
                     break;
                 case 13:
                     it = m.emplace( i, i.nKey );
-                    ASSERT_TRUE( it != m.end() );
+                    ASSERT_TRUE( it != m.end());
                     ASSERT_FALSE( m.emplace( i, i.nKey ) != m.end());
                     break;
                 case 14:
                     {
                         std::string str = val.strVal;
                         it = m.emplace( i, std::move( str ));
-                        ASSERT_TRUE( it != m.end() );
+                        ASSERT_TRUE( it != m.end());
                         ASSERT_TRUE( str.empty());
                         str = val.strVal;
                         ASSERT_FALSE( m.emplace( i, std::move( str )) != m.end());
@@ -222,7 +222,7 @@ namespace cds_test {
                     {
                         std::string str = val.strVal;
                         it = m.emplace( i, i.nKey, std::move( str ));
-                        ASSERT_TRUE( it != m.end() );
+                        ASSERT_TRUE( it != m.end());
                         ASSERT_TRUE( str.empty());
                         str = val.strVal;
                         ASSERT_FALSE( m.emplace( i, i.nKey, std::move( str )) != m.end());
@@ -238,19 +238,19 @@ namespace cds_test {
                 EXPECT_EQ( it->first.nKey, it->second.nVal );
                 EXPECT_EQ( std::to_string( it->first.nKey ), it->second.strVal );
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
-            ASSERT_FALSE( m.begin() == m.end() );
-            ASSERT_FALSE( m.cbegin() == m.cend() );
+            ASSERT_FALSE( m.begin() == m.end());
+            ASSERT_FALSE( m.cbegin() == m.cend());
 
             // clear
 
             m.clear();
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
-            ASSERT_TRUE( m.begin() == m.end() );
-            ASSERT_TRUE( m.cbegin() == m.cend() );
+            ASSERT_TRUE( m.begin() == m.end());
+            ASSERT_TRUE( m.cbegin() == m.cend());
         }
     };
 
index eb831ec8b72b47be589a7737bb33500eba4a881c..17a4a2250e9cf7761b194307c57d5e033006323f 100644 (file)
@@ -67,8 +67,8 @@ namespace cds_test {
             }
 
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             // iterators
@@ -92,7 +92,7 @@ namespace cds_test {
             typedef typename Map::rcu_lock   rcu_lock;
 
             // get/extract
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             for ( auto const& i : arrKeys ) {
                 value_type const& val = arrVals.at( i.nKey );
@@ -135,7 +135,7 @@ namespace cds_test {
                             xp = m.extract( val.strVal );
                             break;
                         case 3:
-                            xp = m.extract_with( other_item( i.nKey ), other_less() );
+                            xp = m.extract_with( other_item( i.nKey ), other_less());
                             break;
                         }
                         ASSERT_FALSE( !xp );
@@ -158,7 +158,7 @@ namespace cds_test {
                             xp = m.extract( val.strVal );
                             break;
                         case 3:
-                            xp = m.extract_with( other_item( i.nKey ), other_less() );
+                            xp = m.extract_with( other_item( i.nKey ), other_less());
                             break;
                         }
                         EXPECT_TRUE( !xp );
@@ -194,7 +194,7 @@ namespace cds_test {
                         xp = m.extract( val.strVal );
                         break;
                     case 3:
-                        xp = m.extract_with( other_item( i.nKey ), other_less() );
+                        xp = m.extract_with( other_item( i.nKey ), other_less());
                         break;
                     }
                     EXPECT_TRUE( !xp );
@@ -208,12 +208,12 @@ namespace cds_test {
                     ASSERT_TRUE( !rp );
                     rp = m.get( i );
                     ASSERT_TRUE( !rp );
-                    rp = m.get_with( other_item( i.nKey ), other_less() );
+                    rp = m.get_with( other_item( i.nKey ), other_less());
                     ASSERT_TRUE( !rp );
                 }
             }
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
         }
     };
index 0e671bdb48d7278c0694043e463343d758e666ce..43432757786555a0ea54ada7ffd5bb86708878ea 100644 (file)
@@ -86,9 +86,9 @@ namespace cds_test {
                     EXPECT_TRUE( false );
                 } ));
 
-                EXPECT_TRUE( m.find( i ) == m.end() );
-                EXPECT_TRUE( m.find( i.nKey ) == m.end() );
-                EXPECT_TRUE( m.find_with( other_item( i.nKey ), other_less() ) == m.end() );
+                EXPECT_TRUE( m.find( i ) == m.end());
+                EXPECT_TRUE( m.find( i.nKey ) == m.end());
+                EXPECT_TRUE( m.find_with( other_item( i.nKey ), other_less()) == m.end());
 
                 std::pair< bool, bool > updResult;
 
@@ -271,7 +271,7 @@ namespace cds_test {
                         res = m.upsert( i, std::move( str ));
                         EXPECT_TRUE( res.first );
                         EXPECT_FALSE( res.second );
-                        EXPECT_TRUE( str.empty() );
+                        EXPECT_TRUE( str.empty());
                     }
                     break;
                 }
@@ -292,28 +292,28 @@ namespace cds_test {
                     EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
                 } ));
 
-                ASSERT_TRUE( m.find( i ) != m.end() );
-                ASSERT_TRUE( m.find( i.nKey ) != m.end() );
-                ASSERT_TRUE( m.find_with( other_item( i.nKey ), other_less() ) != m.end() );
+                ASSERT_TRUE( m.find( i ) != m.end());
+                ASSERT_TRUE( m.find( i.nKey ) != m.end());
+                ASSERT_TRUE( m.find_with( other_item( i.nKey ), other_less()) != m.end());
 
                 EXPECT_EQ( m.find( i )->first.nKey, i.nKey );
                 EXPECT_EQ( m.find( i.nKey )->first.nKey, i.nKey );
-                EXPECT_EQ( m.find_with( other_item( i.nKey ), other_less() )->first.nKey, i.nKey );
+                EXPECT_EQ( m.find_with( other_item( i.nKey ), other_less())->first.nKey, i.nKey );
 
             }
-            EXPECT_FALSE( m.empty() );
+            EXPECT_FALSE( m.empty());
             EXPECT_CONTAINER_SIZE( m, kkSize );
-            EXPECT_FALSE( m.begin() == m.end() );
-            EXPECT_FALSE( m.cbegin() == m.cend() );
+            EXPECT_FALSE( m.begin() == m.end());
+            EXPECT_FALSE( m.cbegin() == m.cend());
 
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             // erase/find
             for ( auto const& i : arrKeys ) {
-                value_type const& val( arrVals.at( i.nKey ) );
+                value_type const& val( arrVals.at( i.nKey ));
 
                 EXPECT_TRUE( m.contains( i.nKey ));
-                EXPECT_TRUE( m.contains( val.strVal ) );
+                EXPECT_TRUE( m.contains( val.strVal ));
                 EXPECT_TRUE( m.contains( i ));
                 EXPECT_TRUE( m.contains( other_item( i.nKey ), other_less()));
                 EXPECT_TRUE( m.find( i, []( map_pair const& v ) {
@@ -399,7 +399,7 @@ namespace cds_test {
                     EXPECT_TRUE( false );
                 } ));
             }
-            EXPECT_TRUE( m.empty() );
+            EXPECT_TRUE( m.empty());
             EXPECT_CONTAINER_SIZE( m, 0 );
 
             EXPECT_TRUE( m.begin() == m.end());
@@ -409,12 +409,12 @@ namespace cds_test {
             for ( auto const& i : arrKeys )
                 EXPECT_TRUE( m.insert( i ));
 
-            EXPECT_FALSE( m.empty() );
+            EXPECT_FALSE( m.empty());
             EXPECT_CONTAINER_SIZE( m, kkSize );
 
             m.clear();
 
-            EXPECT_TRUE( m.empty() );
+            EXPECT_TRUE( m.empty());
             EXPECT_CONTAINER_SIZE( m, 0 );
         }
     };
index eecc1156ca1dbb6b464b488ebc780f4df7c72e46..f8f2e867c9335ffe024b2237eaed9a467da3b0e5 100644 (file)
@@ -67,8 +67,8 @@ namespace cds_test {
             }
 
             for ( auto const& i : arrKeys )
-                EXPECT_TRUE( m.insert( i ) );
-            EXPECT_FALSE( m.empty() );
+                EXPECT_TRUE( m.insert( i ));
+            EXPECT_FALSE( m.empty());
             EXPECT_CONTAINER_SIZE( m, kkSize );
 
             // iterators
@@ -128,10 +128,10 @@ namespace cds_test {
                 ASSERT_TRUE( !gp );
                 gp = m.get( i );
                 ASSERT_TRUE( !gp );
-                gp = m.get_with( other_item( i.nKey ), other_less() );
+                gp = m.get_with( other_item( i.nKey ), other_less());
                 ASSERT_TRUE( !gp );
             }
-            EXPECT_TRUE( m.empty() );
+            EXPECT_TRUE( m.empty());
             EXPECT_CONTAINER_SIZE( m, 0u );
         }
     };
index 9c99762b339f441c182ff480a97e4b01c27759a7..b3a53f855b1feb0786b8a953fd51431af2bbf711 100644 (file)
@@ -59,8 +59,8 @@ namespace cds_test {
             shuffle( arrKeys.begin(), arrKeys.end());
 
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             // extract_min
@@ -69,33 +69,33 @@ namespace cds_test {
 
             int nKey = -1;
             size_t nCount = 0;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 gp = m.extract_min();
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->first.nKey, nKey + 1 );
                 nKey = gp->first.nKey;
                 ++nCount;
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
             EXPECT_EQ( nCount, kkSize );
 
             // extract_max
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             nKey = kkSize;
             nCount = 0;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 gp = m.extract_max();
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->first.nKey, nKey - 1 );
                 nKey = gp->first.nKey;
                 ++nCount;
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
             EXPECT_EQ( nCount, kkSize );
         }
index 6ef2234fbe6c20217d0b3ec4f0bfc7346ec6f866..63978e1358677c24295f2aab4d6446060e69f271 100644 (file)
@@ -51,7 +51,7 @@ protected:
 
         base_class::test( m );
 
-        ASSERT_TRUE( m.empty() );
+        ASSERT_TRUE( m.empty());
         ASSERT_CONTAINER_SIZE( m, 0 );
 
         typedef typename Map::exempt_ptr exempt_ptr;
@@ -65,7 +65,7 @@ protected:
 
         size_t nCount = 0;
         int nKey = 0;
-        while ( !m.empty() ) {
+        while ( !m.empty()) {
             xp = m.extract_min();
             ASSERT_FALSE( !xp );
             EXPECT_EQ( xp->first.nKey, nKey + 1 );
@@ -77,7 +77,7 @@ protected:
         xp = m.extract_max();
         ASSERT_TRUE( !xp );
         EXPECT_EQ( kkSize, nCount );
-        ASSERT_TRUE( m.empty() );
+        ASSERT_TRUE( m.empty());
         ASSERT_CONTAINER_SIZE( m, 0 );
 
         // get_max
@@ -86,7 +86,7 @@ protected:
 
         nKey = kkSize;
         nCount = 0;
-        while ( !m.empty() ) {
+        while ( !m.empty()) {
             xp = m.extract_max();
             ASSERT_FALSE( !xp );
             EXPECT_EQ( xp->first.nKey, nKey - 1 );
@@ -98,7 +98,7 @@ protected:
         xp = m.extract_max();
         ASSERT_TRUE( !xp );
         EXPECT_EQ( kkSize, nCount );
-        ASSERT_TRUE( m.empty() );
+        ASSERT_TRUE( m.empty());
         ASSERT_CONTAINER_SIZE( m, 0 );
     }
 
index 762f9379ec38de7ff42babd4e9e4c87fe1526190..8102d3555b47955f12fcf30c36da5d3727b18572 100644 (file)
@@ -42,7 +42,7 @@ namespace {
             atomics::memory_order mo_clear = convert_to_store_order(order);
             for ( int i = 0; i < 5; ++i ) {
                 EXPECT_TRUE( !f.test_and_set( order ));
-                EXPECT_TRUE( f.test_and_set( order ) );
+                EXPECT_TRUE( f.test_and_set( order ));
                 f.clear( mo_clear );
             }
         }
@@ -54,7 +54,7 @@ namespace {
 
             for ( int i = 0; i < 5; ++i ) {
                 EXPECT_TRUE( !f.test_and_set());
-                EXPECT_TRUE( f.test_and_set() );
+                EXPECT_TRUE( f.test_and_set());
                 f.clear();
             }
 
@@ -71,7 +71,7 @@ namespace {
         {
             typedef Integral    integral_type;
 
-            EXPECT_TRUE( a.is_lock_free() );
+            EXPECT_TRUE( a.is_lock_free());
             a.store( (integral_type) 0 );
             EXPECT_EQ( a, static_cast<integral_type>( 0 ));
             EXPECT_EQ( a.load(), static_cast<integral_type>( 0 ));
@@ -218,7 +218,7 @@ namespace {
             const atomics::memory_order oLoad = convert_to_load_order( order );
             const atomics::memory_order oStore = convert_to_store_order( order );
 
-            EXPECT_TRUE( a.is_lock_free() );
+            EXPECT_TRUE( a.is_lock_free());
             a.store((integral_type) 0, oStore );
             EXPECT_EQ( a, integral_type( 0 ));
             EXPECT_EQ( a.load( oLoad ), integral_type( 0 ));
@@ -355,7 +355,7 @@ namespace {
         template <class AtomicBool>
         void do_test_atomic_bool( AtomicBool& a )
         {
-            EXPECT_TRUE( a.is_lock_free() );
+            EXPECT_TRUE( a.is_lock_free());
             a.store( false );
             EXPECT_FALSE( a );
             EXPECT_FALSE( a.load());
@@ -370,7 +370,7 @@ namespace {
             EXPECT_FALSE( expected );
             EXPECT_FALSE( a.compare_exchange_weak( expected, false));
             EXPECT_TRUE( expected );
-            EXPECT_TRUE( a.load() );
+            EXPECT_TRUE( a.load());
 
             a.store( false );
 
@@ -392,7 +392,7 @@ namespace {
             const atomics::memory_order oStore = convert_to_store_order( order );
             const atomics::memory_order oExchange = convert_to_exchange_order( order );
 
-            EXPECT_TRUE( a.is_lock_free() );
+            EXPECT_TRUE( a.is_lock_free());
             a.store( false, oStore );
             EXPECT_FALSE( a );
             EXPECT_FALSE( a.load( oLoad ));
@@ -484,14 +484,14 @@ namespace {
             EXPECT_EQ( *reinterpret_cast<char *>(a.load()), 1 );
 
             p = arr;
-            EXPECT_TRUE( a.compare_exchange_weak( p, (void *)(arr + 5) ));
+            EXPECT_TRUE( a.compare_exchange_weak( p, (void *)(arr + 5)));
             EXPECT_EQ( p, arr + 0 );
-            EXPECT_FALSE( a.compare_exchange_weak( p, (void *)(arr + 3) ));
+            EXPECT_FALSE( a.compare_exchange_weak( p, (void *)(arr + 3)));
             EXPECT_EQ( p, arr + 5 );
 
-            EXPECT_TRUE( a.compare_exchange_strong( p, (void *)(arr + 3) ));
+            EXPECT_TRUE( a.compare_exchange_strong( p, (void *)(arr + 3)));
             EXPECT_EQ( p, arr + 5 );
-            EXPECT_FALSE( a.compare_exchange_strong( p, (void *)(arr + 5) ));
+            EXPECT_FALSE( a.compare_exchange_strong( p, (void *)(arr + 5)));
             EXPECT_EQ( p, arr + 3 );
 
             EXPECT_EQ( reinterpret_cast<char *>( a.exchange( (void *) arr )), arr + 3 );
index 985dc4f57e33291ad38c66d372d548f32229e362..4f7255de8d3b8f4c9a60921e3f93f92a5282cba6 100644 (file)
@@ -47,11 +47,11 @@ namespace misc {
         {
             atomics::memory_order mo_clear = convert_to_store_order(order);
 
-            f.clear( convert_to_store_order(order) );
+            f.clear( convert_to_store_order(order));
 
             for ( int i = 0; i < 5; ++i ) {
                 EXPECT_FALSE( atomics::atomic_flag_test_and_set_explicit( &f, order ));
-                EXPECT_TRUE( atomics::atomic_flag_test_and_set_explicit( &f, order ) );
+                EXPECT_TRUE( atomics::atomic_flag_test_and_set_explicit( &f, order ));
                 atomics::atomic_flag_clear_explicit( &f, mo_clear );
                 atomics::atomic_flag_clear_explicit( &f, mo_clear );
             }
@@ -64,7 +64,7 @@ namespace misc {
 
             for ( int i = 0; i < 5; ++i ) {
                 EXPECT_FALSE( atomics::atomic_flag_test_and_set( &f ));
-                EXPECT_TRUE( atomics::atomic_flag_test_and_set( &f ) );
+                EXPECT_TRUE( atomics::atomic_flag_test_and_set( &f ));
                 atomics::atomic_flag_clear(&f);
                 atomics::atomic_flag_clear(&f);
             }
@@ -81,7 +81,7 @@ namespace misc {
         {
             typedef Integral    integral_type;
 
-            EXPECT_TRUE( atomics::atomic_is_lock_free( &a ) );
+            EXPECT_TRUE( atomics::atomic_is_lock_free( &a ));
             atomics::atomic_store( &a, (integral_type) 0 );
             EXPECT_EQ( a, integral_type( 0 ));
             EXPECT_EQ( atomics::atomic_load( &a ), integral_type( 0 ));
@@ -102,7 +102,7 @@ namespace misc {
                 EXPECT_TRUE( atomics::atomic_compare_exchange_weak( &a, &expected, n));
                 EXPECT_EQ( expected, prev );
                 EXPECT_NE( expected, n );
-                EXPECT_FALSE( atomics::atomic_compare_exchange_weak( &a, &expected, n) );
+                EXPECT_FALSE( atomics::atomic_compare_exchange_weak( &a, &expected, n));
                 EXPECT_EQ( expected, n );
 
                 prev = n;
@@ -186,7 +186,7 @@ namespace misc {
             const atomics::memory_order oLoad = convert_to_load_order( order );
             const atomics::memory_order oStore = convert_to_store_order( order );
 
-            EXPECT_TRUE( atomics::atomic_is_lock_free( &a ) );
+            EXPECT_TRUE( atomics::atomic_is_lock_free( &a ));
             atomics::atomic_store_explicit( &a, (integral_type) 0, oStore );
             EXPECT_EQ( a, integral_type( 0 ));
             EXPECT_EQ( atomics::atomic_load_explicit( &a, oLoad ), (integral_type) 0 );
@@ -318,7 +318,7 @@ namespace misc {
         template <class AtomicBool>
         void do_test_atomic_bool(AtomicBool& a)
         {
-            EXPECT_TRUE( atomics::atomic_is_lock_free( &a ) );
+            EXPECT_TRUE( atomics::atomic_is_lock_free( &a ));
             atomics::atomic_store( &a, false );
             EXPECT_FALSE( a );
             EXPECT_FALSE( atomics::atomic_load( &a ));
@@ -355,7 +355,7 @@ namespace misc {
             const atomics::memory_order oStore = convert_to_store_order( order );
             const atomics::memory_order oExchange = convert_to_exchange_order( order );
 
-            EXPECT_TRUE( atomics::atomic_is_lock_free( &a ) );
+            EXPECT_TRUE( atomics::atomic_is_lock_free( &a ));
             atomics::atomic_store_explicit( &a, false, oStore );
             EXPECT_FALSE( a == false );
             EXPECT_FALSE( atomics::atomic_load_explicit( &a, oLoad ));
@@ -545,14 +545,14 @@ namespace misc {
             EXPECT_EQ( *reinterpret_cast<char *>(atomics::atomic_load( &a )), 1 );
 
             p = arr;
-            EXPECT_TRUE( atomics::atomic_compare_exchange_weak( &a, (void **) &p, (void *)(arr + 5) ));
+            EXPECT_TRUE( atomics::atomic_compare_exchange_weak( &a, (void **) &p, (void *)(arr + 5)));
             EXPECT_EQ( p, arr + 0 );
-            EXPECT_FALSE( atomics::atomic_compare_exchange_weak( &a, (void **) &p, (void *)(arr + 3) ));
+            EXPECT_FALSE( atomics::atomic_compare_exchange_weak( &a, (void **) &p, (void *)(arr + 3)));
             EXPECT_EQ( p, arr + 5 );
 
-            EXPECT_TRUE( atomics::atomic_compare_exchange_strong( &a, (void **) &p, (void *)(arr + 3) ));
+            EXPECT_TRUE( atomics::atomic_compare_exchange_strong( &a, (void **) &p, (void *)(arr + 3)));
             EXPECT_EQ( p, arr + 5 );
-            EXPECT_FALSE( atomics::atomic_compare_exchange_strong( &a, (void **) &p, (void *)(arr + 5) ));
+            EXPECT_FALSE( atomics::atomic_compare_exchange_strong( &a, (void **) &p, (void *)(arr + 5)));
             EXPECT_EQ( p, arr + 3 );
 
             EXPECT_EQ( reinterpret_cast<char *>( atomics::atomic_exchange( &a, (void *) arr )), arr + 3 );
index 6a59cb990a637375bc4fb91f04857fe1e7dca056..bba58f3110c3a3ec2a79e44b69ecdceabfccb536 100644 (file)
@@ -49,7 +49,7 @@ namespace {
                 do {
                     typename Gen::integer_type i = gen;
                     ++arr[ i ];
-                } while ( gen.next() );
+                } while ( gen.next());
 
                 for ( size_t i = 0; i < nLen; ++i )
                     EXPECT_EQ( arr[i], 1u ) << "i=" << i;
index fb413adb2675f27fea776bb6e7e53ce3f621da9b..ffb11acc5cb680e3dee2b9fef408836996845ab6 100644 (file)
@@ -55,34 +55,34 @@ namespace {
             size_t res;
 
             // Trivial case
-            ASSERT_FALSE( splitter.eos() );
+            ASSERT_FALSE( splitter.eos());
             ASSERT_FALSE( !splitter );
             res = splitter.cut(sizeof(src) * 8);
             EXPECT_EQ( res, src );
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
             EXPECT_EQ(splitter.safe_cut(sizeof(src) * 8), 0u );
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
             splitter.reset();
-            ASSERT_FALSE( splitter.eos() );
+            ASSERT_FALSE( splitter.eos());
             ASSERT_FALSE( !splitter );
             res = splitter.cut(sizeof(src) * 8);
             EXPECT_EQ( res, src );
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
             EXPECT_EQ( splitter.safe_cut(sizeof(src) * 8), 0u );
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
 
             // Cut each hex digit
             splitter.reset();
             for ( size_t i = 0; i < sizeof(size_t) * 2; ++i ) {
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 ASSERT_EQ( splitter.cut( 4 ), i );
             }
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_FALSE( splitter );
 
             // by one bit
@@ -90,11 +90,11 @@ namespace {
                 splitter.reset();
                 res = 0;
                 for ( size_t i = 0; i < sizeof(size_t) * 8; ++i ) {
-                    ASSERT_FALSE( splitter.eos() );
+                    ASSERT_FALSE( splitter.eos());
                     ASSERT_FALSE( !splitter );
                     res = res + (splitter.cut( 1 ) << i);
                 }
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 EXPECT_EQ( res, src );
             }
@@ -106,13 +106,13 @@ namespace {
                     res = 0;
                     size_t shift = 0;
                     while ( splitter ) {
-                        ASSERT_FALSE( splitter.eos() );
+                        ASSERT_FALSE( splitter.eos());
                         ASSERT_FALSE( !splitter );
                         int bits = std::rand() % 16;
                         res = res + ( splitter.safe_cut( bits ) << shift );
                         shift += bits;
                     }
-                    ASSERT_TRUE( splitter.eos() );
+                    ASSERT_TRUE( splitter.eos());
                     ASSERT_TRUE( !splitter );
                     EXPECT_EQ( res, src );
                 }
@@ -128,34 +128,34 @@ namespace {
             size_t res;
 
             // Trivial case
-            ASSERT_FALSE( splitter.eos() );
+            ASSERT_FALSE( splitter.eos());
             ASSERT_FALSE( !splitter );
             res = splitter.cut(sizeof(src) * 8);
             ASSERT_EQ( res, src );
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
             EXPECT_EQ(splitter.safe_cut(sizeof(src) * 8), 0u );
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
             splitter.reset();
-            ASSERT_FALSE( splitter.eos() );
+            ASSERT_FALSE( splitter.eos());
             ASSERT_FALSE( !splitter );
             res = splitter.cut(sizeof(src) * 8);
             EXPECT_EQ( res, src );
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
             EXPECT_EQ(splitter.safe_cut(sizeof(src) * 8), 0u );
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
 
             // Cut each hex digit
             splitter.reset();
             for ( size_t i = 0; i < sizeof(size_t) * 2; ++i ) {
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 EXPECT_EQ( splitter.cut( 4 ), 0x0F - i );
             }
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
 
             // by one bit
@@ -163,11 +163,11 @@ namespace {
                 splitter.reset();
                 res = 0;
                 for ( size_t i = 0; i < sizeof(size_t) * 8; ++i ) {
-                    ASSERT_FALSE( splitter.eos() );
+                    ASSERT_FALSE( splitter.eos());
                     ASSERT_FALSE( !splitter );
                     res = (res << 1) + splitter.cut( 1 );
                 }
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 EXPECT_EQ( res, src );
             }
@@ -178,12 +178,12 @@ namespace {
                     splitter.reset();
                     res = 0;
                     while ( splitter ) {
-                        ASSERT_FALSE( splitter.eos() );
+                        ASSERT_FALSE( splitter.eos());
                         ASSERT_FALSE( !splitter );
                         int bits = std::rand() % 16;
                         res = (res << bits) + splitter.safe_cut( bits );
                     }
-                    ASSERT_TRUE( splitter.eos() );
+                    ASSERT_TRUE( splitter.eos());
                     ASSERT_TRUE( !splitter );
                     EXPECT_EQ( res, src );
                 }
@@ -204,11 +204,11 @@ namespace {
             // Cut each hex digit
             splitter.reset();
             for ( size_t i = 0; i < sizeof(size_t) * 2; ++i ) {
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 EXPECT_EQ( static_cast<size_t>(splitter.cut( 4 )), i );
             }
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
 
             // by one bit
@@ -216,11 +216,11 @@ namespace {
                 splitter.reset();
                 res = 0;
                 for ( size_t i = 0; i < sizeof(size_t) * 8; ++i ) {
-                    ASSERT_FALSE( splitter.eos() );
+                    ASSERT_FALSE( splitter.eos());
                     ASSERT_FALSE( !splitter );
                     res = res + ( static_cast<uint64_t>(splitter.cut( 1 )) << i);
                 }
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 EXPECT_EQ( res, src );
             }
@@ -232,13 +232,13 @@ namespace {
                     res = 0;
                     size_t shift = 0;
                     while ( splitter ) {
-                        ASSERT_FALSE( splitter.eos() );
+                        ASSERT_FALSE( splitter.eos());
                         ASSERT_FALSE( !splitter );
                         int bits = std::rand() % 16;
                         res = res + ( static_cast<uint64_t>(splitter.safe_cut( bits )) << shift );
                         shift += bits;
                     }
-                    ASSERT_TRUE( splitter.eos() );
+                    ASSERT_TRUE( splitter.eos());
                     ASSERT_TRUE( !splitter );
                     EXPECT_EQ( res, src );
                 }
@@ -259,11 +259,11 @@ namespace {
             // Cut each hex digit
             splitter.reset();
             for ( size_t i = 0; i < sizeof(size_t) * 2; ++i ) {
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 EXPECT_EQ( splitter.cut( 4 ), 0x0F - i );
             }
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
 
             // by one bit
@@ -271,11 +271,11 @@ namespace {
                 splitter.reset();
                 res = 0;
                 for ( size_t i = 0; i < sizeof(size_t) * 8; ++i ) {
-                    ASSERT_FALSE( splitter.eos() );
+                    ASSERT_FALSE( splitter.eos());
                     ASSERT_FALSE( !splitter );
                     res = (res << 1) + splitter.cut( 1 );
                 }
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 EXPECT_EQ( res, src );
             }
@@ -286,12 +286,12 @@ namespace {
                     splitter.reset();
                     res = 0;
                     while ( splitter ) {
-                        ASSERT_FALSE( splitter.eos() );
+                        ASSERT_FALSE( splitter.eos());
                         ASSERT_FALSE( !splitter );
                         int bits = std::rand() % 16;
                         res = (res << bits) + splitter.safe_cut( bits );
                     }
-                    ASSERT_TRUE( splitter.eos() );
+                    ASSERT_TRUE( splitter.eos());
                     ASSERT_TRUE( !splitter );
                     EXPECT_EQ( res, src );
                 }
@@ -301,7 +301,7 @@ namespace {
 
     TEST_F( Split_bitstrig, cut_uint )
     {
-        if ( is_big_endian() )
+        if ( is_big_endian())
             cut_uint_be();
         else
             cut_uint_le();
@@ -309,7 +309,7 @@ namespace {
 
     TEST_F( Split_bitstrig, cut_uint16 )
     {
-        if ( is_big_endian() )
+        if ( is_big_endian())
             cut_small_be<uint16_t>();
         else
             cut_small_le<uint16_t>();
index 3bed9ddaa65de1a62518da082388f7932e4bccfc..6c8cdae3d4c5b3089825dd58036700246cc8c0dd 100644 (file)
@@ -54,12 +54,12 @@ namespace {
         template <class PQueue>
         void test( PQueue& pq )
         {
-            data_array<value_type> arr( pq.capacity() );
+            data_array<value_type> arr( pq.capacity());
             value_type * pFirst = arr.begin();
             value_type * pLast = arr.end();
 
-            ASSERT_TRUE( pq.empty() );
-            ASSERT_FALSE( pq.full() );
+            ASSERT_TRUE( pq.empty());
+            ASSERT_FALSE( pq.full());
             ASSERT_EQ( pq.size(), 0u );
             ASSERT_EQ( pq.capacity(), static_cast<size_t>( base_class::c_nCapacity - 1 ));
 
@@ -67,31 +67,31 @@ namespace {
 
             // Push test
             for ( value_type * p = pFirst; p < pLast; ++p ) {
-                ASSERT_TRUE( pq.push( *p ) );
-                ASSERT_FALSE( pq.empty() );
+                ASSERT_TRUE( pq.push( *p ));
+                ASSERT_FALSE( pq.empty());
                 ASSERT_EQ( pq.size(), ++nSize );
             }
 
-            ASSERT_TRUE( pq.full() );
-            ASSERT_EQ( pq.size(), pq.capacity() );
+            ASSERT_TRUE( pq.full());
+            ASSERT_EQ( pq.size(), pq.capacity());
 
             // The queue is full
             {
                 value_type k( base_class::c_nMinValue + key_type( base_class::c_nCapacity ));
-                ASSERT_FALSE( pq.push( k ) );
-                ASSERT_TRUE( pq.full() );
-                ASSERT_EQ( pq.size(), pq.capacity() );
+                ASSERT_FALSE( pq.push( k ));
+                ASSERT_TRUE( pq.full());
+                ASSERT_EQ( pq.size(), pq.capacity());
             }
 
             // Pop test
-            key_type nPrev = base_class::c_nMinValue + key_type( pq.capacity() ) - 1;
+            key_type nPrev = base_class::c_nMinValue + key_type( pq.capacity()) - 1;
             value_type * p = pq.pop();
             ASSERT_TRUE( p != nullptr );
             EXPECT_EQ( p->k, nPrev );
 
             ASSERT_EQ( pq.size(), pq.capacity() - 1 );
-            ASSERT_FALSE( pq.full() );
-            ASSERT_FALSE( pq.empty() );
+            ASSERT_FALSE( pq.full());
+            ASSERT_FALSE( pq.empty());
 
             nSize = pq.size();
             while ( pq.size() > 1u ) {
@@ -103,45 +103,45 @@ namespace {
                 ASSERT_EQ( pq.size(), nSize );
             }
 
-            ASSERT_FALSE( pq.full() );
-            ASSERT_FALSE( pq.empty() );
+            ASSERT_FALSE( pq.full());
+            ASSERT_FALSE( pq.empty());
             ASSERT_EQ( pq.size(), 1u );
 
             p = pq.pop();
             ASSERT_TRUE( p != nullptr );
             EXPECT_EQ( p->k, base_class::c_nMinValue );
 
-            ASSERT_FALSE( pq.full() );
-            ASSERT_TRUE( pq.empty() );
+            ASSERT_FALSE( pq.full());
+            ASSERT_TRUE( pq.empty());
             ASSERT_EQ( pq.size(), 0u );
 
             // Clear test
             for ( value_type * p = pFirst; p < pLast; ++p ) {
-                ASSERT_TRUE( pq.push( *p ) );
+                ASSERT_TRUE( pq.push( *p ));
             }
-            EXPECT_FALSE( pq.empty() );
-            EXPECT_TRUE( pq.full() );
-            EXPECT_EQ( pq.size(), pq.capacity() );
+            EXPECT_FALSE( pq.empty());
+            EXPECT_TRUE( pq.full());
+            EXPECT_EQ( pq.size(), pq.capacity());
             pq.clear();
-            EXPECT_TRUE( pq.empty() );
-            EXPECT_FALSE( pq.full() );
+            EXPECT_TRUE( pq.empty());
+            EXPECT_FALSE( pq.full());
             EXPECT_EQ( pq.size(), 0u );
 
             // clear_with test
             for ( value_type * p = pFirst; p < pLast; ++p ) {
-                ASSERT_TRUE( pq.push( *p ) );
+                ASSERT_TRUE( pq.push( *p ));
             }
-            ASSERT_FALSE( pq.empty() );
-            ASSERT_TRUE( pq.full() );
-            ASSERT_EQ( pq.size(), pq.capacity() );
+            ASSERT_FALSE( pq.empty());
+            ASSERT_TRUE( pq.full());
+            ASSERT_EQ( pq.size(), pq.capacity());
 
             {
                 disposer disp;
-                pq.clear_with( std::ref( disp ) );
-                ASSERT_TRUE( pq.empty() );
-                ASSERT_FALSE( pq.full() );
+                pq.clear_with( std::ref( disp ));
+                ASSERT_TRUE( pq.empty());
+                ASSERT_FALSE( pq.full());
                 ASSERT_EQ( pq.size(), 0u );
-                ASSERT_EQ( disp.m_nCallCount, pq.capacity() );
+                ASSERT_EQ( disp.m_nCallCount, pq.capacity());
             }
         }
     };
@@ -236,7 +236,7 @@ namespace {
             >::type
         > pqueue;
 
-        std::unique_ptr<pqueue> pq( new pqueue( 0 ) );
+        std::unique_ptr<pqueue> pq( new pqueue( 0 ));
         test( *pq );
     }
 
@@ -249,7 +249,7 @@ namespace {
             >::type
         > pqueue;
 
-        std::unique_ptr<pqueue> pq( new pqueue( 0 ) );
+        std::unique_ptr<pqueue> pq( new pqueue( 0 ));
         test( *pq );
     }
 
@@ -263,7 +263,7 @@ namespace {
         };
         typedef cds::intrusive::MSPriorityQueue< value_type, traits > pqueue;
 
-        std::unique_ptr<pqueue> pq( new pqueue( 0 ) );
+        std::unique_ptr<pqueue> pq( new pqueue( 0 ));
         test( *pq );
     }
 
index 2f22c7918ff62d7541b3fcf7adc6d42d14865922..e378e42cd192b5cb2abab00a88395561fa6c8684 100644 (file)
@@ -54,11 +54,11 @@ namespace {
         template <class PQueue>
         void test( PQueue& pq )
         {
-            data_array<value_type> arr( pq.capacity() );
+            data_array<value_type> arr( pq.capacity());
             value_type * pFirst = arr.begin();
             value_type * pLast = pFirst + pq.capacity();
 
-            ASSERT_TRUE( pq.empty() );
+            ASSERT_TRUE( pq.empty());
             ASSERT_EQ( pq.size(), 0u );
             ASSERT_EQ( pq.capacity(), size_t( base_class::c_nCapacity - 1 ));
 
@@ -68,50 +68,50 @@ namespace {
             for ( value_type * p = pFirst; p < pLast; ++p ) {
                 switch ( pq.size() & 3 ) {
                 case 0:
-                    ASSERT_TRUE( pq.push_with( [p]( value_type& dest ) { dest = *p; } ) );
+                    ASSERT_TRUE( pq.push_with( [p]( value_type& dest ) { dest = *p; } ));
                     break;
                 case 1:
-                    ASSERT_TRUE( pq.emplace( p->k, p->v ) );
+                    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 ) );
+                    ASSERT_TRUE( pq.push( *p ));
                 }
-                ASSERT_TRUE( !pq.empty() );
+                ASSERT_TRUE( !pq.empty());
                 ASSERT_TRUE( pq.size() == ++nSize );
             }
 
-            ASSERT_TRUE( pq.full() );
-            ASSERT_EQ( pq.size(), pq.capacity() );
+            ASSERT_TRUE( pq.full());
+            ASSERT_EQ( pq.size(), pq.capacity());
 
             // The queue is full
             key_type k = base_class::c_nMinValue + key_type( base_class::c_nCapacity );
-            ASSERT_TRUE( !pq.push( k ) );
-            ASSERT_TRUE( pq.full() );
-            ASSERT_EQ( pq.size(), pq.capacity() );
+            ASSERT_TRUE( !pq.push( k ));
+            ASSERT_TRUE( pq.full());
+            ASSERT_EQ( pq.size(), pq.capacity());
 
             // Pop test
-            key_type nPrev = base_class::c_nMinValue + key_type( pq.capacity() ) - 1;
+            key_type nPrev = base_class::c_nMinValue + key_type( pq.capacity()) - 1;
             value_type kv( 0 );
             key_type   key;
-            ASSERT_TRUE( pq.pop( kv ) );
+            ASSERT_TRUE( pq.pop( kv ));
             EXPECT_EQ( kv.k, nPrev );
 
             ASSERT_EQ( pq.size(), pq.capacity() - 1 );
-            ASSERT_TRUE( !pq.full() );
-            ASSERT_TRUE( !pq.empty() );
+            ASSERT_TRUE( !pq.full());
+            ASSERT_TRUE( !pq.empty());
 
             nSize = pq.size();
             while ( pq.size() > 1 ) {
                 if ( pq.size() & 1 ) {
-                    ASSERT_TRUE( pq.pop( kv ) );
+                    ASSERT_TRUE( pq.pop( kv ));
                     EXPECT_EQ( kv.k, nPrev - 1 );
                     nPrev = kv.k;
                 }
                 else {
-                    ASSERT_TRUE( pq.pop_with( [&key]( value_type& src ) { key = src.k;  } ) );
+                    ASSERT_TRUE( pq.pop_with( [&key]( value_type& src ) { key = src.k;  } ));
                     EXPECT_EQ( key, nPrev - 1 );
                     nPrev = key;
                 }
@@ -120,44 +120,44 @@ namespace {
                 ASSERT_EQ( pq.size(), nSize );
             }
 
-            ASSERT_TRUE( !pq.full() );
-            ASSERT_TRUE( !pq.empty() );
+            ASSERT_TRUE( !pq.full());
+            ASSERT_TRUE( !pq.empty());
             ASSERT_EQ( pq.size(), 1u );
 
-            ASSERT_TRUE( pq.pop( kv ) );
+            ASSERT_TRUE( pq.pop( kv ));
             EXPECT_EQ( kv.k, base_class::c_nMinValue );
 
-            ASSERT_TRUE( !pq.full() );
-            ASSERT_TRUE( pq.empty() );
+            ASSERT_TRUE( !pq.full());
+            ASSERT_TRUE( pq.empty());
             ASSERT_EQ( pq.size(), 0u );
 
             // Clear test
             for ( value_type * p = pFirst; p < pLast; ++p ) {
-                ASSERT_TRUE( pq.push( *p ) );
+                ASSERT_TRUE( pq.push( *p ));
             }
-            ASSERT_TRUE( !pq.empty() );
-            ASSERT_TRUE( pq.full() );
-            ASSERT_EQ( pq.size(), pq.capacity() );
+            ASSERT_TRUE( !pq.empty());
+            ASSERT_TRUE( pq.full());
+            ASSERT_EQ( pq.size(), pq.capacity());
             pq.clear();
-            ASSERT_TRUE( pq.empty() );
-            ASSERT_TRUE( !pq.full() );
+            ASSERT_TRUE( pq.empty());
+            ASSERT_TRUE( !pq.full());
             ASSERT_EQ( pq.size(), 0u );
 
             // clear_with test
             for ( value_type * p = pFirst; p < pLast; ++p ) {
-                ASSERT_TRUE( pq.push( *p ) );
+                ASSERT_TRUE( pq.push( *p ));
             }
-            ASSERT_TRUE( !pq.empty() );
-            ASSERT_TRUE( pq.full() );
-            ASSERT_EQ( pq.size(), pq.capacity() );
+            ASSERT_TRUE( !pq.empty());
+            ASSERT_TRUE( pq.full());
+            ASSERT_EQ( pq.size(), pq.capacity());
 
             {
                 disposer disp;
-                pq.clear_with( std::ref( disp ) );
-                ASSERT_TRUE( pq.empty() );
-                ASSERT_TRUE( !pq.full() );
+                pq.clear_with( std::ref( disp ));
+                ASSERT_TRUE( pq.empty());
+                ASSERT_TRUE( !pq.full());
                 ASSERT_EQ( pq.size(), 0u );
-                ASSERT_EQ( disp.m_nCallCount, pq.capacity() );
+                ASSERT_EQ( disp.m_nCallCount, pq.capacity());
             }
         }
     };
index 20468a04d57c9f26f18d84a11d8dc88d4ae322ac..2edad90a65f843c891b403966005b50e003602d8 100644 (file)
@@ -45,15 +45,15 @@ namespace cds_test {
             value_type * pFirst = arr.begin();
             value_type * pLast = arr.end();
 
-            ASSERT_TRUE( pq.empty() );
+            ASSERT_TRUE( pq.empty());
             ASSERT_TRUE( pq.size() == 0 );
 
             size_t nSize = 0;
 
             // Push test
             for ( value_type * p = pFirst; p < pLast; ++p ) {
-                ASSERT_TRUE( pq.push( *p ) );
-                ASSERT_TRUE( !pq.empty() );
+                ASSERT_TRUE( pq.push( *p ));
+                ASSERT_TRUE( !pq.empty());
                 ASSERT_EQ( pq.size(), ++nSize );
             }
 
@@ -63,15 +63,15 @@ namespace cds_test {
             key_type nPrev = PQueueTest::c_nMinValue + key_type( PQueueTest::c_nCapacity ) - 1;
             value_type kv( 0 );
 
-            ASSERT_TRUE( pq.pop( kv ) );
+            ASSERT_TRUE( pq.pop( kv ));
             EXPECT_EQ( kv.k, nPrev );
 
             ASSERT_EQ( pq.size(), static_cast<size_t>( PQueueTest::c_nCapacity - 1 ));
-            ASSERT_TRUE( !pq.empty() );
+            ASSERT_TRUE( !pq.empty());
 
             nSize = pq.size();
             while ( pq.size() > 1 ) {
-                ASSERT_TRUE( pq.pop( kv ) );
+                ASSERT_TRUE( pq.pop( kv ));
                 EXPECT_EQ( kv.k, nPrev - 1 );
                 nPrev = kv.k;
 
@@ -79,13 +79,13 @@ namespace cds_test {
                 ASSERT_EQ( pq.size(), nSize );
             }
 
-            ASSERT_TRUE( !pq.empty() );
+            ASSERT_TRUE( !pq.empty());
             ASSERT_EQ( pq.size(), 1u );
 
-            ASSERT_TRUE( pq.pop( kv ) );
+            ASSERT_TRUE( pq.pop( kv ));
             EXPECT_EQ( kv.k, PQueueTest::c_nMinValue );
 
-            ASSERT_TRUE( pq.empty() );
+            ASSERT_TRUE( pq.empty());
             ASSERT_EQ( pq.size(), 0u );
 
             // pop from empty pqueue
@@ -95,13 +95,13 @@ namespace cds_test {
 
             // Clear test
             for ( value_type * p = pFirst; p < pLast; ++p )
-                ASSERT_TRUE( pq.push( *p ) );
+                ASSERT_TRUE( pq.push( *p ));
 
-            ASSERT_TRUE( !pq.empty() );
+            ASSERT_TRUE( !pq.empty());
             ASSERT_EQ( pq.size(), static_cast<size_t>( PQueueTest::c_nCapacity ));
 
             pq.clear();
-            ASSERT_TRUE( pq.empty() );
+            ASSERT_TRUE( pq.empty());
             ASSERT_EQ( pq.size(), 0u );
         }
     };
index aa6b67af5213f77db42339d31b82c1541e61fbad..432fb6ce89a6fb6a0e8cdb608f82c9b59f3f28da 100644 (file)
@@ -46,7 +46,7 @@ namespace {
 
             const size_t nSize = 100;
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // enqueue/dequeue
@@ -54,7 +54,7 @@ namespace {
                 ASSERT_TRUE( q.enqueue( static_cast<value_type>(i)));
                 ASSERT_EQ( q.size(), i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_EQ( q.size(), nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
@@ -63,7 +63,7 @@ namespace {
                 ASSERT_EQ( it, static_cast<value_type>( i ));
                 ASSERT_EQ( q.size(), nSize - i - 1 );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // push/pop
@@ -71,39 +71,39 @@ namespace {
                 ASSERT_TRUE( q.push( static_cast<value_type>(i)));
                 ASSERT_EQ( q.size(), i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_EQ( q.size(), nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
                 it = -1;
-                ASSERT_TRUE( q.pop( it ) );
+                ASSERT_TRUE( q.pop( it ));
                 ASSERT_EQ( it, static_cast<value_type>( i ));
                 ASSERT_EQ( q.size(), nSize - i - 1 );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // clear
             for ( size_t i = 0; i < nSize; ++i ) {
                 ASSERT_TRUE( q.push( static_cast<value_type>( i )));
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_EQ( q.size(), nSize );
 
             q.clear();
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // pop from empty queue
             it = nSize * 2;
             ASSERT_FALSE( q.pop( it ));
             ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
-            ASSERT_FALSE( q.dequeue( it ) );
+            ASSERT_FALSE( q.dequeue( it ));
             ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
         }
 
@@ -124,7 +124,7 @@ namespace {
                 ASSERT_FALSE( s.empty());
                 ASSERT_EQ( q.size(), i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_EQ( q.size(), nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
@@ -133,7 +133,7 @@ namespace {
                 ASSERT_EQ( q.size(), nSize - i - 1 );
                 ASSERT_EQ( s, str[i] );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
         }
     };
index f064bcba9331934478d796a66bd8e0e094f59e96..e979b8c532bb8a98b7ddf973c992f49e00c534cb 100644 (file)
@@ -85,18 +85,18 @@ namespace {
             for ( size_t i = 0; i < nSize; ++i )
                 arr[i].nVal = static_cast<int>(i);
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // pop from empty queue
             pv = q.pop();
             ASSERT_TRUE( pv == nullptr );
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             pv = q.dequeue();
             ASSERT_TRUE( pv == nullptr );
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // push/pop test
@@ -105,21 +105,21 @@ namespace {
                     q.push( arr[i] );
                 else
                     q.enqueue( arr[i] );
-                ASSERT_FALSE( q.empty() );
+                ASSERT_FALSE( q.empty());
                 ASSERT_EQ( q.size(), i + 1 );
             }
 
             for ( size_t i = 0; i < nSize; ++i ) {
-                ASSERT_FALSE( q.empty() );
+                ASSERT_FALSE( q.empty());
                 ASSERT_EQ( q.size(), nSize - i );
                 if ( i & 1 )
                     pv = q.pop();
                 else
                     pv = q.dequeue();
                 ASSERT_FALSE( pv == nullptr );
-                ASSERT_EQ( pv->nVal, static_cast<int>(i) );
+                ASSERT_EQ( pv->nVal, static_cast<int>(i));
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // pop() doesn't call disposer
@@ -131,11 +131,11 @@ namespace {
             for ( size_t i = 0; i < nSize; ++i )
                 q.push( arr[i] );
 
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_EQ( q.size(), nSize );
 
             q.clear( true );
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             for ( size_t i = 0; i < nSize; ++i ) {
@@ -147,7 +147,7 @@ namespace {
                 q.push( arr[i] );
 
             q.clear();
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             for ( size_t i = 0; i < nSize; ++i ) {
index e623939360ce9ff2ad70a0df6f865ec060e2477a..a76a00df022050358d4f0f5517ee94e7263fda6a 100644 (file)
@@ -76,7 +76,7 @@ namespace {
         typedef cds::container::SegmentedQueue< gc_type, int, traits > test_queue;
 
         test_queue q( c_QuasiFactor );
-        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ) );
+        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ));
         test( q );
     }
 
@@ -90,7 +90,7 @@ namespace {
         typedef cds::container::SegmentedQueue< gc_type, int, traits > test_queue;
 
         test_queue q( c_QuasiFactor );
-        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ) );
+        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ));
         test( q );
     }
 
@@ -106,7 +106,7 @@ namespace {
         typedef cds::container::SegmentedQueue< gc_type, int, traits > test_queue;
 
         test_queue q( c_QuasiFactor );
-        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ) );
+        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ));
         test( q );
     }
 
@@ -115,7 +115,7 @@ namespace {
         typedef cds::container::SegmentedQueue< gc_type, std::string > test_queue;
 
         test_queue q( c_QuasiFactor );
-        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ) );
+        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ));
         test_string( q );
     }
 
@@ -128,7 +128,7 @@ namespace {
         typedef cds::container::SegmentedQueue< gc_type, std::string, traits > test_queue;
 
         test_queue q( c_QuasiFactor );
-        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ) );
+        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ));
         test_string( q );
     }
 
index f7fc972a56886ea01c7eea0fcf9da14fa47de01e..21b5e87a8e93a01142f116f3440e8ce0eca72fd5 100644 (file)
@@ -76,7 +76,7 @@ namespace {
         typedef cds::container::SegmentedQueue< cds::gc::HP, int, traits > test_queue;
 
         test_queue q( c_QuasiFactor );
-        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ) );
+        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ));
         test( q );
     }
 
@@ -90,7 +90,7 @@ namespace {
         typedef cds::container::SegmentedQueue< cds::gc::HP, int, traits > test_queue;
 
         test_queue q( c_QuasiFactor );
-        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ) );
+        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ));
         test( q );
     }
 
@@ -106,7 +106,7 @@ namespace {
         typedef cds::container::SegmentedQueue< cds::gc::HP, int, traits > test_queue;
 
         test_queue q( c_QuasiFactor );
-        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ) );
+        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ));
         test( q );
     }
 
@@ -115,7 +115,7 @@ namespace {
         typedef cds::container::SegmentedQueue< gc_type, std::string > test_queue;
 
         test_queue q( c_QuasiFactor );
-        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ) );
+        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ));
         test_string( q );
     }
 
@@ -128,7 +128,7 @@ namespace {
         typedef cds::container::SegmentedQueue< gc_type, std::string, traits > test_queue;
 
         test_queue q( c_QuasiFactor );
-        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ) );
+        ASSERT_EQ( q.quasi_factor(), cds::beans::ceil2( c_QuasiFactor ));
         test_string( q );
     }
 
index 263ed5f80c43fde8d499af28e1a4fa2af2dd9a90..18cb423eac5133dd1b1f1f54efc92913f785809a 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
 
             const size_t nSize = q.capacity();
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // enqueue/dequeue
@@ -55,16 +55,16 @@ namespace cds_test {
                 ASSERT_TRUE( q.enqueue( it ));
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
                 it = -1;
-                ASSERT_TRUE( q.dequeue( it ) );
+                ASSERT_TRUE( q.dequeue( it ));
                 ASSERT_EQ( it, static_cast<value_type>( i ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // push/pop
@@ -73,16 +73,16 @@ namespace cds_test {
                 ASSERT_TRUE( q.push( it ));
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
                 it = -1;
-                ASSERT_TRUE( q.pop( it ) );
+                ASSERT_TRUE( q.pop( it ));
                 ASSERT_EQ( it, static_cast<value_type>( i ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // push/pop with lambda
@@ -97,7 +97,7 @@ namespace cds_test {
                 ASSERT_EQ( it, -1 );
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
@@ -110,39 +110,39 @@ namespace cds_test {
                 ASSERT_EQ( it, static_cast<value_type>( i ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0u );
 
             for ( size_t i = 0; i < nSize; ++i ) {
-                ASSERT_TRUE( q.push( static_cast<value_type>(i) ) );
+                ASSERT_TRUE( q.push( static_cast<value_type>(i)) );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             // push in full queue
             ASSERT_FALSE( q.push( static_cast<int>(nSize * 2 )));
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
             it = static_cast<int>( nSize * 2 );
             ASSERT_FALSE( q.enqueue( it ));
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             // clear
             q.clear();
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0u );
 
             // pop from empty queue
             it = static_cast<int>(nSize * 2);
-            ASSERT_FALSE( q.pop( it ) );
+            ASSERT_FALSE( q.pop( it ));
             ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0u );
 
-            ASSERT_FALSE( q.dequeue( it ) );
+            ASSERT_FALSE( q.dequeue( it ));
             ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0u );
         }
 
@@ -160,13 +160,13 @@ namespace cds_test {
                 ASSERT_TRUE( q.emplace( str[i].c_str()));
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             {
                 std::string s;
                 auto f = [&s]( std::string& src ) {
-                    ASSERT_FALSE( src.empty() );
+                    ASSERT_FALSE( src.empty());
                     s = std::move( src );
                     ASSERT_NE( s, src );
                 };
@@ -180,7 +180,7 @@ namespace cds_test {
                     ASSERT_EQ( s, str[i] );
                 }
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
 
@@ -192,19 +192,19 @@ namespace cds_test {
                     ASSERT_TRUE( q.enqueue( std::move( s )));
                 else
                     ASSERT_TRUE( q.push( std::move( s )));
-                ASSERT_TRUE( s.empty() );
+                ASSERT_TRUE( s.empty());
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
                 std::string s;
-                ASSERT_TRUE( q.pop( s ) );
+                ASSERT_TRUE( q.pop( s ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
                 ASSERT_EQ( s, str[i] );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
         }
 
index 295040ac98c52ebecd6f7e80aa79e61fae77c7d7..67ed8075ae568c6bfb89edad2ec77a231501ca53 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
 
             const size_t nSize = 100;
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // enqueue/dequeue
@@ -55,16 +55,16 @@ namespace cds_test {
                 ASSERT_TRUE( q.enqueue( it ));
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
                 it = -1;
-                ASSERT_TRUE( q.dequeue( it ) );
+                ASSERT_TRUE( q.dequeue( it ));
                 ASSERT_EQ( it, static_cast<value_type>( i ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // push/pop
@@ -73,16 +73,16 @@ namespace cds_test {
                 ASSERT_TRUE( q.push( it ));
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
                 it = -1;
-                ASSERT_TRUE( q.pop( it ) );
+                ASSERT_TRUE( q.pop( it ));
                 ASSERT_EQ( it, static_cast<value_type>( i ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // push/pop with lambda
@@ -97,7 +97,7 @@ namespace cds_test {
                 ASSERT_EQ( it, -1 );
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
@@ -110,30 +110,30 @@ namespace cds_test {
                 ASSERT_EQ( it, static_cast<value_type>( i ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // clear
             for ( size_t i = 0; i < nSize; ++i ) {
-                ASSERT_TRUE( q.push( static_cast<value_type>(i) ) );
+                ASSERT_TRUE( q.push( static_cast<value_type>(i)) );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             q.clear();
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // pop from empty queue
             it = nSize * 2;
-            ASSERT_FALSE( q.pop( it ) );
+            ASSERT_FALSE( q.pop( it ));
             ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
-            ASSERT_FALSE( q.dequeue( it ) );
+            ASSERT_FALSE( q.dequeue( it ));
             ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
         }
 
@@ -151,13 +151,13 @@ namespace cds_test {
                 ASSERT_TRUE( q.emplace( str[i].c_str()));
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             {
                 std::string s;
                 auto f = [&s]( std::string& src ) {
-                    ASSERT_FALSE( src.empty() );
+                    ASSERT_FALSE( src.empty());
                     s = std::move( src );
                     ASSERT_NE( s, src );
                 };
@@ -171,31 +171,31 @@ namespace cds_test {
                     ASSERT_EQ( s, str[i] );
                 }
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
 
             // move push
             for ( size_t i = 0; i < nSize; ++i ) {
                 std::string s = str[i];
-                ASSERT_FALSE( s.empty() );
+                ASSERT_FALSE( s.empty());
                 if ( i & 1 )
                     ASSERT_TRUE( q.enqueue( std::move( s )));
                 else
                     ASSERT_TRUE( q.push( std::move( s )));
-                ASSERT_TRUE( s.empty() );
+                ASSERT_TRUE( s.empty());
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
                 std::string s;
-                ASSERT_TRUE( q.pop( s ) );
+                ASSERT_TRUE( q.pop( s ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
                 ASSERT_EQ( s, str[i] );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
         }
 
index 69a6452f731dd75e83f0647d5223743699e5f887..a5bb70732fe6967c5c337e9d426638edd90bf92b 100644 (file)
@@ -57,7 +57,7 @@ namespace cds_test {
 
             const size_t nSize = q.capacity();
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             std::vector< value_type > arr;
@@ -74,14 +74,14 @@ namespace cds_test {
                     ASSERT_TRUE( q.enqueue( i ));
                 }
                 ASSERT_CONTAINER_SIZE( q, i.nVal + 1 );
-                ASSERT_FALSE( q.empty() );
+                ASSERT_FALSE( q.empty());
             }
 
-            ASSERT_CONTAINER_SIZE( q, q.capacity() );
+            ASSERT_CONTAINER_SIZE( q, q.capacity());
 
             // pop
             int val = 0;
-            while ( !q.empty() ) {
+            while ( !q.empty()) {
                 value_type * v;
                 if ( val & 1 )
                     v = q.pop();
@@ -95,25 +95,25 @@ namespace cds_test {
             }
             ASSERT_EQ( val, static_cast<int>( nSize ));
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // pop from empty queue
             {
                 value_type * v = q.pop();
                 ASSERT_TRUE( v == nullptr );
-                ASSERT_TRUE( q.empty() );
+                ASSERT_TRUE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, 0 );
             }
 
             // clear
             for ( auto& i : arr ) {
-                ASSERT_TRUE( q.push( i ) );
+                ASSERT_TRUE( q.push( i ));
             }
-            ASSERT_FALSE( q.empty() );
-            ASSERT_CONTAINER_SIZE( q, q.capacity() );
+            ASSERT_FALSE( q.empty());
+            ASSERT_CONTAINER_SIZE( q, q.capacity());
             q.clear();
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             if ( std::is_same<typename Queue::disposer, cds::intrusive::opt::v::empty_disposer>::value ) {
@@ -131,13 +131,13 @@ namespace cds_test {
 
             // clear with disposer
             for ( auto& i : arr ) {
-                ASSERT_TRUE( q.push( i ) );
+                ASSERT_TRUE( q.push( i ));
                 i.nDisposeCount = 0;
             }
-            ASSERT_FALSE( q.empty() );
-            ASSERT_CONTAINER_SIZE( q, q.capacity() );
+            ASSERT_FALSE( q.empty());
+            ASSERT_CONTAINER_SIZE( q, q.capacity());
             q.clear( []( value_type * p ) { p->nDisposeCount = p->nVal + 1; } );
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
             // check the disposer has not been called
             for ( auto& i : arr ) {
index 3190f86680f188b7361cd287ee9a91bab98d0a92..f4e955dbf4dfde2099da8c9589df72ab4250fe2a 100644 (file)
@@ -90,18 +90,18 @@ namespace cds_test {
             for ( size_t i = 0; i < nSize; ++i )
                 arr[i].nVal = static_cast<int>(i);
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // pop from empty queue
             pv = q.pop();
             ASSERT_TRUE( pv == nullptr );
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             pv =q.dequeue();
             ASSERT_TRUE( pv == nullptr );
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // push/pop test
@@ -115,7 +115,7 @@ namespace cds_test {
             }
 
             for ( size_t i = 0; i < nSize; ++i ) {
-                ASSERT_FALSE( q.empty() );
+                ASSERT_FALSE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, nSize - i );
                 if ( i & 1 )
                     pv = q.pop();
@@ -124,7 +124,7 @@ namespace cds_test {
                 ASSERT_FALSE( pv == nullptr );
                 ASSERT_EQ( pv->nVal, static_cast<int>(i));
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             Queue::gc::scan();
@@ -138,11 +138,11 @@ namespace cds_test {
             for ( size_t i = 0; i < nSize; ++i )
                 q.push( arr[i] );
 
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             q.clear();
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             Queue::gc::scan();
index 5c1518061f6d33e8af473d90c903e39fbe59503c..90ece3481e8582985cb1309f7aa63cd39627d1c0 100644 (file)
@@ -99,19 +99,19 @@ namespace cds_test {
             // push/enqueue
             for ( size_t i = 0; i < val.size(); ++i ) {
                 if ( i & 1 ) {
-                    ASSERT_TRUE( q.push( val[i] ) );
+                    ASSERT_TRUE( q.push( val[i] ));
                 }
                 else {
-                    ASSERT_TRUE( q.enqueue( val[i] ) );
+                    ASSERT_TRUE( q.enqueue( val[i] ));
                 }
 
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            EXPECT_TRUE( !q.empty() );
+            EXPECT_TRUE( !q.empty());
 
             // pop/dequeue
             size_t nCount = 0;
-            while ( !q.empty() ) {
+            while ( !q.empty()) {
                 value_type * pVal;
                 if ( nCount & 1 )
                     pVal = q.pop();
@@ -120,21 +120,21 @@ namespace cds_test {
 
                 ASSERT_TRUE( pVal != nullptr );
 
-                int nSegment = int( nCount / q.quasi_factor() );
-                int nMin = nSegment * int( q.quasi_factor() );
-                int nMax = nMin + int( q.quasi_factor() ) - 1;
+                int nSegment = int( nCount / q.quasi_factor());
+                int nMin = nSegment * int( q.quasi_factor());
+                int nMax = nMin + int( q.quasi_factor()) - 1;
                 EXPECT_TRUE( nMin <= pVal->nValue && pVal->nValue <= nMax ) << nMin << " <= " << pVal->nValue << " <= " << nMax;
 
                 ++nCount;
                 EXPECT_CONTAINER_SIZE( q, val.size() - nCount );
             }
             EXPECT_EQ( nCount, val.size());
-            EXPECT_TRUE( q.empty() );
+            EXPECT_TRUE( q.empty());
             EXPECT_CONTAINER_SIZE( q, 0u );
 
             // pop from empty queue
             ASSERT_TRUE( q.pop() == nullptr );
-            EXPECT_TRUE( q.empty() );
+            EXPECT_TRUE( q.empty());
             EXPECT_CONTAINER_SIZE( q, 0u );
 
             // check that Disposer has not been called
@@ -146,13 +146,13 @@ namespace cds_test {
 
             // clear
             for ( size_t i = 0; i < val.size(); ++i )
-                EXPECT_TRUE( q.push( val[i] ) );
+                EXPECT_TRUE( q.push( val[i] ));
             EXPECT_CONTAINER_SIZE( q, val.size());
-            EXPECT_TRUE( !q.empty() );
+            EXPECT_TRUE( !q.empty());
 
             q.clear();
             EXPECT_CONTAINER_SIZE( q, 0u );
-            EXPECT_TRUE( q.empty() );
+            EXPECT_TRUE( q.empty());
 
             // check if Disposer has been called
             Queue::gc::force_dispose();
@@ -163,13 +163,13 @@ namespace cds_test {
 
             // clear_with
             for ( size_t i = 0; i < val.size(); ++i )
-                EXPECT_TRUE( q.push( val[i] ) );
-            EXPECT_CONTAINER_SIZE( q, val.size() );
-            EXPECT_TRUE( !q.empty() );
+                EXPECT_TRUE( q.push( val[i] ));
+            EXPECT_CONTAINER_SIZE( q, val.size());
+            EXPECT_TRUE( !q.empty());
 
-            q.clear_with( Disposer2() );
+            q.clear_with( Disposer2());
             EXPECT_CONTAINER_SIZE( q, 0u );
-            EXPECT_TRUE( q.empty() );
+            EXPECT_TRUE( q.empty());
 
             // check if Disposer has been called
             Queue::gc::force_dispose();
index 756b9f20e2fc79eca3027b4c53c8e8ee887aa2cd..db0e66da3a05fa0e41bd5ad78b71451de6454e3c 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
 
             const size_t nSize = 100;
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // enqueue/dequeue
@@ -55,21 +55,21 @@ namespace cds_test {
                 ASSERT_TRUE( q.enqueue( it ));
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
                 it = -1;
-                ASSERT_TRUE( q.dequeue( it ) );
+                ASSERT_TRUE( q.dequeue( it ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
 
-                int nSegment = int( i / q.quasi_factor() );
-                int nMin = nSegment * int( q.quasi_factor() );
-                int nMax = nMin + int( q.quasi_factor() ) - 1;
+                int nSegment = int( i / q.quasi_factor());
+                int nMin = nSegment * int( q.quasi_factor());
+                int nMax = nMin + int( q.quasi_factor()) - 1;
                 EXPECT_LE( nMin, it );
                 EXPECT_LE( it, nMax );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // push/pop
@@ -78,7 +78,7 @@ namespace cds_test {
                 ASSERT_TRUE( q.push( it ));
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             size_t nPushed = nSize;
@@ -86,7 +86,7 @@ namespace cds_test {
             size_t nOffset = nPushed % q.quasi_factor();
             for ( size_t i = 0; i < nSize; ++i ) {
                 it = -1;
-                ASSERT_TRUE( q.pop( it ) );
+                ASSERT_TRUE( q.pop( it ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
 
                 int nSegment = static_cast<int>((i + nPushed) / q.quasi_factor() - nStartSegment );
@@ -97,7 +97,7 @@ namespace cds_test {
                 EXPECT_LE( nMin, it );
                 EXPECT_LE( it, nMax );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // push/pop with lambda
@@ -112,7 +112,7 @@ namespace cds_test {
                 ASSERT_EQ( it, -1 );
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             nPushed += nSize;
@@ -135,30 +135,30 @@ namespace cds_test {
                 EXPECT_LE( nMin, it );
                 EXPECT_LE( it, nMax );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // clear
             for ( size_t i = 0; i < nSize; ++i ) {
-                ASSERT_TRUE( q.push( static_cast<value_type>(i) ) );
+                ASSERT_TRUE( q.push( static_cast<value_type>(i)) );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             q.clear();
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // pop from empty queue
             it = nSize * 2;
-            ASSERT_FALSE( q.pop( it ) );
+            ASSERT_FALSE( q.pop( it ));
             ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
-            ASSERT_FALSE( q.dequeue( it ) );
+            ASSERT_FALSE( q.dequeue( it ));
             ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
         }
 
@@ -176,13 +176,13 @@ namespace cds_test {
                 ASSERT_TRUE( q.emplace( str[i].c_str()));
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             {
                 std::string s;
                 auto f = [&s]( std::string& src ) {
-                    ASSERT_FALSE( src.empty() );
+                    ASSERT_FALSE( src.empty());
                     s = std::move( src );
                     ASSERT_NE( s, src );
                 };
@@ -196,31 +196,31 @@ namespace cds_test {
                     ASSERT_TRUE( s == str[0] || s == str[1] || s == str[2] );
                 }
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
 
             // move push
             for ( size_t i = 0; i < nSize; ++i ) {
                 std::string s = str[i];
-                ASSERT_FALSE( s.empty() );
+                ASSERT_FALSE( s.empty());
                 if ( i & 1 )
                     ASSERT_TRUE( q.enqueue( std::move( s )));
                 else
                     ASSERT_TRUE( q.push( std::move( s )));
-                ASSERT_TRUE( s.empty() );
+                ASSERT_TRUE( s.empty());
                 ASSERT_CONTAINER_SIZE( q, i + 1 );
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_CONTAINER_SIZE( q, nSize );
 
             for ( size_t i = 0; i < nSize; ++i ) {
                 std::string s;
-                ASSERT_TRUE( q.pop( s ) );
+                ASSERT_TRUE( q.pop( s ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
                 ASSERT_TRUE( s == str[0] || s == str[1] || s == str[2] );
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
         }
 
index b58f6db2fa3c4b31d97fd6c936178e993ef00678..b6cb41b7d12504fe09ba8219701fa0b8220c28d6 100644 (file)
@@ -61,7 +61,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -96,7 +96,7 @@ namespace cds_test {
 
             template <typename Q>
             explicit int_item( Q const& src )
-                : nKey( src.key() )
+                : nKey( src.key())
                 , nVal( 0 )
             {}
 
@@ -109,17 +109,17 @@ namespace cds_test {
             int_item( int_item&& src )
                 : nKey( src.nKey )
                 , nVal( src.nVal )
-                , strVal( std::move( src.strVal ) )
+                , strVal( std::move( src.strVal ))
             {}
 
             int_item( int k, std::string&& s )
                 : nKey( k )
                 , nVal( k * 2 )
-                , strVal( std::move( s ) )
+                , strVal( std::move( s ))
             {}
 
             explicit int_item( other_item const& s )
-                : nKey( s.key() )
+                : nKey( s.key())
                 , nVal( s.key() * 2 )
             {}
 
@@ -199,7 +199,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -210,16 +210,16 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                ASSERT_FALSE( s.contains( i.nKey ) );
+                ASSERT_FALSE( s.contains( i.nKey ));
                 ASSERT_FALSE( s.find( i.nKey, []( value_type& ) {} ));
 
                 std::pair<bool, bool> updResult;
@@ -239,18 +239,18 @@ namespace cds_test {
                     updResult = s.update( i, []( value_type& val, value_type * prev )
                         {
                             ASSERT_TRUE( prev != nullptr );
-                            EXPECT_EQ( val.key(), prev->key() );
+                            EXPECT_EQ( val.key(), prev->key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     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(), []( value_type& val, value_type * prev )
                         {
                             ASSERT_TRUE( prev != nullptr );
-                            EXPECT_EQ( val.key(), prev->key() );
+                            EXPECT_EQ( val.key(), prev->key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     EXPECT_FALSE( updResult.second );
@@ -284,7 +284,7 @@ namespace cds_test {
                         {
                             ASSERT_TRUE( prev != nullptr );
                             EXPECT_EQ( prev->nUpdateNewCount, 1u );
-                            EXPECT_EQ( v.key(), prev->key() );
+                            EXPECT_EQ( v.key(), prev->key());
                             ++v.nUpdateCount;
                         }, false );
                     EXPECT_TRUE( updResult.first );
@@ -308,7 +308,7 @@ namespace cds_test {
                         updResult = s.update( i.key(), []( value_type& v, value_type * prev )
                         {
                             ASSERT_TRUE( prev != nullptr );
-                            EXPECT_EQ( v.key(), prev->key() );
+                            EXPECT_EQ( v.key(), prev->key());
                             EXPECT_EQ( prev->nUpdateNewCount, 1u );
                             EXPECT_EQ( v.nUpdateNewCount, 0u );
                             ++v.nUpdateNewCount;
@@ -319,77 +319,77 @@ namespace cds_test {
                         ASSERT_TRUE( s.find( i.key(), []( value_type const& v )
                         {
                             EXPECT_EQ( v.nUpdateNewCount, 1u );
-                        } ) );
+                        } ));
                         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 ) ) );
-                    EXPECT_TRUE( str.empty() );
+                    ASSERT_TRUE( s.emplace( i.key(), std::move( str )) );
+                    EXPECT_TRUE( str.empty());
                     ASSERT_TRUE( s.find( i.key(), []( value_type const& v )
                     {
-                        EXPECT_EQ( v.strVal, std::string( "Hello!" ) );
-                    } ) );
+                        EXPECT_EQ( v.strVal, std::string( "Hello!" ));
+                    } ));
                     break;
                 default:
                     // forgot anything?..
                     ASSERT_TRUE( false );
                 }
 
-                ASSERT_TRUE( s.contains( i.nKey ) );
-                ASSERT_TRUE( s.find( i.nKey, []( value_type& ) {} ) );
+                ASSERT_TRUE( s.contains( i.nKey ));
+                ASSERT_TRUE( s.find( i.nKey, []( value_type& ) {} ));
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                ASSERT_TRUE( s.contains( i.nKey ) );
+                ASSERT_TRUE( s.contains( i.nKey ));
                 ASSERT_TRUE( s.find( i.nKey, []( value_type& v )
                 {
                     v.nFindCount = 1;
-                } ) );
+                } ));
 
                 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 )
                     {
                         EXPECT_EQ( v.nFindCount, 1u );
                         nKey = v.key();
-                    } ) );
+                    } ));
                     EXPECT_EQ( i.key(), nKey );
 
                     nKey = i.key() - 1;
                     ASSERT_FALSE( s.erase( i.key(), [&nKey]( value_type const& v )
                     {
                         nKey = v.key();
-                    } ) );
+                    } ));
                     EXPECT_EQ( i.key(), nKey + 1 );
                     break;
                 }
 
-                ASSERT_FALSE( s.contains( i.nKey ) );
-                ASSERT_FALSE( s.find( i.nKey, []( value_type const& ) {} ) );
+                ASSERT_FALSE( s.contains( i.nKey ));
+                ASSERT_FALSE( s.find( i.nKey, []( value_type const& ) {} ));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
 
             // clear
             for ( auto& i : data ) {
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
             {
@@ -398,24 +398,24 @@ namespace cds_test {
 
                 std::vector< typename Set::level_statistics > lstat;
                 s.get_level_statistics( lstat );
-                EXPECT_EQ( lstat[0].node_capacity, s.head_size() );
+                EXPECT_EQ( lstat[0].node_capacity, s.head_size());
                 for ( size_t i = 1; i < lstat.size(); ++i ) {
                     EXPECT_EQ( lstat[i].node_capacity, s.array_node_size());
                 }
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             s.clear();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
-            ASSERT_TRUE( s.begin() == s.end() );
-            ASSERT_TRUE( s.cbegin() == s.cend() );
-            ASSERT_TRUE( s.rbegin() == s.rend() );
-            ASSERT_TRUE( s.crbegin() == s.crend() );
+            ASSERT_TRUE( s.begin() == s.end());
+            ASSERT_TRUE( s.cbegin() == s.cend());
+            ASSERT_TRUE( s.rbegin() == s.rend());
+            ASSERT_TRUE( s.crbegin() == s.crend());
         }
     };
 
index 8d4ad882b0e092cf476b22fceaffb7bb468bd9f1..805e5a79e21c3d491f75df42e481f87a81404e3a 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             base_class::test( s );
@@ -59,15 +59,15 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             for ( auto& i : data ) {
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // iterator test
@@ -100,7 +100,7 @@ namespace cds_test {
 
                 gp = s.get( i.key());
                 ASSERT_FALSE( !gp );
-                EXPECT_EQ( gp->key(), i.key() );
+                EXPECT_EQ( gp->key(), i.key());
                 EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 2 ));
                 gp->nFindCount *= 2;
 
@@ -112,33 +112,33 @@ namespace cds_test {
                 auto& i = data[idx];
 
                 ASSERT_TRUE( !gp );
-                gp = s.extract( i.key() );
+                gp = s.extract( i.key());
                 ASSERT_FALSE( !gp );
-                EXPECT_EQ( gp->key(), i.key() );
+                EXPECT_EQ( gp->key(), i.key());
                 EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 4 ));
 
-                gp = s.extract( i.key() );
+                gp = s.extract( i.key());
                 ASSERT_TRUE( !gp );
             }
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // erase_at()
             for ( auto& i : data ) {
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             for ( auto it = s.begin(); it != s.end(); ++it ) {
                 int key = it->key();
                 ASSERT_TRUE( s.erase_at( it ));
                 EXPECT_EQ( it->key(), key );
-                ASSERT_FALSE( s.erase_at( it ) );
+                ASSERT_FALSE( s.erase_at( it ));
             }
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
         }
 
index 1ec3628338fb0c0d21c8d3052c74671495648ffa..bf75929947394886bc752d1dccad92d8c725b6bf 100644 (file)
@@ -53,7 +53,7 @@ namespace {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             base_class::test( s );
@@ -66,15 +66,15 @@ namespace {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             for ( auto& i : data ) {
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             typedef typename Set::rcu_lock rcu_lock;
@@ -110,7 +110,7 @@ namespace {
                     rcu_lock l;
                     value_type * p = s.get( i.key());
                     ASSERT_TRUE( p != nullptr );
-                    EXPECT_EQ( p->key(), i.key() );
+                    EXPECT_EQ( p->key(), i.key());
                     EXPECT_EQ( p->nFindCount, static_cast<size_t>( i.key() * 2 ));
                     p->nFindCount *= 2;
                 }
@@ -122,22 +122,22 @@ namespace {
                 auto& i = data[idx];
 
                 ASSERT_TRUE( !xp );
-                xp = s.extract( i.key() );
+                xp = s.extract( i.key());
                 ASSERT_FALSE( !xp );
-                EXPECT_EQ( xp->key(), i.key() );
+                EXPECT_EQ( xp->key(), i.key());
                 EXPECT_EQ( xp->nFindCount, static_cast<size_t>( i.key() * 4 ));
 
-                xp = s.extract( i.key() );
+                xp = s.extract( i.key());
                 ASSERT_TRUE( !xp );
 
                 {
                     rcu_lock l;
-                    value_type * p = s.get( i.key() );
+                    value_type * p = s.get( i.key());
                     EXPECT_TRUE( p == nullptr );
                 }
             }
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
         }
 
index 394483dbfda6809c9dadc867a28b0b8240a0f1cb..3a45bc24a21ec9ba48f1a47b1816f6a1941faf9c 100644 (file)
@@ -44,7 +44,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -55,24 +55,24 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                EXPECT_FALSE( s.contains( i.nKey ) );
-                EXPECT_FALSE( s.contains( i ) );
-                EXPECT_FALSE( s.contains( other_item( i.key() ), other_less()));
+                EXPECT_FALSE( s.contains( i.nKey ));
+                EXPECT_FALSE( s.contains( i ));
+                EXPECT_FALSE( s.contains( other_item( i.key()), other_less()));
                 EXPECT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 EXPECT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 EXPECT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
                 EXPECT_TRUE( s.find( i ) == s.end());
-                EXPECT_TRUE( s.find( i.nKey ) == s.end() );
-                EXPECT_TRUE( s.find_with( other_item( i.key()), other_less()) == s.end() );
+                EXPECT_TRUE( s.find( i.nKey ) == s.end());
+                EXPECT_TRUE( s.find_with( other_item( i.key()), other_less()) == s.end());
 
                 std::pair<bool, bool> updResult;
 
@@ -91,18 +91,18 @@ namespace cds_test {
                     updResult = s.update( i, []( value_type& val, value_type* old)
                         {
                             ASSERT_FALSE( old == nullptr );
-                            EXPECT_EQ( val.key(), old->key() );
+                            EXPECT_EQ( val.key(), old->key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     EXPECT_FALSE( updResult.second );
                     break;
                 case 1:
-                    EXPECT_TRUE( s.insert( i.key() ));
-                    EXPECT_FALSE( s.insert( i.key() ));
+                    EXPECT_TRUE( s.insert( i.key()));
+                    EXPECT_FALSE( s.insert( i.key()));
                     updResult = s.update( i.key(), []( value_type& val, value_type* old)
                         {
                             ASSERT_FALSE( old == nullptr );
-                            EXPECT_EQ( val.key(), old->key() );
+                            EXPECT_EQ( val.key(), old->key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     EXPECT_FALSE( updResult.second );
@@ -129,7 +129,7 @@ namespace cds_test {
                     updResult = s.update( i, [&i]( value_type& v, value_type* old )
                         {
                             EXPECT_TRUE( old == nullptr );
-                            EXPECT_EQ( v.key(), i.key() );
+                            EXPECT_EQ( v.key(), i.key());
                             ++v.nUpdateNewCount;
                         });
                     EXPECT_TRUE( updResult.first );
@@ -138,7 +138,7 @@ namespace cds_test {
                     updResult = s.update( i, []( value_type& v, value_type* old )
                         {
                             ASSERT_FALSE( old == nullptr );
-                            EXPECT_EQ( v.key(), old->key() );
+                            EXPECT_EQ( v.key(), old->key());
                             EXPECT_EQ( old->nUpdateNewCount, 1u );
                             v.nUpdateNewCount = old->nUpdateNewCount;
                             ++v.nUpdateCount;
@@ -157,7 +157,7 @@ namespace cds_test {
                     updResult = s.update( i.key(), [&i]( value_type& v, value_type* old )
                         {
                             EXPECT_TRUE( old == nullptr );
-                            EXPECT_EQ( v.key(), i.key() );
+                            EXPECT_EQ( v.key(), i.key());
                             ++v.nUpdateNewCount;
                         });
                     EXPECT_TRUE( updResult.first );
@@ -166,7 +166,7 @@ namespace cds_test {
                     updResult = s.update( i.key(), []( value_type& v, value_type* old )
                         {
                             EXPECT_FALSE( old == nullptr );
-                            EXPECT_EQ( v.key(), old->key() );
+                            EXPECT_EQ( v.key(), old->key());
                             EXPECT_EQ( old->nUpdateNewCount, 1u );
                             v.nUpdateNewCount = old->nUpdateNewCount;
                             ++v.nUpdateCount;
@@ -176,7 +176,7 @@ namespace cds_test {
 
                     EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nUpdateNewCount, 1u );
                             EXPECT_EQ( v.nUpdateCount, 1u );
                     }));
@@ -185,7 +185,7 @@ namespace cds_test {
                     EXPECT_TRUE( s.emplace( i.key()));
                     EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nVal, arg.nVal );
                         }));
                     break;
@@ -195,21 +195,21 @@ namespace cds_test {
                     EXPECT_TRUE( str.empty());
                     EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nVal, arg.nVal );
                             EXPECT_EQ( v.strVal, std::string( "Hello!" ));
                         } ));
                     break;
                 case 8:
                     str = "Hello!";
-                    EXPECT_TRUE( s.insert( value_type( i.key(), std::move( str ))) );
-                    EXPECT_TRUE( str.empty() );
+                    EXPECT_TRUE( s.insert( value_type( i.key(), std::move( str ))));
+                    EXPECT_TRUE( str.empty());
                     EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                     {
-                        EXPECT_EQ( v.key(), arg.key() );
+                        EXPECT_EQ( v.key(), arg.key());
                         EXPECT_EQ( v.nVal, arg.nVal );
-                        EXPECT_EQ( v.strVal, std::string( "Hello!" ) );
-                    } ) );
+                        EXPECT_EQ( v.strVal, std::string( "Hello!" ));
+                    } ));
                     break;
                 case 9:
                     updResult = s.upsert( i.key(), false );
@@ -226,8 +226,8 @@ namespace cds_test {
 
                     EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                     {
-                        EXPECT_EQ( v.key(), arg.key() );
-                    } ) );
+                        EXPECT_EQ( v.key(), arg.key());
+                    } ));
                     break;
                 case 10:
                     updResult = s.upsert( i, false );
@@ -244,36 +244,36 @@ namespace cds_test {
 
                     EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                     {
-                        EXPECT_EQ( v.key(), arg.key() );
-                    } ) );
+                        EXPECT_EQ( v.key(), arg.key());
+                    } ));
                     break;
                 default:
                     // forgot anything?..
                     EXPECT_TRUE( false );
                 }
 
-                EXPECT_TRUE( s.contains( i.nKey ) );
-                EXPECT_TRUE( s.contains( i ) );
-                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& ) {} ) );
+                EXPECT_TRUE( s.contains( i.nKey ));
+                EXPECT_TRUE( s.contains( i ));
+                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& ) {} ));
                 EXPECT_FALSE( s.find( i.nKey ) == s.end());
-                EXPECT_FALSE( s.find( i ) == s.end() );
-                EXPECT_FALSE( s.find_with( other_item( i.key() ), other_less()) == s.end() );
+                EXPECT_FALSE( s.find( i ) == s.end());
+                EXPECT_FALSE( s.find_with( other_item( i.key()), other_less()) == s.end());
             }
 
-            EXPECT_FALSE( s.empty() );
+            EXPECT_FALSE( s.empty());
             EXPECT_CONTAINER_SIZE( s, nSetSize );
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                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( i.nKey ));
+                EXPECT_TRUE( s.contains( i ));
+                EXPECT_TRUE( s.contains( other_item( i.key()), other_less()) );
                 EXPECT_TRUE( s.find( i.nKey, []( value_type& v, int )
                     {
                         v.nFindCount = 1;
@@ -282,7 +282,7 @@ namespace cds_test {
                     {
                         EXPECT_EQ( ++v.nFindCount, 2u );
                     }));
-                EXPECT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& )
+                EXPECT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& )
                     {
                         EXPECT_EQ( ++v.nFindCount, 3u );
                     }));
@@ -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 )
@@ -345,32 +345,32 @@ namespace cds_test {
                     break;
                 }
 
-                EXPECT_FALSE( s.contains( i.nKey ) );
-                EXPECT_FALSE( s.contains( i ) );
-                EXPECT_FALSE( s.contains( other_item( i.key() ), other_less()));
+                EXPECT_FALSE( s.contains( i.nKey ));
+                EXPECT_FALSE( s.contains( i ));
+                EXPECT_FALSE( s.contains( other_item( i.key()), other_less()));
                 EXPECT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 EXPECT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 EXPECT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
             }
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0u );
 
 
             // clear
             for ( auto& i : data ) {
-                EXPECT_TRUE( s.insert( i ) );
+                EXPECT_TRUE( s.insert( i ));
             }
 
-            EXPECT_FALSE( s.empty() );
+            EXPECT_FALSE( s.empty());
             EXPECT_CONTAINER_SIZE( s, nSetSize );
 
             s.clear();
 
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0u );
 
-            EXPECT_TRUE( s.begin() == s.end() );
-            EXPECT_TRUE( s.cbegin() == s.cend() );
+            EXPECT_TRUE( s.begin() == s.end());
+            EXPECT_TRUE( s.cbegin() == s.cend());
         }
     };
 
index a9f20ca87d37dc2eecbf739e99d4e72992d047d4..ba0679b97827d29efe318d2ea17b715f8f30ca3e 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0 );
 
             base_class::test( s );
@@ -59,15 +59,15 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             for ( auto& i : data ) {
-                EXPECT_TRUE( s.insert( i ) );
+                EXPECT_TRUE( s.insert( i ));
             }
-            EXPECT_FALSE( s.empty() );
+            EXPECT_FALSE( s.empty());
             EXPECT_CONTAINER_SIZE( s, nSetSize );
 
             // iterator test
@@ -89,7 +89,7 @@ namespace cds_test {
                 EXPECT_TRUE( !gp );
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.get( i.key() );
+                    gp = s.get( i.key());
                     ASSERT_FALSE( !gp );
                     break;
                 case 1:
@@ -97,10 +97,10 @@ namespace cds_test {
                     ASSERT_FALSE( !gp );
                     break;
                 case 2:
-                    gp = s.get_with( other_item( i.key() ), other_less() );
+                    gp = s.get_with( other_item( i.key()), other_less());
                     ASSERT_FALSE( !gp );
                 }
-                EXPECT_EQ( gp->key(), i.key() );
+                EXPECT_EQ( gp->key(), i.key());
                 EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 3 ));
                 gp->nFindCount *= 2;
 
@@ -114,7 +114,7 @@ namespace cds_test {
                 EXPECT_TRUE( !gp );
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.extract( i.key() );
+                    gp = s.extract( i.key());
                     ASSERT_FALSE( !gp );
                     break;
                 case 1:
@@ -122,28 +122,28 @@ namespace cds_test {
                     ASSERT_FALSE( !gp );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     ASSERT_FALSE( !gp );
                     break;
                 }
-                EXPECT_EQ( gp->key(), i.key() );
+                EXPECT_EQ( gp->key(), i.key());
                 EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 6 ));
 
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.extract( i.key() );
+                    gp = s.extract( i.key());
                     break;
                 case 1:
                     gp = s.extract( i );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     break;
                 }
                 EXPECT_TRUE( !gp );
             }
 
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0 );
         }
 
index 7a232ba4f8b455e6d45ebb39e5ef68b9f7b326a6..cc562c996aa92aa057f6fb1398535d7d14ddfd54 100644 (file)
@@ -48,7 +48,7 @@ namespace cds_test {
 
             base_class::test( s );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             typedef typename Set::value_type value_type;
@@ -59,15 +59,15 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             for ( auto i : indices ) {
                 ASSERT_TRUE( s.insert( data[i] ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             typedef typename Set::guarded_ptr guarded_ptr;
@@ -76,7 +76,7 @@ namespace cds_test {
             // extract_min
             size_t nCount = 0;
             int nKey = -1;
-            while ( !s.empty() ) {
+            while ( !s.empty()) {
                 gp = s.extract_min();
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( nKey + 1, gp->key());
@@ -86,19 +86,19 @@ namespace cds_test {
             gp.release();
             EXPECT_EQ( nCount, nSetSize );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // extract_max
             for ( auto i : indices ) {
-                ASSERT_TRUE( s.insert( data[i] ) );
+                ASSERT_TRUE( s.insert( data[i] ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             nCount = 0;
             nKey = nSetSize;
-            while ( !s.empty() ) {
+            while ( !s.empty()) {
                 gp = s.extract_max();
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( nKey - 1, gp->key());
@@ -108,7 +108,7 @@ namespace cds_test {
             gp.release();
             EXPECT_EQ( nCount, nSetSize );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
         }
     };
index 31f1e5e34ba5db40a948c0746572090e0fee16a5..946e605afb0c8c3ca1078235785a40f8e87f94e5 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -57,18 +57,18 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                ASSERT_FALSE( s.contains( i.nKey ) );
-                ASSERT_FALSE( s.contains( i ) );
-                ASSERT_FALSE( s.contains( other_item( i.key() ), other_less()));
+                ASSERT_FALSE( s.contains( i.nKey ));
+                ASSERT_FALSE( s.contains( i ));
+                ASSERT_FALSE( s.contains( other_item( i.key()), other_less()));
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
@@ -90,14 +90,14 @@ namespace cds_test {
                     updResult = s.update( i, []( bool bNew, value_type& val, value_type const& arg)
                         {
                             EXPECT_FALSE( bNew );
-                            EXPECT_EQ( val.key(), arg.key() );
+                            EXPECT_EQ( val.key(), arg.key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     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 );
@@ -128,7 +128,7 @@ namespace cds_test {
                     updResult = s.update( i, []( bool bNew, value_type& v, value_type const& arg )
                         {
                             EXPECT_TRUE( bNew );
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             ++v.nUpdateNewCount;
                         });
                     EXPECT_TRUE( updResult.first );
@@ -137,7 +137,7 @@ namespace cds_test {
                     updResult = s.update( i, []( bool bNew, value_type& v, value_type const& arg )
                         {
                             EXPECT_FALSE( bNew );
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             ++v.nUpdateNewCount;
                         }, false );
                     EXPECT_TRUE( updResult.first );
@@ -170,7 +170,7 @@ namespace cds_test {
 
                     ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nUpdateNewCount, 2u );
                         }));
                     break;
@@ -178,7 +178,7 @@ namespace cds_test {
                     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() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nVal, arg.nVal );
                         }));
                     break;
@@ -188,35 +188,35 @@ namespace cds_test {
                     EXPECT_TRUE( str.empty());
                     ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nVal, arg.nVal );
                             EXPECT_EQ( v.strVal, std::string( "Hello!" ));
-                        } ) );
+                        } ));
                     break;
                 default:
                     // forgot anything?..
                     ASSERT_TRUE( false );
                 }
 
-                ASSERT_TRUE( s.contains( i.nKey ) );
-                ASSERT_TRUE( s.contains( i ) );
-                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& ) {} ) );
+                ASSERT_TRUE( s.contains( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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& ) {} ));
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) );
                 ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int )
                     {
                         v.nFindCount = 1;
@@ -225,7 +225,7 @@ namespace cds_test {
                     {
                         EXPECT_EQ( ++v.nFindCount, 2u );
                     }));
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& )
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& )
                     {
                         EXPECT_EQ( ++v.nFindCount, 3u );
                     }));
@@ -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 )
@@ -288,32 +288,32 @@ namespace cds_test {
                     break;
                 }
 
-                ASSERT_FALSE( s.contains( i.nKey ) );
-                ASSERT_FALSE( s.contains( i ) );
-                ASSERT_FALSE( s.contains( other_item( i.key() ), other_less()));
+                ASSERT_FALSE( s.contains( i.nKey ));
+                ASSERT_FALSE( s.contains( i ));
+                ASSERT_FALSE( s.contains( other_item( i.key()), other_less()));
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
 
             // clear
             for ( auto& i : data ) {
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             s.clear();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
-            ASSERT_TRUE( s.begin() == s.end() );
-            ASSERT_TRUE( s.cbegin() == s.cend() );
+            ASSERT_TRUE( s.begin() == s.end());
+            ASSERT_TRUE( s.cbegin() == s.cend());
         }
     };
 
index 00fc3e2a10883021a3b86a3342f75fdb79e0d714..23676c1db82aa86d05b0e4306805348d2b0b88e0 100644 (file)
@@ -61,7 +61,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -96,7 +96,7 @@ namespace cds_test {
 
             template <typename Q>
             explicit int_item( Q const& src )
-                : nKey( src.key() )
+                : nKey( src.key())
                 , nVal( 0 )
             {}
 
@@ -109,17 +109,17 @@ namespace cds_test {
             int_item( int_item&& src )
                 : nKey( src.nKey )
                 , nVal( src.nVal )
-                , strVal( std::move( src.strVal ) )
+                , strVal( std::move( src.strVal ))
             {}
 
             int_item( int k, std::string&& s )
                 : nKey( k )
                 , nVal( k * 2 )
-                , strVal( std::move( s ) )
+                , strVal( std::move( s ))
             {}
 
             explicit int_item( other_item const& s )
-                : nKey( s.key() )
+                : nKey( s.key())
                 , nVal( s.key() * 2 )
             {}
 
@@ -193,7 +193,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( int_item const& v1, int_item const& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -209,7 +209,7 @@ namespace cds_test {
             template <typename T>
             int operator ()( int v1, T const& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
index 3f099fade2c7c67c531831b3bd1985636420a0ba..03f1c270cbd85a9aa5514ce5f96242afd64c3512 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             base_class::test( s );
@@ -59,15 +59,15 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             for ( auto& i : data ) {
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // iterator test
@@ -89,7 +89,7 @@ namespace cds_test {
                 ASSERT_TRUE( !gp );
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.get( i.key() );
+                    gp = s.get( i.key());
                     ASSERT_FALSE( !gp );
                     break;
                 case 1:
@@ -97,10 +97,10 @@ namespace cds_test {
                     ASSERT_FALSE( !gp );
                     break;
                 case 2:
-                    gp = s.get_with( other_item( i.key() ), other_less() );
+                    gp = s.get_with( other_item( i.key()), other_less());
                     ASSERT_FALSE( !gp );
                 }
-                EXPECT_EQ( gp->key(), i.key() );
+                EXPECT_EQ( gp->key(), i.key());
                 EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 3 ));
                 gp->nFindCount *= 2;
 
@@ -114,7 +114,7 @@ namespace cds_test {
                 ASSERT_TRUE( !gp );
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.extract( i.key() );
+                    gp = s.extract( i.key());
                     ASSERT_FALSE( !gp );
                     break;
                 case 1:
@@ -122,28 +122,28 @@ namespace cds_test {
                     ASSERT_FALSE( !gp );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     ASSERT_FALSE( !gp );
                     break;
                 }
-                EXPECT_EQ( gp->key(), i.key() );
+                EXPECT_EQ( gp->key(), i.key());
                 EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 6 ));
 
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.extract( i.key() );
+                    gp = s.extract( i.key());
                     break;
                 case 1:
                     gp = s.extract( i );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     break;
                 }
                 ASSERT_TRUE( !gp );
             }
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
         }
 
index ef4567c7fcb80b36d96dc1f5242f5bdbe7178a69..7eb805d97c5f5cefeacb148f2f1e4cd0580b1a4a 100644 (file)
@@ -60,7 +60,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -95,7 +95,7 @@ namespace cds_test {
 
             template <typename Q>
             explicit int_item( Q const& src )
-                : nKey( src.key() )
+                : nKey( src.key())
                 , nVal( 0 )
             {}
 
@@ -108,17 +108,17 @@ namespace cds_test {
             int_item( int_item&& src )
                 : nKey( src.nKey )
                 , nVal( src.nVal )
-                , strVal( std::move( src.strVal ) )
+                , strVal( std::move( src.strVal ))
             {}
 
             int_item( int k, std::string&& s )
                 : nKey( k )
                 , nVal( k * 2 )
-                , strVal( std::move( s ) )
+                , strVal( std::move( s ))
             {}
 
             explicit int_item( other_item const& s )
-                : nKey( s.key() )
+                : nKey( s.key())
                 , nVal( s.key() * 2 )
             {}
 
@@ -192,7 +192,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( int_item const& v1, int_item const& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -208,7 +208,7 @@ namespace cds_test {
             template <typename T>
             int operator ()( int v1, T const& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -229,7 +229,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -240,18 +240,18 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                ASSERT_FALSE( s.contains( i.nKey ) != s.end() );
-                ASSERT_FALSE( s.contains( i ) != s.end() );
-                ASSERT_FALSE( s.contains( other_item( i.key() ), other_less()) != s.end());
+                ASSERT_FALSE( s.contains( i.nKey ) != s.end());
+                ASSERT_FALSE( s.contains( i ) != s.end());
+                ASSERT_FALSE( s.contains( other_item( i.key()), other_less()) != s.end());
 
                 std::pair<typename Set::iterator, bool> updResult;
 
@@ -264,7 +264,7 @@ namespace cds_test {
                 switch ( idx % 6 ) {
                 case 0:
                     it = s.insert( i );
-                    ASSERT_TRUE( it != s.end() );
+                    ASSERT_TRUE( it != s.end());
                     it->nFindCount = it->nKey;
                     ASSERT_TRUE( s.insert( i ) == s.end());
                     updResult = s.update( i, false );
@@ -272,9 +272,9 @@ namespace cds_test {
                     EXPECT_FALSE( updResult.second );
                     break;
                 case 1:
-                    it = s.insert( i.key() );
+                    it = s.insert( i.key());
                     ASSERT_TRUE( it != s.end());
-                    ASSERT_TRUE( s.insert( i.key() ) == s.end());
+                    ASSERT_TRUE( s.insert( i.key()) == s.end());
                     it->nFindCount = it->nKey;
                     updResult = s.update( i.key(), false );
                     EXPECT_TRUE( updResult.first == it );
@@ -288,7 +288,7 @@ namespace cds_test {
                     break;
                 case 3:
                     updResult = s.update( i.key());
-                    EXPECT_TRUE( updResult.first != s.end() );
+                    EXPECT_TRUE( updResult.first != s.end());
                     EXPECT_TRUE( updResult.second );
                     updResult.first->nFindCount = updResult.first->nKey;
                     break;
@@ -296,17 +296,17 @@ namespace cds_test {
                     it = s.emplace( i.key());
                     ASSERT_TRUE( it != s.end());
                     it->nFindCount = it->nKey;
-                    ASSERT_FALSE( s.emplace( i.key() ) != s.end());
+                    ASSERT_FALSE( s.emplace( i.key()) != s.end());
                     break;
                 case 5:
                     str = "Hello!";
                     it = s.emplace( i.key(), std::move( str ));
-                    ASSERT_TRUE( it != s.end() );
+                    ASSERT_TRUE( it != s.end());
                     EXPECT_TRUE( str.empty());
                     it->nFindCount = it->nKey;
                     str = "Hello!";
                     ASSERT_TRUE( s.emplace( i.key(), std::move( str )) == s.end());
-                    EXPECT_TRUE( str.empty() ); // yes, that's is :(
+                    EXPECT_TRUE( str.empty()); // yes, that's is :(
                     break;
                 default:
                     // forgot anything?..
@@ -314,13 +314,13 @@ namespace cds_test {
                 }
 
                 it = s.contains( i.nKey );
-                ASSERT_TRUE( it != s.end() );
+                ASSERT_TRUE( it != s.end());
                 EXPECT_EQ( it->nFindCount, static_cast<unsigned>( it->nKey ));
-                ASSERT_TRUE( s.contains( i ) != s.end() );
-                ASSERT_TRUE( s.contains( other_item( i.key() ), other_less() ) != s.end());
+                ASSERT_TRUE( s.contains( i ) != s.end());
+                ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) != s.end());
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // iterators
@@ -336,11 +336,11 @@ namespace cds_test {
 
             s.clear();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
-            ASSERT_TRUE( s.begin() == s.end() );
-            ASSERT_TRUE( s.cbegin() == s.cend() );
+            ASSERT_TRUE( s.begin() == s.end());
+            ASSERT_TRUE( s.cbegin() == s.cend());
         }
     };
 
index 876972ac4d2f4beb9b74995e0c4e4450fdd001cd..4d0399784eab95cf7f9adbccc7998af4b37d550e 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             base_class::test( s );
@@ -59,15 +59,15 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             for ( auto& i : data ) {
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // iterator test
@@ -93,7 +93,7 @@ namespace cds_test {
                     ASSERT_TRUE( !rp );
                     switch ( idx % 3 ) {
                     case 0:
-                        rp = s.get( i.key() );
+                        rp = s.get( i.key());
                         ASSERT_FALSE( !rp );
                         break;
                     case 1:
@@ -101,10 +101,10 @@ namespace cds_test {
                         ASSERT_FALSE( !rp );
                         break;
                     case 2:
-                        rp = s.get_with( other_item( i.key() ), other_less() );
+                        rp = s.get_with( other_item( i.key()), other_less());
                         ASSERT_FALSE( !rp );
                     }
-                    EXPECT_EQ( rp->key(), i.key() );
+                    EXPECT_EQ( rp->key(), i.key());
                     EXPECT_EQ( rp->nFindCount, static_cast<unsigned>( i.key() * 3 ));
                     rp->nFindCount *= 2;
                 }
@@ -122,7 +122,7 @@ namespace cds_test {
 
                         switch ( idx % 3 ) {
                         case 0:
-                            xp = s.extract( i.key() );
+                            xp = s.extract( i.key());
                             ASSERT_FALSE( !xp );
                             break;
                         case 1:
@@ -130,11 +130,11 @@ namespace cds_test {
                             ASSERT_FALSE( !xp );
                             break;
                         case 2:
-                            xp = s.extract_with( other_item( i.key() ), other_less() );
+                            xp = s.extract_with( other_item( i.key()), other_less());
                             ASSERT_FALSE( !xp );
                             break;
                         }
-                        EXPECT_EQ( xp->key(), i.key() );
+                        EXPECT_EQ( xp->key(), i.key());
                         EXPECT_EQ( xp->nFindCount, static_cast<unsigned>( i.key() * 6 ));
                     }
                     xp.release();
@@ -144,13 +144,13 @@ namespace cds_test {
 
                         switch ( idx % 3 ) {
                         case 0:
-                            xp = s.extract( i.key() );
+                            xp = s.extract( i.key());
                             break;
                         case 1:
                             xp = s.extract( i );
                             break;
                         case 2:
-                            xp = s.extract_with( other_item( i.key() ), other_less() );
+                            xp = s.extract_with( other_item( i.key()), other_less());
                             break;
                         }
                         ASSERT_TRUE( !xp );
@@ -159,7 +159,7 @@ namespace cds_test {
                 else {
                     switch ( idx % 3 ) {
                     case 0:
-                        xp = s.extract( i.key() );
+                        xp = s.extract( i.key());
                         ASSERT_FALSE( !xp );
                         break;
                     case 1:
@@ -167,29 +167,29 @@ namespace cds_test {
                         ASSERT_FALSE( !xp );
                         break;
                     case 2:
-                        xp = s.extract_with( other_item( i.key() ), other_less() );
+                        xp = s.extract_with( other_item( i.key()), other_less());
                         ASSERT_FALSE( !xp );
                         break;
                     }
-                    EXPECT_EQ( xp->key(), i.key() );
+                    EXPECT_EQ( xp->key(), i.key());
                     EXPECT_EQ( xp->nFindCount, static_cast<unsigned>( i.key() * 6 ));
 
                     switch ( idx % 3 ) {
                     case 0:
-                        xp = s.extract( i.key() );
+                        xp = s.extract( i.key());
                         break;
                     case 1:
                         xp = s.extract( i );
                         break;
                     case 2:
-                        xp = s.extract_with( other_item( i.key() ), other_less() );
+                        xp = s.extract_with( other_item( i.key()), other_less());
                         break;
                     }
                     ASSERT_TRUE( !xp );
                 }
             }
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
         }
 
index ec5b1289a30f75541178e2a36cf0838974b90ced..15220f7635bf856b7d24a120b5626c288060008b 100644 (file)
@@ -51,7 +51,7 @@ protected:
 
         base_class::test( s );
 
-        ASSERT_TRUE( s.empty() );
+        ASSERT_TRUE( s.empty());
         ASSERT_CONTAINER_SIZE( s, 0 );
 
         typedef typename Set::value_type value_type;
@@ -62,15 +62,15 @@ protected:
         data.reserve( nSetSize );
         indices.reserve( nSetSize );
         for ( size_t key = 0; key < nSetSize; ++key ) {
-            data.push_back( value_type( static_cast<int>(key) ) );
+            data.push_back( value_type( static_cast<int>(key)) );
             indices.push_back( key );
         }
-        shuffle( indices.begin(), indices.end() );
+        shuffle( indices.begin(), indices.end());
 
         for ( auto i : indices ) {
-            ASSERT_TRUE( s.insert( data[i] ) );
+            ASSERT_TRUE( s.insert( data[i] ));
         }
-        ASSERT_FALSE( s.empty() );
+        ASSERT_FALSE( s.empty());
         ASSERT_CONTAINER_SIZE( s, nSetSize );
 
         typedef typename Set::exempt_ptr exempt_ptr;
@@ -79,39 +79,39 @@ protected:
         // extract_min
         size_t nCount = 0;
         int nKey = -1;
-        while ( !s.empty() ) {
+        while ( !s.empty()) {
             xp = s.extract_min();
             ASSERT_FALSE( !xp );
-            EXPECT_EQ( nKey + 1, xp->key() );
+            EXPECT_EQ( nKey + 1, xp->key());
             ++nCount;
             nKey = xp->key();
         }
         xp.release();
         EXPECT_EQ( nCount, nSetSize );
 
-        ASSERT_TRUE( s.empty() );
+        ASSERT_TRUE( s.empty());
         ASSERT_CONTAINER_SIZE( s, 0 );
 
         // extract_max
         for ( auto i : indices ) {
-            ASSERT_TRUE( s.insert( data[i] ) );
+            ASSERT_TRUE( s.insert( data[i] ));
         }
-        ASSERT_FALSE( s.empty() );
+        ASSERT_FALSE( s.empty());
         ASSERT_CONTAINER_SIZE( s, nSetSize );
 
         nCount = 0;
         nKey = nSetSize;
-        while ( !s.empty() ) {
+        while ( !s.empty()) {
             xp = s.extract_max();
             ASSERT_FALSE( !xp );
-            EXPECT_EQ( nKey - 1, xp->key() );
+            EXPECT_EQ( nKey - 1, xp->key());
             ++nCount;
             nKey = xp->key();
         }
         xp.release();
         EXPECT_EQ( nCount, nSetSize );
 
-        ASSERT_TRUE( s.empty() );
+        ASSERT_TRUE( s.empty());
         ASSERT_CONTAINER_SIZE( s, 0 );
     }
 
index 09c688c9436663e4b934c66e49795f76affef9a4..635682dea2206b22c17414ae38cb2a0d2eeacd58 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -57,25 +57,25 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                EXPECT_FALSE( s.contains( i.nKey ) );
-                EXPECT_FALSE( s.contains( i ) );
-                EXPECT_FALSE( s.contains( other_item( i.key() ), other_less()));
+                EXPECT_FALSE( s.contains( i.nKey ));
+                EXPECT_FALSE( s.contains( i ));
+                EXPECT_FALSE( s.contains( other_item( i.key()), other_less()));
                 EXPECT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 EXPECT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 EXPECT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
 
-                EXPECT_TRUE( s.find( i.nKey ) == s.end() );
-                EXPECT_TRUE( s.find( i ) == s.end() );
-                EXPECT_TRUE( s.find_with( other_item( i.key() ), other_less() ) == s.end() );
+                EXPECT_TRUE( s.find( i.nKey ) == s.end());
+                EXPECT_TRUE( s.find( i ) == s.end());
+                EXPECT_TRUE( s.find_with( other_item( i.key()), other_less()) == s.end());
 
                 std::pair<bool, bool> updResult;
 
@@ -94,18 +94,18 @@ namespace cds_test {
                     updResult = s.update( i, []( value_type& cur, value_type* old )
                         {
                             EXPECT_FALSE( old == nullptr );
-                            EXPECT_EQ( cur.key(), old->key() );
+                            EXPECT_EQ( cur.key(), old->key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     EXPECT_FALSE( updResult.second );
                     break;
                 case 1:
-                    EXPECT_TRUE( s.insert( i.key() ));
-                    EXPECT_FALSE( s.insert( i.key() ));
+                    EXPECT_TRUE( s.insert( i.key()));
+                    EXPECT_FALSE( s.insert( i.key()));
                     updResult = s.update( i.key(), []( value_type& cur, value_type* old )
                         {
                             EXPECT_FALSE( old == nullptr );
-                            EXPECT_EQ( cur.key(), old->key() );
+                            EXPECT_EQ( cur.key(), old->key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     EXPECT_FALSE( updResult.second );
@@ -140,7 +140,7 @@ namespace cds_test {
                     updResult = s.update( i, []( value_type& v, value_type* old )
                         {
                             EXPECT_FALSE( old == nullptr );
-                            EXPECT_EQ( v.key(), old->key() );
+                            EXPECT_EQ( v.key(), old->key());
                             v.nUpdateNewCount = old->nUpdateNewCount + 1;
                         }, false );
                     EXPECT_TRUE( updResult.first );
@@ -156,7 +156,7 @@ namespace cds_test {
                     updResult = s.update( i.key(), [&i]( value_type& v, value_type* old )
                         {
                             EXPECT_TRUE( old == nullptr );
-                            EXPECT_EQ( i.key(), v.key() );
+                            EXPECT_EQ( i.key(), v.key());
                             ++v.nUpdateNewCount;
                         });
                     EXPECT_TRUE( updResult.first );
@@ -165,7 +165,7 @@ namespace cds_test {
                     updResult = s.update( i.key(), []( value_type& v, value_type* old )
                         {
                             EXPECT_FALSE( old == nullptr );
-                            EXPECT_EQ( v.key(), old->key() );
+                            EXPECT_EQ( v.key(), old->key());
                             v.nUpdateNewCount = old->nUpdateNewCount + 1;
                         }, false );
                     EXPECT_TRUE( updResult.first );
@@ -173,7 +173,7 @@ namespace cds_test {
 
                     EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nUpdateNewCount, 2u );
                         }));
                     break;
@@ -181,7 +181,7 @@ namespace cds_test {
                     EXPECT_TRUE( s.emplace( i.key()));
                     EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nVal, arg.nVal );
                         }));
                     break;
@@ -191,25 +191,25 @@ namespace cds_test {
                     EXPECT_TRUE( str.empty());
                     EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nVal, arg.nVal );
                             EXPECT_EQ( v.strVal, std::string( "Hello!" ));
-                        } ) );
+                        } ));
                     break;
                 case 8:
                     {
                         updResult = s.upsert( i.key(), false );
                         EXPECT_FALSE( updResult.first );
                         EXPECT_FALSE( updResult.second );
-                        EXPECT_TRUE( s.find( i.key() ) == s.end() );
+                        EXPECT_TRUE( s.find( i.key()) == s.end());
 
-                        updResult = s.upsert( i.key() );
+                        updResult = s.upsert( i.key());
                         EXPECT_TRUE( updResult.first );
                         EXPECT_TRUE( updResult.second );
 
-                        auto it = s.find( i.key() );
-                        ASSERT_FALSE( it == s.end() );
-                        EXPECT_EQ( it->key(), i.key() );
+                        auto it = s.find( i.key());
+                        ASSERT_FALSE( it == s.end());
+                        EXPECT_EQ( it->key(), i.key());
 
                         updResult = s.upsert( i.key(), false );
                         EXPECT_TRUE( updResult.first );
@@ -217,7 +217,7 @@ namespace cds_test {
 
                         EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                         } ));
                     }
                     break;
@@ -226,15 +226,15 @@ namespace cds_test {
                         updResult = s.upsert( i, false );
                         EXPECT_FALSE( updResult.first );
                         EXPECT_FALSE( updResult.second );
-                        EXPECT_TRUE( s.find( i ) == s.end() );
+                        EXPECT_TRUE( s.find( i ) == s.end());
 
                         updResult = s.upsert( i );
                         EXPECT_TRUE( updResult.first );
                         EXPECT_TRUE( updResult.second );
 
                         auto it = s.find( i );
-                        ASSERT_FALSE( it == s.end() );
-                        EXPECT_EQ( it->key(), i.key() );
+                        ASSERT_FALSE( it == s.end());
+                        EXPECT_EQ( it->key(), i.key());
 
                         updResult = s.upsert( i, false );
                         EXPECT_TRUE( updResult.first );
@@ -242,7 +242,7 @@ namespace cds_test {
 
                         EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                         } ));
                     }
                     break;
@@ -252,33 +252,33 @@ namespace cds_test {
                     ASSERT_TRUE( false );
                 }
 
-                EXPECT_TRUE( s.contains( i.nKey ) );
-                EXPECT_TRUE( s.contains( i ) );
-                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& ) {} ) );
+                EXPECT_TRUE( s.contains( i.nKey ));
+                EXPECT_TRUE( s.contains( i ));
+                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& ) {} ));
 
                 auto it = s.find( i );
-                ASSERT_FALSE( it == s.end() );
-                EXPECT_EQ( it->key(), i.key() );
+                ASSERT_FALSE( it == s.end());
+                EXPECT_EQ( it->key(), i.key());
 
-                it = s.find_with( other_item( i.key() ), other_less() );
-                ASSERT_FALSE( it == s.end() );
-                EXPECT_EQ( it->key(), i.key() );
+                it = s.find_with( other_item( i.key()), other_less());
+                ASSERT_FALSE( it == s.end());
+                EXPECT_EQ( it->key(), i.key());
            }
 
-           EXPECT_FALSE( s.empty() );
+           EXPECT_FALSE( s.empty());
            EXPECT_CONTAINER_SIZE( s, nSetSize );
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                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( i.nKey ));
+                EXPECT_TRUE( s.contains( i ));
+                EXPECT_TRUE( s.contains( other_item( i.key()), other_less()) );
                 EXPECT_TRUE( s.find( i.nKey, []( value_type& v, int )
                     {
                         v.nFindCount = 1;
@@ -287,17 +287,17 @@ namespace cds_test {
                     {
                         EXPECT_EQ( ++v.nFindCount, 2u );
                     }));
-                EXPECT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& )
+                EXPECT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& )
                     {
                         EXPECT_EQ( ++v.nFindCount, 3u );
                     }));
 
                 auto it = s.find( i );
-                ASSERT_FALSE( it == s.end() );
-                EXPECT_EQ( it->key(), i.key() );
-                it = s.find_with( other_item( i.key() ), other_less() );
-                ASSERT_FALSE( it == s.end() );
-                EXPECT_EQ( it->key(), i.key() );
+                ASSERT_FALSE( it == s.end());
+                EXPECT_EQ( it->key(), i.key());
+                it = s.find_with( other_item( i.key()), other_less());
+                ASSERT_FALSE( it == s.end());
+                EXPECT_EQ( it->key(), i.key());
 
 
                 int nKey = i.key() - 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 )
@@ -358,35 +358,35 @@ namespace cds_test {
                     break;
                 }
 
-                EXPECT_FALSE( s.contains( i.nKey ) );
-                EXPECT_FALSE( s.contains( i ) );
-                EXPECT_FALSE( s.contains( other_item( i.key() ), other_less()));
+                EXPECT_FALSE( s.contains( i.nKey ));
+                EXPECT_FALSE( s.contains( i ));
+                EXPECT_FALSE( s.contains( other_item( i.key()), other_less()));
                 EXPECT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 EXPECT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 EXPECT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
 
-                EXPECT_TRUE( s.find( i.nKey ) == s.end() );
-                EXPECT_TRUE( s.find( i ) == s.end() );
-                EXPECT_TRUE( s.find_with( other_item( i.key() ), other_less() ) == s.end() );
+                EXPECT_TRUE( s.find( i.nKey ) == s.end());
+                EXPECT_TRUE( s.find( i ) == s.end());
+                EXPECT_TRUE( s.find_with( other_item( i.key()), other_less()) == s.end());
             }
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0u );
 
             // clear
             for ( auto& i : data ) {
-                EXPECT_TRUE( s.insert( i ) );
+                EXPECT_TRUE( s.insert( i ));
             }
 
-            EXPECT_FALSE( s.empty() );
+            EXPECT_FALSE( s.empty());
             EXPECT_CONTAINER_SIZE( s, nSetSize );
 
             s.clear();
 
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0u );
 
-            EXPECT_TRUE( s.begin() == s.end() );
-            EXPECT_TRUE( s.cbegin() == s.cend() );
+            EXPECT_TRUE( s.begin() == s.end());
+            EXPECT_TRUE( s.cbegin() == s.cend());
         }
     };
 
index 1e27a71d791aab8aba6cfdb5dbf48a4b0d6e7937..4003f0660c875182763c15e3953359a10367ef85 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             base_class::test( s );
@@ -59,15 +59,15 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             for ( auto& i : data ) {
-                EXPECT_TRUE( s.insert( i ) );
+                EXPECT_TRUE( s.insert( i ));
             }
-            EXPECT_FALSE( s.empty() );
+            EXPECT_FALSE( s.empty());
             EXPECT_CONTAINER_SIZE( s, nSetSize );
 
             // iterator test
@@ -89,7 +89,7 @@ namespace cds_test {
                 EXPECT_TRUE( !gp );
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.get( i.key() );
+                    gp = s.get( i.key());
                     ASSERT_FALSE( !gp );
                     break;
                 case 1:
@@ -97,10 +97,10 @@ namespace cds_test {
                     ASSERT_FALSE( !gp );
                     break;
                 case 2:
-                    gp = s.get_with( other_item( i.key() ), other_less() );
+                    gp = s.get_with( other_item( i.key()), other_less());
                     ASSERT_FALSE( !gp );
                 }
-                EXPECT_EQ( gp->key(), i.key() );
+                EXPECT_EQ( gp->key(), i.key());
                 EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 3 ));
                 gp->nFindCount *= 2;
 
@@ -114,7 +114,7 @@ namespace cds_test {
                 EXPECT_TRUE( !gp );
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.extract( i.key() );
+                    gp = s.extract( i.key());
                     ASSERT_FALSE( !gp );
                     break;
                 case 1:
@@ -122,28 +122,28 @@ namespace cds_test {
                     ASSERT_FALSE( !gp );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     ASSERT_FALSE( !gp );
                     break;
                 }
-                EXPECT_EQ( gp->key(), i.key() );
+                EXPECT_EQ( gp->key(), i.key());
                 EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 6 ));
 
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.extract( i.key() );
+                    gp = s.extract( i.key());
                     break;
                 case 1:
                     gp = s.extract( i );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     break;
                 }
                 EXPECT_TRUE( !gp );
             }
 
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0 );
         }
 
index b82247ef4d7b84f0b32348acfec6cb50fbf4b65f..5ef55b42d4240caff2f47cdea8fbb53c757c2cb6 100644 (file)
@@ -45,46 +45,46 @@ namespace {
             Stack stack;
             value_type v;
 
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
             ASSERT_EQ( stack.size(), 0u );
 
-            ASSERT_TRUE( stack.push( 1 ) );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( stack.push( 1 ));
+            ASSERT_TRUE( !stack.empty());
             ASSERT_EQ( stack.size(), 1u );
-            ASSERT_TRUE( stack.push( 2 ) );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( stack.push( 2 ));
+            ASSERT_TRUE( !stack.empty());
             ASSERT_EQ( stack.size(), 2u );
-            ASSERT_TRUE( stack.push( 3 ) );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( stack.push( 3 ));
+            ASSERT_TRUE( !stack.empty());
             ASSERT_EQ( stack.size(), 3u );
 
-            ASSERT_TRUE( stack.pop( v ) );
+            ASSERT_TRUE( stack.pop( v ));
             EXPECT_EQ( v, value_type( 3 ));
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( !stack.empty());
             ASSERT_EQ( stack.size(), 2u );
-            ASSERT_TRUE( stack.pop( v ) );
+            ASSERT_TRUE( stack.pop( v ));
             EXPECT_EQ( v, value_type( 2 ));
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( !stack.empty());
             ASSERT_EQ( stack.size(), 1u );
-            ASSERT_TRUE( stack.pop( v ) );
+            ASSERT_TRUE( stack.pop( v ));
             EXPECT_EQ( v, value_type( 1 ));
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
             ASSERT_EQ( stack.size(), 0u );
             v = 1000;
-            ASSERT_TRUE( !stack.pop( v ) );
+            ASSERT_TRUE( !stack.pop( v ));
             EXPECT_EQ( v, value_type( 1000 ));
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
             ASSERT_EQ( stack.size(), 0u );
 
-            ASSERT_TRUE( stack.push( 10 ) );
-            ASSERT_TRUE( stack.push( 20 ) );
-            ASSERT_TRUE( stack.push( 30 ) );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( stack.push( 10 ));
+            ASSERT_TRUE( stack.push( 20 ));
+            ASSERT_TRUE( stack.push( 30 ));
+            ASSERT_TRUE( !stack.empty());
             ASSERT_EQ( stack.size(), 3u );
 
-            while ( stack.pop( v ) );
+            while ( stack.pop( v ));
 
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
             ASSERT_EQ( stack.size(), 0u );
         }
     };
index 32b25bbbd18c347882179105adc00bbf666dc41c..7da0144b716442879d6dfc9a336c399dc2239d6c 100644 (file)
@@ -75,35 +75,35 @@ namespace {
             typedef typename Stack::value_type  value_type;
             Stack stack;
 
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
 
             value_type v1, v2, v3;
             v1.nVal = 1;
             v2.nVal = 2;
             v3.nVal = 3;
-            ASSERT_TRUE( stack.push( v1 ) );
-            ASSERT_TRUE( !stack.empty() );
-            ASSERT_TRUE( stack.push( v2 ) );
-            ASSERT_TRUE( !stack.empty() );
-            ASSERT_TRUE( stack.push( v3 ) );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( stack.push( v1 ));
+            ASSERT_TRUE( !stack.empty());
+            ASSERT_TRUE( stack.push( v2 ));
+            ASSERT_TRUE( !stack.empty());
+            ASSERT_TRUE( stack.push( v3 ));
+            ASSERT_TRUE( !stack.empty());
 
             value_type * pv;
             pv = stack.pop();
             ASSERT_TRUE( pv != nullptr );
             ASSERT_EQ( pv->nVal, 3 );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( !stack.empty());
             pv = stack.pop();
             ASSERT_TRUE( pv != nullptr );
             ASSERT_EQ( pv->nVal, 2 );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( !stack.empty());
             pv = stack.pop();
             ASSERT_TRUE( pv != nullptr );
             ASSERT_EQ( pv->nVal, 1 );
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
             pv = stack.pop();
             ASSERT_TRUE( pv == nullptr );
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
 
             if ( !std::is_same<typename Stack::disposer, cds::intrusive::opt::v::empty_disposer>::value ) {
                 int v1disp = v1.nDisposeCount;
@@ -115,19 +115,19 @@ namespace {
                 ASSERT_TRUE( stack.push( v3 ));
 
                 stack.clear();
-                ASSERT_TRUE( stack.empty() );
+                ASSERT_TRUE( stack.empty());
 
                 EXPECT_EQ( v1.nDisposeCount, v1disp);
                 EXPECT_EQ( v2.nDisposeCount, v2disp);
                 EXPECT_EQ( v3.nDisposeCount, v3disp);
 
-                ASSERT_TRUE( stack.push( v1 ) );
-                ASSERT_TRUE( stack.push( v2 ) );
-                ASSERT_TRUE( stack.push( v3 ) );
-                ASSERT_TRUE( !stack.empty() );
+                ASSERT_TRUE( stack.push( v1 ));
+                ASSERT_TRUE( stack.push( v2 ));
+                ASSERT_TRUE( stack.push( v3 ));
+                ASSERT_TRUE( !stack.empty());
 
                 stack.clear( true );
-                ASSERT_TRUE( stack.empty() );
+                ASSERT_TRUE( stack.empty());
 
                 EXPECT_EQ( v1.nDisposeCount, v1disp + 1 );
                 EXPECT_EQ( v2.nDisposeCount, v2disp + 1 );
index 92874d4fb5be348aca4fc2925a3d1149dce00993..3e729fe3e1dca5f3a07f39a656b72b922abc3466 100644 (file)
@@ -76,38 +76,38 @@ namespace cds_test {
         {
             typedef typename Stack::value_type  value_type;
 
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
 
             value_type v1, v2, v3;
             v1.nVal = 1;
             v2.nVal = 2;
             v3.nVal = 3;
-            ASSERT_TRUE( stack.push( v1 ) );
-            ASSERT_TRUE( !stack.empty() );
-            ASSERT_TRUE( stack.push( v2 ) );
-            ASSERT_TRUE( !stack.empty() );
-            ASSERT_TRUE( stack.push( v3 ) );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( stack.push( v1 ));
+            ASSERT_TRUE( !stack.empty());
+            ASSERT_TRUE( stack.push( v2 ));
+            ASSERT_TRUE( !stack.empty());
+            ASSERT_TRUE( stack.push( v3 ));
+            ASSERT_TRUE( !stack.empty());
 
             value_type * pv;
             pv = stack.pop();
             ASSERT_NE( pv, nullptr );
             ASSERT_EQ( pv, &v3 );
             ASSERT_EQ( pv->nVal, 3 );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( !stack.empty());
             pv = stack.pop();
             ASSERT_NE( pv, nullptr );
             ASSERT_EQ( pv, &v2 );
             ASSERT_EQ( pv->nVal, 2 );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( !stack.empty());
             pv = stack.pop();
             ASSERT_NE( pv, nullptr );
             ASSERT_EQ( pv, &v1 );
             ASSERT_EQ( pv->nVal, 1 );
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
             pv = stack.pop();
             ASSERT_EQ( pv, nullptr );
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
 
             ASSERT_EQ( v1.nDisposeCount, 0 );
             ASSERT_EQ( v2.nDisposeCount, 0 );
@@ -118,7 +118,7 @@ namespace cds_test {
             stack.push( v3 );
 
             stack.clear();
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
 
             Stack::gc::scan();
             if ( !std::is_same<typename Stack::disposer, cds::intrusive::opt::v::empty_disposer>::value ) {
index d6d058c80b3ca9554abecab472da0bf457dc9b1e..33efedcfffd12b674e91175594478e6b17b73b67 100644 (file)
@@ -44,40 +44,40 @@ namespace cds_test {
             typedef typename Stack::value_type  value_type;
             value_type v;
 
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
 
-            ASSERT_TRUE( stack.push( 1 ) );
-            ASSERT_TRUE( !stack.empty() );
-            ASSERT_TRUE( stack.push( 2 ) );
-            ASSERT_TRUE( !stack.empty() );
-            ASSERT_TRUE( stack.push( 3 ) );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( stack.push( 1 ));
+            ASSERT_TRUE( !stack.empty());
+            ASSERT_TRUE( stack.push( 2 ));
+            ASSERT_TRUE( !stack.empty());
+            ASSERT_TRUE( stack.push( 3 ));
+            ASSERT_TRUE( !stack.empty());
 
-            ASSERT_TRUE( stack.pop( v ) );
+            ASSERT_TRUE( stack.pop( v ));
             ASSERT_EQ( v, 3 );
-            ASSERT_TRUE( !stack.empty() );
-            ASSERT_TRUE( stack.pop_with( [&v]( value_type& src ) { v = src; } ) );
+            ASSERT_TRUE( !stack.empty());
+            ASSERT_TRUE( stack.pop_with( [&v]( value_type& src ) { v = src; } ));
             ASSERT_EQ( v, 2 );
-            ASSERT_TRUE( !stack.empty() );
-            ASSERT_TRUE( stack.pop( v ) );
+            ASSERT_TRUE( !stack.empty());
+            ASSERT_TRUE( stack.pop( v ));
             ASSERT_EQ( v, 1 );
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
             v = 1000;
-            ASSERT_TRUE( !stack.pop( v ) );
+            ASSERT_TRUE( !stack.pop( v ));
             ASSERT_EQ( v, 1000 );
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
 
-            ASSERT_TRUE( stack.push( 10 ) );
-            ASSERT_TRUE( stack.push( 20 ) );
-            ASSERT_TRUE( stack.push( 30 ) );
-            ASSERT_TRUE( !stack.empty() );
+            ASSERT_TRUE( stack.push( 10 ));
+            ASSERT_TRUE( stack.push( 20 ));
+            ASSERT_TRUE( stack.push( 30 ));
+            ASSERT_TRUE( !stack.empty());
 
-            ASSERT_TRUE( stack.emplace( 100 ) );
-            ASSERT_TRUE( stack.pop( v ) );
+            ASSERT_TRUE( stack.emplace( 100 ));
+            ASSERT_TRUE( stack.pop( v ));
             ASSERT_EQ( v, 100 );
 
             stack.clear();
-            ASSERT_TRUE( stack.empty() );
+            ASSERT_TRUE( stack.empty());
 
             Stack::gc::scan();
         }
index 021ca9a6ce290758652034e3d57ebdd06cead2b5..648049036f52036defdf90e8bcd3203f528fa2a2 100644 (file)
@@ -148,7 +148,7 @@ namespace {
         > map_type;
 
         typename map_type::hash_tuple_type ht;
-        map_type m( std::move( ht ) );
+        map_type m( std::move( ht ));
         test( m );
     }
 
@@ -164,7 +164,7 @@ namespace {
         > map_type;
 
         typename map_type::hash_tuple_type ht;
-        map_type m( 32, 6, 0, std::move( ht ) );
+        map_type m( 32, 6, 0, std::move( ht ));
         test( m );
     }
 
@@ -180,7 +180,7 @@ namespace {
         > map_type;
 
         typename map_type::hash_tuple_type ht;
-        map_type m( std::move( ht ) );
+        map_type m( std::move( ht ));
         test( m );
     }
 
@@ -373,7 +373,7 @@ namespace {
         > map_type;
 
         typename map_type::hash_tuple_type ht;
-        map_type m( std::move( ht ) );
+        map_type m( std::move( ht ));
         test( m );
     }
 
@@ -390,7 +390,7 @@ namespace {
         > map_type;
 
         typename map_type::hash_tuple_type ht;
-        map_type m( 32, 6, 0, std::move( ht ) );
+        map_type m( 32, 6, 0, std::move( ht ));
         test( m );
     }
 
@@ -407,7 +407,7 @@ namespace {
         > map_type;
 
         typename map_type::hash_tuple_type ht;
-        map_type m( std::move( ht ) );
+        map_type m( std::move( ht ));
         test( m );
     }
 
index 08dfcdc9772c28785e15509d24a51d8d2afb53d6..bb49f4372d60e5ea7385d3acd6abc82b94eab952 100644 (file)
@@ -276,17 +276,17 @@ namespace cds_test {
                     EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
                 } ));
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             // erase/find
             for ( auto const& i : arrKeys ) {
-                value_type const& val( arrVals.at( i.nKey ) );
+                value_type const& val( arrVals.at( i.nKey ));
 
                 ASSERT_TRUE( m.contains( i.nKey ));
-                ASSERT_TRUE( m.contains( val.strVal ) );
+                ASSERT_TRUE( m.contains( val.strVal ));
                 ASSERT_TRUE( m.contains( i ));
                 ASSERT_TRUE( m.contains( other_item( i.nKey ), other_predicate()));
                 ASSERT_TRUE( m.find( i, []( map_pair const& v ) {
@@ -372,19 +372,19 @@ namespace cds_test {
                     EXPECT_TRUE( false );
                 } ));
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // clear
             for ( auto const& i : arrKeys )
                 ASSERT_TRUE( m.insert( i ));
 
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             m.clear();
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
         }
     };
index 4ad0e42bda41050e86f1a21d1ea8d8c26a6cd915..6463476ca2ab09afc9758983af4412f76dda2484 100644 (file)
@@ -43,7 +43,7 @@ namespace {
     {
         bool operator()( Map& m, int key ) const
         {
-            return m.contains( cds_test::striped_map_fixture::other_item( key ), cds_test::striped_map_fixture::other_less() );
+            return m.contains( cds_test::striped_map_fixture::other_item( key ), cds_test::striped_map_fixture::other_less());
         }
     };
 
@@ -81,7 +81,7 @@ namespace {
     {
         bool operator()( Map& m, int key ) const
         {
-            return m.erase_with( cds_test::striped_map_fixture::other_item( key ), cds_test::striped_map_fixture::other_less() );
+            return m.erase_with( cds_test::striped_map_fixture::other_item( key ), cds_test::striped_map_fixture::other_less());
         }
 
         template <typename Func>
@@ -157,7 +157,7 @@ namespace {
 
                 ASSERT_FALSE( m.contains( i.nKey ));
                 ASSERT_FALSE( m.contains( i ));
-                ASSERT_FALSE(( call_contains_with<c_hasFindWith, Map>()( m, i.nKey ) ));
+                ASSERT_FALSE(( call_contains_with<c_hasFindWith, Map>()( m, i.nKey )));
                 ASSERT_FALSE( m.find( i, []( map_pair const& ) {
                     ASSERT_TRUE( false );
                 } ));
@@ -334,7 +334,7 @@ namespace {
 
                 ASSERT_TRUE( m.contains( i.nKey ));
                 ASSERT_TRUE( m.contains( i ));
-                ASSERT_TRUE(( call_contains_with<c_hasFindWith, Map>()( m, i.nKey ) ));
+                ASSERT_TRUE(( call_contains_with<c_hasFindWith, Map>()( m, i.nKey )));
                 ASSERT_TRUE( m.find( i, []( map_pair const& v ) {
                     EXPECT_EQ( v.first.nKey, v.second.nVal );
                     EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
@@ -348,17 +348,17 @@ namespace {
                     EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
                 } )));
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             // erase/find
             for ( auto const& i : arrKeys ) {
-                value_type const& val( arrVals.at( i.nKey ) );
+                value_type const& val( arrVals.at( i.nKey ));
 
                 ASSERT_TRUE( m.contains( i.nKey ));
-                ASSERT_TRUE( m.contains( val.strVal ) );
+                ASSERT_TRUE( m.contains( val.strVal ));
                 ASSERT_TRUE( m.contains( i ));
                 ASSERT_TRUE(( call_contains_with<c_hasFindWith, Map>()( m, i.nKey )));
                 ASSERT_TRUE( m.find( i, []( map_pair const& v ) {
@@ -444,19 +444,19 @@ namespace {
                     EXPECT_TRUE( false );
                 } )));
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // clear
             for ( auto const& i : arrKeys )
                 ASSERT_TRUE( m.insert( i ));
 
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             m.clear();
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
         }
     };
@@ -548,7 +548,7 @@ namespace {
             cds::opt::resizing_policy< cc::striped_set::load_factor_resizing<0>>
         > map_type;
 
-        map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+        map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
         this->test( m );
     }
 
@@ -604,7 +604,7 @@ namespace {
             cds::opt::copy_policy< cc::striped_set::move_item >
         > map_type;
 
-        map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+        map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
         this->test( m );
     }
 
@@ -721,7 +721,7 @@ namespace {
             cds::opt::resizing_policy< cc::striped_set::load_factor_resizing<0>>
         > map_type;
 
-        map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+        map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
         this->test( m );
     }
 
@@ -781,7 +781,7 @@ namespace {
             cds::opt::copy_policy< cc::striped_set::move_item >
         > map_type;
 
-        map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+        map_type m( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
         this->test( m );
     }
 
index 3ac201eb23137f595a701c2323e0d117faa4b254..a9658a0366efb00cfb8ad86ddcbe8370b341658a 100644 (file)
@@ -148,7 +148,7 @@ namespace {
         > set_type;
 
         typename set_type::hash_tuple_type ht;
-        set_type s( std::move( ht ) );
+        set_type s( std::move( ht ));
         test( s );
     }
 
@@ -164,7 +164,7 @@ namespace {
         > set_type;
 
         typename set_type::hash_tuple_type ht;
-        set_type s( 32, 6, 0, std::move( ht ) );
+        set_type s( 32, 6, 0, std::move( ht ));
         test( s );
     }
 
@@ -180,7 +180,7 @@ namespace {
         > set_type;
 
         typename set_type::hash_tuple_type ht;
-        set_type s( std::move( ht ) );
+        set_type s( std::move( ht ));
         test( s );
     }
 
@@ -373,7 +373,7 @@ namespace {
         > set_type;
 
         typename set_type::hash_tuple_type ht;
-        set_type s( std::move( ht ) );
+        set_type s( std::move( ht ));
         test( s );
     }
 
@@ -390,7 +390,7 @@ namespace {
         > set_type;
 
         typename set_type::hash_tuple_type ht;
-        set_type s( 32, 6, 0, std::move( ht ) );
+        set_type s( 32, 6, 0, std::move( ht ));
         test( s );
     }
 
@@ -407,7 +407,7 @@ namespace {
         > set_type;
 
         typename set_type::hash_tuple_type ht;
-        set_type s( std::move( ht ) );
+        set_type s( std::move( ht ));
         test( s );
     }
 
index 8584890431d5506ac6771f5df2429dd737b39b34..7e65307357688a161494df5438018c9ba876eaf4 100644 (file)
@@ -120,7 +120,7 @@ namespace {
 
         std::vector< typename set_type::value_type > data;
         {
-            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 128 ) );
+            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 128 ));
             this->test( s, data );
         }
     }
@@ -184,7 +184,7 @@ namespace {
 
         std::vector< typename set_type::value_type > data;
         {
-            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 128 ) );
+            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 128 ));
             this->test( s, data );
         }
     }
@@ -248,7 +248,7 @@ namespace {
 
         std::vector< typename set_type::value_type > data;
         {
-            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 128 ) );
+            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 128 ));
             this->test( s, data );
         }
     }
@@ -315,7 +315,7 @@ namespace {
 
         std::vector< typename set_type::value_type > data;
         {
-            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 128 ) );
+            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 128 ));
             this->test( s, data );
         }
     }
index fc9d99dbe9fb0d3e32ef24491ee77c808ff099a8..4122f2e8ca47461913d14bf8e73103a93fa9686a 100644 (file)
@@ -56,14 +56,14 @@ namespace {
             // clear
             for ( auto& i : data ) {
                 i.clear_stat();
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             s.clear();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             for ( auto& i : data ) {
                 EXPECT_EQ( i.nDisposeCount, 1u );
index 7d1ecd6d56c4bf49995513a8ea3e06d611e6fa41..6e105052cf49d4c803f763ef57dcafc8fbba11ca 100644 (file)
@@ -64,7 +64,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -148,7 +148,7 @@ namespace cds_test {
             template <typename Item>
             size_t operator()( const Item& i ) const
             {
-                return (*this)( i.key() );
+                return (*this)( i.key());
             }
         };
         typedef hash_int hash1;
@@ -227,7 +227,7 @@ namespace cds_test {
         struct cmp {
             int operator ()(const T& v1, const T& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -243,7 +243,7 @@ namespace cds_test {
             template <typename Q>
             int operator ()(const Q& v1, const T& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -334,7 +334,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             typedef typename Set::value_type value_type;
@@ -348,7 +348,7 @@ namespace cds_test {
                 data.push_back( value_type( static_cast<int>( key )));
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
@@ -385,7 +385,7 @@ namespace cds_test {
                     EXPECT_EQ( i.nUpdateNewCount, 0u );
                     ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
                     EXPECT_EQ( i.nUpdateNewCount, 1u );
-                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ) );
+                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
                     EXPECT_EQ( i.nUpdateNewCount, 1u );
                     i.nUpdateNewCount = 0;
                     break;
@@ -400,32 +400,32 @@ namespace cds_test {
                     break;
                 }
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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 );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_predicate(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_predicate(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             std::for_each( data.begin(), data.end(), []( value_type& v ) { v.clear_stat(); });
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[ idx ];
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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; } ) );
+                ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 1u );
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_predicate(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ) );
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_predicate(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
 
                 value_type v( i );
@@ -433,19 +433,19 @@ namespace cds_test {
                 case 0:
                     ASSERT_FALSE( s.unlink( v ));
                     ASSERT_TRUE( s.unlink( i ));
-                    ASSERT_FALSE( s.unlink( i ) );
+                    ASSERT_FALSE( s.unlink( i ));
                     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 ));
-                    ASSERT_FALSE( s.erase( v ) );
+                    ASSERT_FALSE( s.erase( v ));
                     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 );
@@ -456,9 +456,9 @@ namespace cds_test {
                     break;
                 case 5:
                     EXPECT_EQ( i.nEraseCount, 0u );
-                    ASSERT_TRUE( s.erase_with( other_item( i.key() ), other_predicate(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    ASSERT_TRUE( s.erase_with( other_item( i.key()), other_predicate(), []( value_type& val ) { ++val.nEraseCount; } ));
                     EXPECT_EQ( i.nEraseCount, 1u );
-                    ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_predicate(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    ASSERT_FALSE( s.erase_with( other_item( i.key()), other_predicate(), []( value_type& val ) { ++val.nEraseCount; } ));
                     EXPECT_EQ( i.nEraseCount, 1u );
                     break;
                 }
@@ -469,7 +469,7 @@ namespace cds_test {
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_predicate(), []( value_type&, other_item const& ) {} ));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
             // clear
@@ -477,25 +477,25 @@ namespace cds_test {
                 i.clear_stat();
                 ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             s.clear();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
             // clear_and_dispose
             for ( auto& i : data ) {
                 i.clear_stat();
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
-            s.clear_and_dispose( mock_disposer() );
+            s.clear_and_dispose( mock_disposer());
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             for ( auto& i : data ) {
                 EXPECT_EQ( i.nDisposeCount, 1u );
index 4a96e20beb9660d576579a8a6958220893cb05c1..efdb876bb203ee8cfa97af3c13e9c8d2bb761bbe 100644 (file)
@@ -138,7 +138,7 @@ namespace {
 
         std::vector< typename set_type::value_type > data;
         {
-            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 4 ) );
+            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 4 ));
             this->test( s, data );
         }
     }
@@ -222,7 +222,7 @@ namespace {
 
         std::vector< typename set_type::value_type > data;
         {
-            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 4 ) );
+            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 4 ));
             this->test( s, data );
         }
     }
@@ -391,7 +391,7 @@ namespace {
 
         std::vector< typename set_type::value_type > data;
         {
-            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 4 ) );
+            set_type s( 64, ci::striped_set::single_bucket_size_threshold<0>( 4 ));
             this->test( s, data );
         }
     }
index 4e9888834fe0bd4a48a4e36cf816fa6cc1f24705..7f648f1fc98b4053d4ea0980b4084d55eb75058b 100644 (file)
@@ -67,7 +67,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
 
             void copy_stat( stat const& s )
@@ -107,7 +107,7 @@ namespace cds_test {
 
             template <typename Q>
             explicit int_item( Q const& src )
-                : nKey( src.key() )
+                : nKey( src.key())
                 , nVal( 0 )
             {}
 
@@ -122,17 +122,17 @@ namespace cds_test {
                 : stat( src )
                 , nKey( src.nKey )
                 , nVal( src.nVal )
-                , strVal( std::move( src.strVal ) )
+                , strVal( std::move( src.strVal ))
             {}
 
             int_item( int k, std::string&& s )
                 : nKey( k )
                 , nVal( k * 2 )
-                , strVal( std::move( s ) )
+                , strVal( std::move( s ))
             {}
 
             explicit int_item( other_item const& s )
-                : nKey( s.key() )
+                : nKey( s.key())
                 , nVal( s.key() * 2 )
             {}
 
@@ -236,7 +236,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( int_item const& v1, int_item const& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -252,7 +252,7 @@ namespace cds_test {
             template <typename T>
             int operator ()( int v1, T const& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -287,7 +287,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -299,18 +299,18 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                ASSERT_FALSE( s.contains( i.nKey ) );
-                ASSERT_FALSE( s.contains( i ) );
-                ASSERT_FALSE( s.contains( other_item( i.key() ), other_predicate()));
+                ASSERT_FALSE( s.contains( i.nKey ));
+                ASSERT_FALSE( s.contains( i ));
+                ASSERT_FALSE( s.contains( other_item( i.key()), other_predicate()));
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_predicate(), []( value_type&, other_item const& ) {} ));
@@ -332,14 +332,14 @@ namespace cds_test {
                     updResult = s.update( i, []( bool bNew, value_type& val, value_type const& arg)
                         {
                             EXPECT_FALSE( bNew );
-                            EXPECT_EQ( val.key(), arg.key() );
+                            EXPECT_EQ( val.key(), arg.key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     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 );
@@ -370,7 +370,7 @@ namespace cds_test {
                     updResult = s.update( i, []( bool bNew, value_type& v, value_type const& arg )
                         {
                             EXPECT_TRUE( bNew );
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             ++v.nUpdateNewCount;
                         });
                     EXPECT_TRUE( updResult.first );
@@ -379,7 +379,7 @@ namespace cds_test {
                     updResult = s.update( i, []( bool bNew, value_type& v, value_type const& arg )
                         {
                             EXPECT_FALSE( bNew );
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             ++v.nUpdateNewCount;
                         }, false );
                     EXPECT_TRUE( updResult.first );
@@ -412,7 +412,7 @@ namespace cds_test {
 
                     ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nUpdateNewCount, 2u );
                         }));
                     break;
@@ -420,7 +420,7 @@ namespace cds_test {
                     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() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nVal, arg.nVal );
                         }));
                     break;
@@ -430,35 +430,35 @@ namespace cds_test {
                     EXPECT_TRUE( str.empty());
                     ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nVal, arg.nVal );
                             EXPECT_EQ( v.strVal, std::string( "Hello!" ));
-                        } ) );
+                        } ));
                     break;
                 default:
                     // forgot anything?..
                     ASSERT_TRUE( false );
                 }
 
-                ASSERT_TRUE( s.contains( i.nKey ) );
-                ASSERT_TRUE( s.contains( i ) );
-                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& ) {} ) );
+                ASSERT_TRUE( s.contains( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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& ) {} ));
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                ASSERT_TRUE( s.contains( other_item( i.key()), other_predicate()) );
                 ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int )
                     {
                         v.nFindCount = 1;
@@ -467,7 +467,7 @@ namespace cds_test {
                     {
                         EXPECT_EQ( ++v.nFindCount, 2u );
                     }));
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_predicate(), []( value_type& v, other_item const& )
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_predicate(), []( value_type& v, other_item const& )
                     {
                         EXPECT_EQ( ++v.nFindCount, 3u );
                     }));
@@ -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 )
@@ -530,28 +530,28 @@ namespace cds_test {
                     break;
                 }
 
-                ASSERT_FALSE( s.contains( i.nKey ) );
-                ASSERT_FALSE( s.contains( i ) );
-                ASSERT_FALSE( s.contains( other_item( i.key() ), other_predicate()));
+                ASSERT_FALSE( s.contains( i.nKey ));
+                ASSERT_FALSE( s.contains( i ));
+                ASSERT_FALSE( s.contains( other_item( i.key()), other_predicate()));
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_predicate(), []( value_type&, other_item const& ) {} ));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
 
             // clear
             for ( auto& i : data ) {
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             s.clear();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
         }
     };
index 04d151f815cbc94c5c7aaf309156c7bec4be4660..62267155bf81ecdf4bc4ce716b8991cecb6dca57 100644 (file)
@@ -133,7 +133,7 @@ namespace {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -144,20 +144,20 @@ namespace {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                ASSERT_FALSE( s.contains( i.nKey ) );
+                ASSERT_FALSE( s.contains( i.nKey ));
                 ASSERT_FALSE( s.contains( i ));
                 ASSERT_FALSE( (call_contains_with< c_hasFindWith, Set >()( s, i.key())));
-                ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ) );
-                ASSERT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ) );
+                ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
+                ASSERT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 ASSERT_FALSE( (call_find_with< c_hasFindWith, Set >()(s, i.key(), []( value_type&, other_item const& ) {} )));
 
                 std::pair<bool, bool> updResult;
@@ -172,19 +172,19 @@ namespace {
 
                 switch ( idx % 8 ) {
                 case 0:
-                    ASSERT_TRUE( s.insert( i ) );
-                    ASSERT_FALSE( s.insert( i ) );
+                    ASSERT_TRUE( s.insert( i ));
+                    ASSERT_FALSE( s.insert( i ));
                     updResult = s.update( i, []( bool bNew, value_type& val, value_type const& arg )
                     {
                         EXPECT_FALSE( bNew );
-                        EXPECT_EQ( val.key(), arg.key() );
+                        EXPECT_EQ( val.key(), arg.key());
                     }, false );
                     EXPECT_TRUE( updResult.first );
                     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 );
@@ -194,28 +194,28 @@ namespace {
                     EXPECT_FALSE( updResult.second );
                     break;
                 case 2:
-                    ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nFindCount; } ) );
-                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nFindCount; } ) );
+                    ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nFindCount; } ));
+                    ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nFindCount; } ));
                     ASSERT_TRUE( s.find( i.nKey, []( value_type const& v, int key )
                     {
                         EXPECT_EQ( v.key(), key );
                         EXPECT_EQ( v.nFindCount, 1u );
-                    } ) );
+                    } ));
                     break;
                 case 3:
-                    ASSERT_TRUE( s.insert( i.key(), []( value_type& v ) { ++v.nFindCount; } ) );
-                    ASSERT_FALSE( s.insert( i.key(), []( value_type& v ) { ++v.nFindCount; } ) );
+                    ASSERT_TRUE( s.insert( i.key(), []( value_type& v ) { ++v.nFindCount; } ));
+                    ASSERT_FALSE( s.insert( i.key(), []( value_type& v ) { ++v.nFindCount; } ));
                     ASSERT_TRUE( s.find( i.nKey, []( value_type const& v, int key )
                     {
                         EXPECT_EQ( v.key(), key );
                         EXPECT_EQ( v.nFindCount, 1u );
-                    } ) );
+                    } ));
                     break;
                 case 4:
                     updResult = s.update( i, []( bool bNew, value_type& v, value_type const& arg )
                     {
                         EXPECT_TRUE( bNew );
-                        EXPECT_EQ( v.key(), arg.key() );
+                        EXPECT_EQ( v.key(), arg.key());
                         ++v.nUpdateNewCount;
                     } );
                     EXPECT_TRUE( updResult.first );
@@ -224,7 +224,7 @@ namespace {
                     updResult = s.update( i, []( bool bNew, value_type& v, value_type const& arg )
                     {
                         EXPECT_FALSE( bNew );
-                        EXPECT_EQ( v.key(), arg.key() );
+                        EXPECT_EQ( v.key(), arg.key());
                         ++v.nUpdateNewCount;
                     }, false );
                     EXPECT_TRUE( updResult.first );
@@ -234,7 +234,7 @@ namespace {
                     {
                         EXPECT_EQ( v.key(), key );
                         EXPECT_EQ( v.nUpdateNewCount, 2u );
-                    } ) );
+                    } ));
                     break;
                 case 5:
                     updResult = s.update( i.key(), []( bool bNew, value_type& v, int arg )
@@ -257,52 +257,52 @@ namespace {
 
                     ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                     {
-                        EXPECT_EQ( v.key(), arg.key() );
+                        EXPECT_EQ( v.key(), arg.key());
                         EXPECT_EQ( v.nUpdateNewCount, 2u );
-                    } ) );
+                    } ));
                     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() );
+                        EXPECT_EQ( v.key(), arg.key());
                         EXPECT_EQ( v.nVal, arg.nVal );
-                    } ) );
+                    } ));
                     break;
                 case 7:
                     str = "Hello!";
-                    ASSERT_TRUE( s.emplace( i.key(), std::move( str ) ) );
-                    EXPECT_TRUE( str.empty() );
+                    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 )
                     {
-                        EXPECT_EQ( v.key(), arg.key() );
+                        EXPECT_EQ( v.key(), arg.key());
                         EXPECT_EQ( v.nVal, arg.nVal );
-                        EXPECT_EQ( v.strVal, std::string( "Hello!" ) );
-                    } ) );
+                        EXPECT_EQ( v.strVal, std::string( "Hello!" ));
+                    } ));
                     break;
                 default:
                     // forgot anything?..
                     ASSERT_TRUE( false );
                 }
 
-                ASSERT_TRUE( s.contains( i.nKey ) );
-                ASSERT_TRUE( s.contains( i ) );
-                ASSERT_TRUE( (call_contains_with< c_hasFindWith, Set>()( s, i.key() )));
-                ASSERT_TRUE( s.find( i.nKey, []( value_type&, int ) {} ) );
-                ASSERT_TRUE( s.find( i, []( value_type&, value_type const& ) {} ) );
+                ASSERT_TRUE( s.contains( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                ASSERT_TRUE( (call_contains_with< c_hasFindWith, Set>()( s, i.key())));
+                ASSERT_TRUE( s.find( i.nKey, []( value_type&, int ) {} ));
+                ASSERT_TRUE( s.find( i, []( value_type&, value_type const& ) {} ));
                 ASSERT_TRUE( (call_find_with< c_hasFindWith, Set >()(s, i.key(), []( value_type&, other_item const& ) {})));
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                ASSERT_TRUE( s.contains( i.nKey ) );
-                ASSERT_TRUE( s.contains( i ) );
+                ASSERT_TRUE( s.contains( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
                 ASSERT_TRUE( (call_contains_with<c_hasFindWith, Set>()(s, i.key())));
                 ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int )
                 {
@@ -319,12 +319,12 @@ 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 ) );
-                    ASSERT_FALSE( s.erase( i ) );
+                    ASSERT_TRUE( s.erase( i ));
+                    ASSERT_FALSE( s.erase( i ));
                     break;
                 case 2:
                     ASSERT_TRUE( (call_erase_with<c_hasEraseWith, Set>()( s, i.key())));
@@ -341,21 +341,21 @@ namespace {
                     ASSERT_FALSE( s.erase( i.key(), [&nKey]( value_type const& v )
                     {
                         nKey = v.key();
-                    } ) );
+                    } ));
                     EXPECT_EQ( i.key(), nKey + 1 );
                     break;
                 case 4:
                     ASSERT_TRUE( s.erase( i, [&nKey]( value_type const& v )
                     {
                         nKey = v.key();
-                    } ) );
+                    } ));
                     EXPECT_EQ( i.key(), nKey );
 
                     nKey = i.key() - 1;
                     ASSERT_FALSE( s.erase( i, [&nKey]( value_type const& v )
                     {
                         nKey = v.key();
-                    } ) );
+                    } ));
                     EXPECT_EQ( i.key(), nKey + 1 );
                     break;
                 case 5:
@@ -374,28 +374,28 @@ namespace {
                     break;
                 }
 
-                ASSERT_FALSE( s.contains( i.nKey ) );
-                ASSERT_FALSE( s.contains( i ) );
+                ASSERT_FALSE( s.contains( i.nKey ));
+                ASSERT_FALSE( s.contains( i ));
                 ASSERT_FALSE( (call_contains_with<c_hasFindWith, Set>()( s, i.key())));
-                ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ) );
+                ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 ASSERT_FALSE( (call_find_with<c_hasFindWith, Set>()( s, i.key(), []( value_type&, other_item const& ) {})));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
 
 
             // clear
             for ( auto& i : data ) {
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             s.clear();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0u );
         }
 
@@ -543,7 +543,7 @@ namespace {
             cds::opt::copy_policy< cc::striped_set::move_item >
         > set_type;
 
-        set_type s( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+        set_type s( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
         this->test( s );
     }
 
@@ -660,7 +660,7 @@ namespace {
             cds::opt::resizing_policy< cc::striped_set::load_factor_resizing<0>>
         > set_type;
 
-        set_type s( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+        set_type s( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
         this->test( s );
     }
 
@@ -720,7 +720,7 @@ namespace {
             cds::opt::copy_policy< cc::striped_set::move_item >
         > set_type;
 
-        set_type s( 30, cc::striped_set::load_factor_resizing<0>( 8 ) );
+        set_type s( 30, cc::striped_set::load_factor_resizing<0>( 8 ));
         this->test( s );
     }
 
index 3403c8c9ea17187fbf3ac692f0e551abe64b356f..151259c8606aab9972e4c8529b48f3dd50217582 100644 (file)
@@ -269,19 +269,19 @@ namespace {
                     EXPECT_EQ( std::to_string( key.nKey ), val.strVal );
                 } ));
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             ASSERT_TRUE( m.check_consistency());
 
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             // erase/find
             for ( auto const& i : arrKeys ) {
-                value_type const& val( arrVals.at( i.nKey ) );
+                value_type const& val( arrVals.at( i.nKey ));
 
                 ASSERT_TRUE( m.contains( i.nKey ));
-                ASSERT_TRUE( m.contains( val.strVal ) );
+                ASSERT_TRUE( m.contains( val.strVal ));
                 ASSERT_TRUE( m.contains( i ));
                 ASSERT_TRUE( m.contains( other_item( i.nKey ), other_less()));
                 ASSERT_TRUE( m.find( i, []( key_type const& key, value_type& val ) {
@@ -367,37 +367,37 @@ namespace {
                     EXPECT_TRUE( false );
                 } ));
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // clear
             for ( auto const& i : arrKeys )
                 ASSERT_TRUE( m.insert( i ));
 
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             m.clear();
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
 
             for ( auto const& i : arrKeys )
                 ASSERT_TRUE( m.insert( i, arrVals[ i.nKey ] ));
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             typedef typename Map::exempt_ptr exempt_ptr;
 
             // extract
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             exempt_ptr xp;
             for ( auto const& i : arrKeys ) {
                 value_type const& val = arrVals.at( i.nKey );
 
-                ASSERT_TRUE( m.contains( i.nKey ) );
+                ASSERT_TRUE( m.contains( i.nKey ));
 
                 switch ( i.nKey % 4 ) {
                 case 0:
@@ -410,13 +410,13 @@ namespace {
                     xp = m.extract( val.strVal );
                     break;
                 case 3:
-                    xp = m.extract_with( other_item( i.nKey ), other_less() );
+                    xp = m.extract_with( other_item( i.nKey ), other_less());
                     break;
                 }
                 ASSERT_FALSE( !xp );
                 EXPECT_EQ( xp->nVal, i.nKey );
 
-                ASSERT_FALSE( m.contains( i.nKey ) );
+                ASSERT_FALSE( m.contains( i.nKey ));
 
                 switch ( i.nKey % 4 ) {
                 case 0:
@@ -429,23 +429,23 @@ namespace {
                     xp = m.extract( val.strVal );
                     break;
                 case 3:
-                    xp = m.extract_with( other_item( i.nKey ), other_less() );
+                    xp = m.extract_with( other_item( i.nKey ), other_less());
                     break;
                 }
                 EXPECT_TRUE( !xp );
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
 
             // extract_min
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
             for ( auto const& i : arrKeys )
                 ASSERT_TRUE( m.insert( i, arrVals[ i.nKey ] ));
 
             size_t nCount = 0;
             int nKey = -1;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 switch ( nCount % 3 ) {
                 case 0:
                     xp = m.extract_min();
@@ -471,17 +471,17 @@ namespace {
             xp = m.extract_min();
             ASSERT_TRUE( !xp );
             EXPECT_EQ( kkSize, nCount );
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // extract_max
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
             for ( auto const& i : arrKeys )
                 ASSERT_TRUE( m.insert( i, arrVals[ i.nKey ] ));
 
             nKey = kkSize;
             nCount = 0;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 switch ( nCount % 3 ) {
                 case 0:
                     xp = m.extract_max();
@@ -508,7 +508,7 @@ namespace {
             xp = m.extract_max();
             ASSERT_TRUE( !xp );
             EXPECT_EQ( kkSize, nCount );
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
         }
index 2d3be0a862d0a6b3c624a19db717d2f1557c31cf..ae7f6cefe7cdfef5e0b47905a148b45b9ece2c4d 100644 (file)
@@ -191,19 +191,19 @@ namespace {
                     EXPECT_EQ( std::to_string( key.nKey ), val.strVal );
                 } ));
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             ASSERT_TRUE( m.check_consistency());
 
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             // erase/find
             for ( auto const& i : arrKeys ) {
-                value_type const& val( arrVals.at( i.nKey ) );
+                value_type const& val( arrVals.at( i.nKey ));
 
                 ASSERT_TRUE( m.contains( i.nKey ));
-                ASSERT_TRUE( m.contains( val.strVal ) );
+                ASSERT_TRUE( m.contains( val.strVal ));
                 ASSERT_TRUE( m.contains( i ));
                 ASSERT_TRUE( m.contains( other_item( i.nKey ), other_less()));
                 ASSERT_TRUE( m.find( i, []( key_type const& key, mapped_type& val ) {
@@ -289,7 +289,7 @@ namespace {
                     EXPECT_TRUE( false );
                 } ));
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             Map::gc::force_dispose();
@@ -299,16 +299,16 @@ namespace {
 
             // clear
             for ( auto const& i : arrKeys ) {
-                value_type& val( arrVals.at( i.nKey ) );
+                value_type& val( arrVals.at( i.nKey ));
                 ASSERT_TRUE( m.insert( i, &val ));
             }
 
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             m.clear();
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             Map::gc::force_dispose();
@@ -316,7 +316,7 @@ namespace {
                 EXPECT_EQ( item.nDisposeCount, 2u );
             }
 
-            ASSERT_TRUE( m.check_consistency() );
+            ASSERT_TRUE( m.check_consistency());
 
 
             // RCU-specific test related to exempt_ptr
@@ -325,16 +325,16 @@ namespace {
 
             // extract
             for ( auto const& i : arrKeys ) {
-                value_type& val( arrVals.at( i.nKey ) );
-                ASSERT_TRUE( m.insert( i, &val ) );
+                value_type& val( arrVals.at( i.nKey ));
+                ASSERT_TRUE( m.insert( i, &val ));
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             for ( auto const& i : arrKeys ) {
                 value_type const& val = arrVals.at( i.nKey );
 
-                EXPECT_TRUE( m.contains( i.nKey ) );
+                EXPECT_TRUE( m.contains( i.nKey ));
 
                 switch ( i.nKey % 4 ) {
                 case 0:
@@ -347,15 +347,15 @@ namespace {
                     xp = m.extract( val.strVal );
                     break;
                 case 3:
-                    xp = m.extract_with( other_item( i.nKey ), other_less() );
+                    xp = m.extract_with( other_item( i.nKey ), other_less());
                     break;
                 }
                 ASSERT_FALSE( !xp );
                 EXPECT_EQ( xp->nVal, i.nKey );
 
-                EXPECT_FALSE( m.contains( i.nKey ) );
+                EXPECT_FALSE( m.contains( i.nKey ));
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
             xp.release();
 
@@ -365,18 +365,18 @@ namespace {
             }
 
             // extract_min
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
             for ( auto const& i : arrKeys ) {
-                value_type& val( arrVals.at( i.nKey ) );
-                ASSERT_TRUE( m.insert( i, &val ) );
+                value_type& val( arrVals.at( i.nKey ));
+                ASSERT_TRUE( m.insert( i, &val ));
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
-            ASSERT_TRUE( m.check_consistency() );
+            ASSERT_TRUE( m.check_consistency());
 
             int nPrevKey = -1;
             size_t nCount = 0;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 switch ( nCount % 3 ) {
                 case 0:
                     xp = m.extract_min();
@@ -400,7 +400,7 @@ namespace {
                 nPrevKey = xp->nVal;
                 ++nCount;
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
             EXPECT_EQ( nCount, kkSize );
             xp.release();
@@ -411,18 +411,18 @@ namespace {
             }
 
             // extract_max
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
             for ( auto const& i : arrKeys ) {
-                value_type& val( arrVals.at( i.nKey ) );
-                ASSERT_TRUE( m.insert( i, &val ) );
+                value_type& val( arrVals.at( i.nKey ));
+                ASSERT_TRUE( m.insert( i, &val ));
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
-            ASSERT_TRUE( m.check_consistency() );
+            ASSERT_TRUE( m.check_consistency());
 
             nPrevKey = static_cast<int>(kkSize);
             nCount = 0;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 switch ( nCount % 3 ) {
                 case 0:
                     xp = m.extract_max();
@@ -446,7 +446,7 @@ namespace {
                 nPrevKey = xp->nVal;
                 ++nCount;
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
             EXPECT_EQ( nCount, kkSize );
             xp.release();
@@ -477,7 +477,7 @@ namespace {
             }
 
             // checking empty map
-            ASSERT_TRUE( m.check_consistency() );
+            ASSERT_TRUE( m.check_consistency());
         }
     };
 
index d2d103946fbbe067d6471d7f26af1b9fe15d1526..111fe78d228b0bda031dd4c682b615159fadf01d 100644 (file)
@@ -62,7 +62,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -205,7 +205,7 @@ namespace cds_test {
         {
             int operator ()(T const& v1, T const& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -219,7 +219,7 @@ namespace cds_test {
 
             int operator()( int lhs, T const& rhs ) const
             {
-                if ( lhs < rhs.key() )
+                if ( lhs < rhs.key())
                     return -1;
                 return lhs > rhs.key() ? 1 : 0;
             }
@@ -281,7 +281,7 @@ namespace cds_test {
             // Precondition: tree is empty
             // Postcondition: tree is empty
 
-            ASSERT_TRUE( t.empty() );
+            ASSERT_TRUE( t.empty());
             ASSERT_CONTAINER_SIZE( t, 0 );
             size_t const nTreeSize = kSize;
 
@@ -295,7 +295,7 @@ namespace cds_test {
                 data.push_back( value_type( static_cast<int>( key )));
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
@@ -332,7 +332,7 @@ namespace cds_test {
                     EXPECT_EQ( i.nUpdateNewCount, 0u );
                     ASSERT_TRUE( t.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
                     EXPECT_EQ( i.nUpdateNewCount, 1u );
-                    ASSERT_FALSE( t.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ) );
+                    ASSERT_FALSE( t.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
                     EXPECT_EQ( i.nUpdateNewCount, 1u );
                     i.nUpdateNewCount = 0;
                     break;
@@ -371,34 +371,34 @@ namespace cds_test {
                     break;
                 }
 
-                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( i.nKey ));
+                ASSERT_TRUE( t.contains( i ));
+                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 );
-                ASSERT_TRUE( t.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
+                ASSERT_TRUE( t.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
-                ASSERT_TRUE( t.find( i, []( value_type& v, value_type& ) { ++v.nFindCount; } ) );
+                ASSERT_TRUE( t.find( i, []( value_type& v, value_type& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 3u );
             }
-            ASSERT_FALSE( t.empty() );
+            ASSERT_FALSE( t.empty());
             ASSERT_CONTAINER_SIZE( t, nTreeSize );
 
             std::for_each( data.begin(), data.end(), []( value_type& v ) { v.clear_stat(); });
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[ idx ];
 
-                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( i.nKey ));
+                ASSERT_TRUE( t.contains( i ));
+                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; } ) );
+                ASSERT_TRUE( t.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 1u );
-                ASSERT_TRUE( t.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ) );
+                ASSERT_TRUE( t.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
                 EXPECT_EQ( i.nFindCount, 2u );
 
                 value_type v( i );
@@ -406,19 +406,19 @@ namespace cds_test {
                 case 0:
                     ASSERT_FALSE( t.unlink( v ));
                     ASSERT_TRUE( t.unlink( i ));
-                    ASSERT_FALSE( t.unlink( i ) );
+                    ASSERT_FALSE( t.unlink( i ));
                     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 ));
-                    ASSERT_FALSE( t.erase( v ) );
+                    ASSERT_FALSE( t.erase( v ));
                     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 );
@@ -429,9 +429,9 @@ namespace cds_test {
                     break;
                 case 5:
                     EXPECT_EQ( i.nEraseCount, 0u );
-                    ASSERT_TRUE( t.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    ASSERT_TRUE( t.erase_with( other_item( i.key()), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
                     EXPECT_EQ( i.nEraseCount, 1u );
-                    ASSERT_FALSE( t.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
+                    ASSERT_FALSE( t.erase_with( other_item( i.key()), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
                     EXPECT_EQ( i.nEraseCount, 1u );
                     break;
                 }
@@ -443,7 +443,7 @@ namespace cds_test {
                 ASSERT_FALSE( t.find( i,      []( value_type&, value_type const& ) {} ));
                 ASSERT_FALSE( t.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
             }
-            ASSERT_TRUE( t.empty() );
+            ASSERT_TRUE( t.empty());
             ASSERT_CONTAINER_SIZE( t, 0 );
 
             // Force retiring cycle
@@ -458,7 +458,7 @@ namespace cds_test {
                 i.clear_stat();
                 ASSERT_TRUE( t.insert( i ));
             }
-            ASSERT_FALSE( t.empty() );
+            ASSERT_FALSE( t.empty());
             ASSERT_CONTAINER_SIZE( t, nTreeSize );
 
             // clear test
index 07a1762ecff6100858ed42ffbdf0c35d3c7171f9..926ed35d4902e59529ff7f6192df561df92e17d9 100644 (file)
@@ -54,7 +54,7 @@ namespace cds_test {
 
             base_class::test( t );
 
-            ASSERT_TRUE( t.empty() );
+            ASSERT_TRUE( t.empty());
             ASSERT_CONTAINER_SIZE( t, 0 );
 
             typedef typename Tree::value_type value_type;
@@ -64,10 +64,10 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             typename Tree::guarded_ptr gp;
 
@@ -77,7 +77,7 @@ namespace cds_test {
 
                 gp = t.get( i );
                 ASSERT_TRUE( !gp );
-                gp = t.get( i.key() );
+                gp = t.get( i.key());
                 ASSERT_TRUE( !gp );
                 gp = t.get_with( other_item( i.key()), other_less());
                 ASSERT_TRUE( !gp );
@@ -99,7 +99,7 @@ namespace cds_test {
             for ( auto idx : indices ) {
                 auto& i = data[idx];
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( t.insert( i ) );
+                ASSERT_TRUE( t.insert( i ));
             }
 
             // get/extract
@@ -112,7 +112,7 @@ namespace cds_test {
                 ++gp->nFindCount;
                 EXPECT_EQ( i.nFindCount, 1u );
 
-                gp = t.get( i.key() );
+                gp = t.get( i.key());
                 ASSERT_FALSE( !gp );
                 ++gp->nFindCount;
                 EXPECT_EQ( i.nFindCount, 2u );
@@ -131,7 +131,7 @@ namespace cds_test {
                     gp = t.extract( i );
                     break;
                 case 2:
-                    gp = t.extract_with( other_item( i.key() ), other_less() );
+                    gp = t.extract_with( other_item( i.key()), other_less());
                     break;
                 }
                 ASSERT_FALSE( !gp );
@@ -140,15 +140,15 @@ namespace cds_test {
 
                 gp = t.extract( i );
                 ASSERT_TRUE( !gp );
-                gp = t.extract( i.key() );
+                gp = t.extract( i.key());
                 ASSERT_TRUE( !gp );
-                gp = t.extract_with( other_item( i.key() ), other_less() );
+                gp = t.extract_with( other_item( i.key()), other_less());
                 ASSERT_TRUE( !gp );
             }
 
             gp.release();
 
-            ASSERT_TRUE( t.empty() );
+            ASSERT_TRUE( t.empty());
             ASSERT_CONTAINER_SIZE( t, 0u );
 
             // Force retiring cycle
@@ -161,12 +161,12 @@ namespace cds_test {
             for ( auto idx : indices ) {
                 auto& i = data[idx];
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( t.insert( i ) );
+                ASSERT_TRUE( t.insert( i ));
             }
 
             size_t nCount = 0;
             int nKey = -1;
-            while ( !t.empty() ) {
+            while ( !t.empty()) {
                 gp = t.extract_min();
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->key(), nKey + 1 );
@@ -174,9 +174,9 @@ namespace cds_test {
                 nKey = gp->key();
             }
             gp.release();
-            ASSERT_TRUE( t.empty() );
+            ASSERT_TRUE( t.empty());
             ASSERT_CONTAINER_SIZE( t, 0u );
-            EXPECT_EQ( nCount, data.size() );
+            EXPECT_EQ( nCount, data.size());
 
             // Force retiring cycle
             Tree::gc::force_dispose();
@@ -188,12 +188,12 @@ namespace cds_test {
             for ( auto idx : indices ) {
                 auto& i = data[idx];
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( t.insert( i ) );
+                ASSERT_TRUE( t.insert( i ));
             }
 
             nCount = 0;
             nKey = static_cast<int>( data.size());
-            while ( !t.empty() ) {
+            while ( !t.empty()) {
                 gp = t.extract_max();
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->key(), nKey - 1 );
@@ -201,9 +201,9 @@ namespace cds_test {
                 nKey = gp->key();
             }
             gp.release();
-            ASSERT_TRUE( t.empty() );
+            ASSERT_TRUE( t.empty());
             ASSERT_CONTAINER_SIZE( t, 0u );
-            EXPECT_EQ( nCount, data.size() );
+            EXPECT_EQ( nCount, data.size());
 
             // Force retiring cycle
             Tree::gc::force_dispose();
index 8f1eb99cebd23dab3d7527df6bf39e6a09bf7d6e..a430a713e0539f2a8519071ad4d5f5603c86a35f 100644 (file)
@@ -56,7 +56,7 @@ namespace cds_test {
 
             base_class::test( t );
 
-            ASSERT_TRUE( t.empty() );
+            ASSERT_TRUE( t.empty());
             ASSERT_CONTAINER_SIZE( t, 0 );
 
             typedef typename Tree::value_type value_type;
@@ -67,10 +67,10 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             typename Tree::exempt_ptr xp;
 
@@ -82,9 +82,9 @@ namespace cds_test {
                     rcu_lock l;
                     value_type * p = t.get( i );
                     ASSERT_TRUE( p == nullptr );
-                    p = t.get( i.key() );
+                    p = t.get( i.key());
                     ASSERT_TRUE( !p );
-                    p = t.get_with( other_item( i.key() ), other_less() );
+                    p = t.get_with( other_item( i.key()), other_less());
                     ASSERT_TRUE( p == nullptr );
                 }
 
@@ -105,7 +105,7 @@ namespace cds_test {
             for ( auto idx : indices ) {
                 auto& i = data[idx];
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( t.insert( i ) );
+                ASSERT_TRUE( t.insert( i ));
             }
 
             // get/extract
@@ -122,12 +122,12 @@ namespace cds_test {
                     ++p->nFindCount;
                     EXPECT_EQ( i.nFindCount, 1u );
 
-                    p = t.get( i.key() );
+                    p = t.get( i.key());
                     ASSERT_FALSE( !p );
                     ++p->nFindCount;
                     EXPECT_EQ( i.nFindCount, 2u );
 
-                    p = t.get_with( other_item( i.key() ), other_less() );
+                    p = t.get_with( other_item( i.key()), other_less());
                     ASSERT_FALSE( !p );
                     ++p->nFindCount;
                     EXPECT_EQ( i.nFindCount, 3u );
@@ -142,7 +142,7 @@ namespace cds_test {
                     xp = t.extract( i );
                     break;
                 case 2:
-                    xp = t.extract_with( other_item( i.key() ), other_less() );
+                    xp = t.extract_with( other_item( i.key()), other_less());
                     break;
                 }
                 ASSERT_FALSE( !xp );
@@ -151,13 +151,13 @@ namespace cds_test {
 
                 xp = t.extract( i );
                 ASSERT_TRUE( !xp );
-                xp = t.extract( i.key() );
+                xp = t.extract( i.key());
                 ASSERT_TRUE( !xp );
-                xp = t.extract_with( other_item( i.key() ), other_less() );
+                xp = t.extract_with( other_item( i.key()), other_less());
                 ASSERT_TRUE( !xp );
             }
 
-            ASSERT_TRUE( t.empty() );
+            ASSERT_TRUE( t.empty());
             ASSERT_CONTAINER_SIZE( t, 0u );
 
             // Force retiring cycle
@@ -170,12 +170,12 @@ namespace cds_test {
             for ( auto idx : indices ) {
                 auto& i = data[idx];
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( t.insert( i ) );
+                ASSERT_TRUE( t.insert( i ));
             }
 
             size_t nCount = 0;
             int nKey = -1;
-            while ( !t.empty() ) {
+            while ( !t.empty()) {
                 xp = t.extract_min();
                 ASSERT_FALSE( !xp );
                 EXPECT_EQ( xp->key(), nKey + 1 );
@@ -183,9 +183,9 @@ namespace cds_test {
                 nKey = xp->key();
             }
             xp.release();
-            ASSERT_TRUE( t.empty() );
+            ASSERT_TRUE( t.empty());
             ASSERT_CONTAINER_SIZE( t, 0u );
-            EXPECT_EQ( nCount, data.size() );
+            EXPECT_EQ( nCount, data.size());
 
             // Force retiring cycle
             Tree::gc::force_dispose();
@@ -197,12 +197,12 @@ namespace cds_test {
             for ( auto idx : indices ) {
                 auto& i = data[idx];
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( t.insert( i ) );
+                ASSERT_TRUE( t.insert( i ));
             }
 
             nCount = 0;
             nKey = static_cast<int>( data.size());
-            while ( !t.empty() ) {
+            while ( !t.empty()) {
                 xp = t.extract_max();
                 ASSERT_FALSE( !xp );
                 EXPECT_EQ( xp->key(), nKey - 1 );
@@ -210,9 +210,9 @@ namespace cds_test {
                 nKey = xp->key();
             }
             xp.release();
-            ASSERT_TRUE( t.empty() );
+            ASSERT_TRUE( t.empty());
             ASSERT_CONTAINER_SIZE( t, 0u );
-            EXPECT_EQ( nCount, data.size() );
+            EXPECT_EQ( nCount, data.size());
 
             // Force retiring cycle
             Tree::gc::force_dispose();
index a6e98156c46f85c5ae407eadbc58ddc4a4be6eec..5e086bb2ce7d9541bcdfd195a5c47791a4601072 100644 (file)
@@ -268,19 +268,19 @@ namespace cds_test {
                     EXPECT_EQ( std::to_string( v.first.nKey ), v.second.strVal );
                 } ));
             }
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             ASSERT_TRUE( m.check_consistency());
 
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             // erase/find
             for ( auto const& i : arrKeys ) {
-                value_type const& val( arrVals.at( i.nKey ) );
+                value_type const& val( arrVals.at( i.nKey ));
 
                 ASSERT_TRUE( m.contains( i.nKey ));
-                ASSERT_TRUE( m.contains( val.strVal ) );
+                ASSERT_TRUE( m.contains( val.strVal ));
                 ASSERT_TRUE( m.contains( i ));
                 ASSERT_TRUE( m.contains( other_item( i.nKey ), other_less()));
                 ASSERT_TRUE( m.find( i, []( map_pair const& v ) {
@@ -366,19 +366,19 @@ namespace cds_test {
                     EXPECT_TRUE( false );
                 } ));
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // clear
             for ( auto const& i : arrKeys )
                 ASSERT_TRUE( m.insert( i ));
 
-            ASSERT_FALSE( m.empty() );
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             m.clear();
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
         }
     };
index 33a9cd9879a920adee9f808beff0b202e3c39a0a..d4973fb8b54d7892d0ea28268a35f700f3606144 100644 (file)
@@ -67,8 +67,8 @@ namespace cds_test {
             }
 
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             // get/extract
@@ -115,7 +115,7 @@ namespace cds_test {
                 gp = m.get_with( other_item( i.nKey ), other_less());
                 ASSERT_TRUE( !gp );
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             gp = m.extract_min();
@@ -124,40 +124,40 @@ namespace cds_test {
             EXPECT_TRUE( !gp );
 
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             // extract_min
             int nKey = -1;
             size_t nCount = 0;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 gp = m.extract_min();
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->first.nKey, nKey + 1 );
                 nKey = gp->first.nKey;
                 ++nCount;
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
             EXPECT_EQ( nCount, kkSize );
 
             // extract_max
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             nKey = kkSize;
             nCount = 0;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 gp = m.extract_max();
                 ASSERT_FALSE( !gp );
                 EXPECT_EQ( gp->first.nKey, nKey - 1 );
                 nKey = gp->first.nKey;
                 ++nCount;
             }
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
             EXPECT_EQ( nCount, kkSize );
 
index b358b8d4730c4c5605f4ec09f6a89656948986a2..fa614fed0f3481c463cfe3eccf5c7fd70d36c8a1 100644 (file)
@@ -67,8 +67,8 @@ namespace cds_test {
             }
 
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
-            ASSERT_FALSE( m.empty() );
+                ASSERT_TRUE( m.insert( i ));
+            ASSERT_FALSE( m.empty());
             ASSERT_CONTAINER_SIZE( m, kkSize );
 
             typedef typename Map::exempt_ptr    exempt_ptr;
@@ -76,7 +76,7 @@ namespace cds_test {
             typedef typename Map::rcu_lock      rcu_lock;
 
             // get/extract
-            shuffle( arrKeys.begin(), arrKeys.end() );
+            shuffle( arrKeys.begin(), arrKeys.end());
 
             exempt_ptr xp;
             for ( auto const& i : arrKeys ) {
@@ -119,7 +119,7 @@ namespace cds_test {
                             xp = m.extract( val.strVal );
                             break;
                         case 3:
-                            xp = m.extract_with( other_item( i.nKey ), other_less() );
+                            xp = m.extract_with( other_item( i.nKey ), other_less());
                             break;
                         }
                         ASSERT_FALSE( !xp );
@@ -142,7 +142,7 @@ namespace cds_test {
                             xp = m.extract( val.strVal );
                             break;
                         case 3:
-                            xp = m.extract_with( other_item( i.nKey ), other_less() );
+                            xp = m.extract_with( other_item( i.nKey ), other_less());
                             break;
                         }
                         EXPECT_TRUE( !xp );
@@ -178,7 +178,7 @@ namespace cds_test {
                         xp = m.extract( val.strVal );
                         break;
                     case 3:
-                        xp = m.extract_with( other_item( i.nKey ), other_less() );
+                        xp = m.extract_with( other_item( i.nKey ), other_less());
                         break;
                     }
                     EXPECT_TRUE( !xp );
@@ -192,22 +192,22 @@ namespace cds_test {
                     ASSERT_TRUE( !rp );
                     rp = m.get( i );
                     ASSERT_TRUE( !rp );
-                    rp = m.get_with( other_item( i.nKey ), other_less() );
+                    rp = m.get_with( other_item( i.nKey ), other_less());
                     ASSERT_TRUE( !rp );
                 }
             }
 
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
 
             // extract_min
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
+                ASSERT_TRUE( m.insert( i ));
 
             size_t nCount = 0;
             int nKey = -1;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 xp = m.extract_min();
                 ASSERT_FALSE( !xp );
                 EXPECT_EQ( xp->first.nKey, nKey + 1 );
@@ -219,7 +219,7 @@ namespace cds_test {
             xp = m.extract_max();
             ASSERT_TRUE( !xp );
             EXPECT_EQ( kkSize, nCount );
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
 
             // extract_max
@@ -229,11 +229,11 @@ namespace cds_test {
             EXPECT_TRUE( !xp );
 
             for ( auto const& i : arrKeys )
-                ASSERT_TRUE( m.insert( i ) );
+                ASSERT_TRUE( m.insert( i ));
 
             nKey = kkSize;
             nCount = 0;
-            while ( !m.empty() ) {
+            while ( !m.empty()) {
                 xp = m.extract_max();
                 ASSERT_FALSE( !xp );
                 EXPECT_EQ( xp->first.nKey, nKey - 1 );
@@ -246,7 +246,7 @@ namespace cds_test {
             xp = m.extract_max();
             ASSERT_TRUE( !xp );
             EXPECT_EQ( kkSize, nCount );
-            ASSERT_TRUE( m.empty() );
+            ASSERT_TRUE( m.empty());
             ASSERT_CONTAINER_SIZE( m, 0 );
         }
     };
index b64fe27e0342c1747c2fb4cd396dedd2832541c0..ec4c692057774f8a9fcea0cce626495691b1cfec 100644 (file)
@@ -58,7 +58,7 @@ namespace cds_test {
 
             void clear_stat()
             {
-                memset( this, 0, sizeof( *this ) );
+                memset( this, 0, sizeof( *this ));
             }
         };
 
@@ -93,7 +93,7 @@ namespace cds_test {
 
             template <typename Q>
             explicit int_item( Q const& src )
-                : nKey( src.key() )
+                : nKey( src.key())
                 , nVal( 0 )
             {}
 
@@ -106,17 +106,17 @@ namespace cds_test {
             int_item( int_item&& src )
                 : nKey( src.nKey )
                 , nVal( src.nVal )
-                , strVal( std::move( src.strVal ) )
+                , strVal( std::move( src.strVal ))
             {}
 
             int_item( int k, std::string&& s )
                 : nKey( k )
                 , nVal( k * 2 )
-                , strVal( std::move( s ) )
+                , strVal( std::move( s ))
             {}
 
             explicit int_item( other_item const& s )
-                : nKey( s.key() )
+                : nKey( s.key())
                 , nVal( s.key() * 2 )
             {}
 
@@ -192,7 +192,7 @@ namespace cds_test {
         struct cmp {
             int operator ()( int_item const& v1, int_item const& v2 ) const
             {
-                if ( v1.key() < v2.key() )
+                if ( v1.key() < v2.key())
                     return -1;
                 return v1.key() > v2.key() ? 1 : 0;
             }
@@ -213,7 +213,7 @@ namespace cds_test {
             template <typename T>
             int operator ()( int v1, T const& v2 ) const
             {
-                if ( v1 < v2.key() )
+                if ( v1 < v2.key())
                     return -1;
                 return v1 > v2.key() ? 1 : 0;
             }
@@ -244,7 +244,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
             size_t const nSetSize = kSize;
 
@@ -255,18 +255,18 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             // insert/find
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                ASSERT_FALSE( s.contains( i.nKey ) );
-                ASSERT_FALSE( s.contains( i ) );
-                ASSERT_FALSE( s.contains( other_item( i.key() ), other_less()));
+                ASSERT_FALSE( s.contains( i.nKey ));
+                ASSERT_FALSE( s.contains( i ));
+                ASSERT_FALSE( s.contains( other_item( i.key()), other_less()));
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
@@ -288,14 +288,14 @@ namespace cds_test {
                     updResult = s.update( i, []( bool bNew, value_type& val, value_type const& arg)
                         {
                             EXPECT_FALSE( bNew );
-                            EXPECT_EQ( val.key(), arg.key() );
+                            EXPECT_EQ( val.key(), arg.key());
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     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 );
@@ -326,7 +326,7 @@ namespace cds_test {
                     updResult = s.update( i, []( bool bNew, value_type& v, value_type const& arg )
                         {
                             EXPECT_TRUE( bNew );
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             ++v.nUpdateNewCount;
                         });
                     EXPECT_TRUE( updResult.first );
@@ -335,7 +335,7 @@ namespace cds_test {
                     updResult = s.update( i, []( bool bNew, value_type& v, value_type const& arg )
                         {
                             EXPECT_FALSE( bNew );
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             ++v.nUpdateNewCount;
                         }, false );
                     EXPECT_TRUE( updResult.first );
@@ -368,7 +368,7 @@ namespace cds_test {
 
                     ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nUpdateNewCount, 2u );
                         }));
                     break;
@@ -376,7 +376,7 @@ namespace cds_test {
                     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() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nVal, arg.nVal );
                         }));
                     break;
@@ -386,37 +386,37 @@ namespace cds_test {
                     EXPECT_TRUE( str.empty());
                     ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
-                            EXPECT_EQ( v.key(), arg.key() );
+                            EXPECT_EQ( v.key(), arg.key());
                             EXPECT_EQ( v.nVal, arg.nVal );
                             EXPECT_EQ( v.strVal, std::string( "Hello!" ));
-                        } ) );
+                        } ));
                     break;
                 default:
                     // forgot anything?..
                     ASSERT_TRUE( false );
                 }
 
-                ASSERT_TRUE( s.contains( i.nKey ) );
-                ASSERT_TRUE( s.contains( i ) );
-                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& ) {} ) );
+                ASSERT_TRUE( s.contains( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                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& ) {} ));
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             ASSERT_TRUE( s.check_consistency());
 
             // erase
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                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( i.nKey ));
+                ASSERT_TRUE( s.contains( i ));
+                ASSERT_TRUE( s.contains( other_item( i.key()), other_less()) );
                 ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int )
                     {
                         v.nFindCount = 1;
@@ -425,7 +425,7 @@ namespace cds_test {
                     {
                         EXPECT_EQ( ++v.nFindCount, 2u );
                     }));
-                ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& )
+                ASSERT_TRUE( s.find_with( other_item( i.key()), other_less(), []( value_type& v, other_item const& )
                     {
                         EXPECT_EQ( ++v.nFindCount, 3u );
                     }));
@@ -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 )
@@ -488,28 +488,28 @@ namespace cds_test {
                     break;
                 }
 
-                ASSERT_FALSE( s.contains( i.nKey ) );
-                ASSERT_FALSE( s.contains( i ) );
-                ASSERT_FALSE( s.contains( other_item( i.key() ), other_less()));
+                ASSERT_FALSE( s.contains( i.nKey ));
+                ASSERT_FALSE( s.contains( i ));
+                ASSERT_FALSE( s.contains( other_item( i.key()), other_less()));
                 ASSERT_FALSE( s.find( i.nKey, []( value_type&, int ) {} ));
                 ASSERT_FALSE( s.find( i, []( value_type&, value_type const& ) {} ));
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
 
             // clear
             for ( auto& i : data ) {
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             s.clear();
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
         }
     };
index 3ce0c3b43d9c613a067bef7c22d253de9a5aaa8f..2e39de5cf4a81d882f624699695448526cad1fde 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             base_class::test( s );
@@ -59,15 +59,15 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             for ( auto i : indices ) {
-                ASSERT_TRUE( s.insert( data[i] ) );
+                ASSERT_TRUE( s.insert( data[i] ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             typedef typename Set::guarded_ptr guarded_ptr;
@@ -80,7 +80,7 @@ namespace cds_test {
                 ASSERT_TRUE( !gp );
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.get( i.key() );
+                    gp = s.get( i.key());
                     ASSERT_FALSE( !gp );
                     break;
                 case 1:
@@ -88,10 +88,10 @@ namespace cds_test {
                     ASSERT_FALSE( !gp );
                     break;
                 case 2:
-                    gp = s.get_with( other_item( i.key() ), other_less() );
+                    gp = s.get_with( other_item( i.key()), other_less());
                     ASSERT_FALSE( !gp );
                 }
-                EXPECT_EQ( gp->key(), i.key() );
+                EXPECT_EQ( gp->key(), i.key());
                 gp->nFindCount = gp->key() * 3;
 
                 gp.release();
@@ -104,7 +104,7 @@ namespace cds_test {
                 ASSERT_TRUE( !gp );
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.extract( i.key() );
+                    gp = s.extract( i.key());
                     ASSERT_FALSE( !gp );
                     break;
                 case 1:
@@ -112,72 +112,72 @@ namespace cds_test {
                     ASSERT_FALSE( !gp );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     ASSERT_FALSE( !gp );
                     break;
                 }
-                EXPECT_EQ( gp->key(), i.key() );
+                EXPECT_EQ( gp->key(), i.key());
                 EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 3 ));
 
                 switch ( idx % 3 ) {
                 case 0:
-                    gp = s.extract( i.key() );
+                    gp = s.extract( i.key());
                     break;
                 case 1:
                     gp = s.extract( i );
                     break;
                 case 2:
-                    gp = s.extract_with( other_item( i.key() ), other_less() );
+                    gp = s.extract_with( other_item( i.key()), other_less());
                     break;
                 }
                 ASSERT_TRUE( !gp );
             }
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             for ( auto i : indices ) {
-                ASSERT_TRUE( s.insert( data[i] ) );
+                ASSERT_TRUE( s.insert( data[i] ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // extract_min
             size_t nCount = 0;
             int nKey = -1;
-            while ( !s.empty() ) {
+            while ( !s.empty()) {
                 gp = s.extract_min();
                 ASSERT_FALSE( !gp );
-                EXPECT_EQ( nKey + 1, gp->key() );
+                EXPECT_EQ( nKey + 1, gp->key());
                 ++nCount;
                 nKey = gp->key();
             }
             gp.release();
             EXPECT_EQ( nCount, nSetSize );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // extract_max
             for ( auto i : indices ) {
                 ASSERT_TRUE( s.insert( data[i] ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             nCount = 0;
             nKey = nSetSize;
-            while ( !s.empty() ) {
+            while ( !s.empty()) {
                 gp = s.extract_max();
                 ASSERT_FALSE( !gp );
-                EXPECT_EQ( nKey - 1, gp->key() );
+                EXPECT_EQ( nKey - 1, gp->key());
                 ++nCount;
                 nKey = gp->key();
             }
             gp.release();
             EXPECT_EQ( nCount, nSetSize );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
         }
index 43845867f091b93ec0eae3e1fcd2e2d4bcbe4ea9..2d90808031334c6209b68a83f3a83ebc77626615 100644 (file)
@@ -46,7 +46,7 @@ namespace cds_test {
             // Precondition: set is empty
             // Postcondition: set is empty
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             base_class::test( s );
@@ -59,15 +59,15 @@ namespace cds_test {
             data.reserve( kSize );
             indices.reserve( kSize );
             for ( size_t key = 0; key < kSize; ++key ) {
-                data.push_back( value_type( static_cast<int>(key) ) );
+                data.push_back( value_type( static_cast<int>(key)) );
                 indices.push_back( key );
             }
-            shuffle( indices.begin(), indices.end() );
+            shuffle( indices.begin(), indices.end());
 
             for ( auto i : indices ) {
                 ASSERT_TRUE( s.insert( data[i] ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             typedef typename Set::exempt_ptr exempt_ptr;
@@ -84,7 +84,7 @@ namespace cds_test {
                     ASSERT_TRUE( !rp );
                     switch ( idx % 3 ) {
                     case 0:
-                        rp = s.get( i.key() );
+                        rp = s.get( i.key());
                         ASSERT_FALSE( !rp );
                         break;
                     case 1:
@@ -92,10 +92,10 @@ namespace cds_test {
                         ASSERT_FALSE( !rp );
                         break;
                     case 2:
-                        rp = s.get_with( other_item( i.key() ), other_less() );
+                        rp = s.get_with( other_item( i.key()), other_less());
                         ASSERT_FALSE( !rp );
                     }
-                    EXPECT_EQ( rp->key(), i.key() );
+                    EXPECT_EQ( rp->key(), i.key());
                     rp->nFindCount = rp->key() * 3;
                 }
             }
@@ -112,7 +112,7 @@ namespace cds_test {
 
                         switch ( idx % 3 ) {
                         case 0:
-                            xp = s.extract( i.key() );
+                            xp = s.extract( i.key());
                             ASSERT_FALSE( !xp );
                             break;
                         case 1:
@@ -120,11 +120,11 @@ namespace cds_test {
                             ASSERT_FALSE( !xp );
                             break;
                         case 2:
-                            xp = s.extract_with( other_item( i.key() ), other_less() );
+                            xp = s.extract_with( other_item( i.key()), other_less());
                             ASSERT_FALSE( !xp );
                             break;
                         }
-                        EXPECT_EQ( xp->key(), i.key() );
+                        EXPECT_EQ( xp->key(), i.key());
                         EXPECT_EQ( xp->nFindCount, static_cast<unsigned>( i.key() * 3 ));
                     }
                     xp.release();
@@ -134,13 +134,13 @@ namespace cds_test {
 
                         switch ( idx % 3 ) {
                         case 0:
-                            xp = s.extract( i.key() );
+                            xp = s.extract( i.key());
                             break;
                         case 1:
                             xp = s.extract( i );
                             break;
                         case 2:
-                            xp = s.extract_with( other_item( i.key() ), other_less() );
+                            xp = s.extract_with( other_item( i.key()), other_less());
                             break;
                         }
                         ASSERT_TRUE( !xp );
@@ -149,7 +149,7 @@ namespace cds_test {
                 else {
                     switch ( idx % 3 ) {
                     case 0:
-                        xp = s.extract( i.key() );
+                        xp = s.extract( i.key());
                         ASSERT_FALSE( !xp );
                         break;
                     case 1:
@@ -157,73 +157,73 @@ namespace cds_test {
                         ASSERT_FALSE( !xp );
                         break;
                     case 2:
-                        xp = s.extract_with( other_item( i.key() ), other_less() );
+                        xp = s.extract_with( other_item( i.key()), other_less());
                         ASSERT_FALSE( !xp );
                         break;
                     }
-                    EXPECT_EQ( xp->key(), i.key() );
+                    EXPECT_EQ( xp->key(), i.key());
                     EXPECT_EQ( xp->nFindCount, static_cast<unsigned>( i.key() * 3 ));
 
                     switch ( idx % 3 ) {
                     case 0:
-                        xp = s.extract( i.key() );
+                        xp = s.extract( i.key());
                         break;
                     case 1:
                         xp = s.extract( i );
                         break;
                     case 2:
-                        xp = s.extract_with( other_item( i.key() ), other_less() );
+                        xp = s.extract_with( other_item( i.key()), other_less());
                         break;
                     }
                     ASSERT_TRUE( !xp );
                 }
             }
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             for ( auto i : indices ) {
-                ASSERT_TRUE( s.insert( data[i] ) );
+                ASSERT_TRUE( s.insert( data[i] ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             // extract_min
             size_t nCount = 0;
             int nKey = -1;
-            while ( !s.empty() ) {
+            while ( !s.empty()) {
                 xp = s.extract_min();
                 ASSERT_FALSE( !xp );
-                EXPECT_EQ( nKey + 1, xp->key() );
+                EXPECT_EQ( nKey + 1, xp->key());
                 ++nCount;
                 nKey = xp->key();
             }
             xp.release();
             EXPECT_EQ( nCount, nSetSize );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // extract_max
             for ( auto i : indices ) {
-                ASSERT_TRUE( s.insert( data[i] ) );
+                ASSERT_TRUE( s.insert( data[i] ));
             }
-            ASSERT_FALSE( s.empty() );
+            ASSERT_FALSE( s.empty());
             ASSERT_CONTAINER_SIZE( s, nSetSize );
 
             nCount = 0;
             nKey = nSetSize;
-            while ( !s.empty() ) {
+            while ( !s.empty()) {
                 xp = s.extract_max();
                 ASSERT_FALSE( !xp );
-                EXPECT_EQ( nKey - 1, xp->key() );
+                EXPECT_EQ( nKey - 1, xp->key());
                 ++nCount;
                 nKey = xp->key();
             }
             xp.release();
             EXPECT_EQ( nCount, nSetSize );
 
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
         }
 
index 49e46c38a7b13eaf91300981c2412d12e4007583..f4b2e87603cd2fa0a6c0e4116d345f7574c73ac7 100644 (file)
@@ -82,6 +82,7 @@ sub processFile( $ )
                 $nTabsFound += $_ =~ s/\t/    /g;\r
                 $_ =~ s/\s+$//;\r
                 $_ =~ s/\s+;$/;/;\r
+                $_ =~ s/\)\s+\)/\)\)/g;\r
                 $str .= $_      ;\r
                 $str .= "\n"    ;\r
             }\r