Removed trailing spaces
authorkhizmax <libcds.dev@gmail.com>
Mon, 31 Jul 2017 07:46:43 +0000 (10:46 +0300)
committerkhizmax <libcds.dev@gmail.com>
Mon, 31 Jul 2017 07:46:43 +0000 (10:46 +0300)
74 files changed:
cds/algo/backoff_strategy.h
cds/algo/bit_reversal.h
cds/algo/flat_combining/wait_strategy.h
cds/algo/split_bitstring.h
cds/compiler/gcc/compiler_macro.h
cds/compiler/gcc/defs.h
cds/container/details/skip_list_base.h
cds/container/impl/bronson_avltree_map_rcu.h
cds/container/michael_map.h
cds/container/michael_set.h
cds/container/weak_ringbuffer.h
cds/details/throw_exception.h
cds/gc/details/hp_common.h
cds/gc/dhp.h
cds/gc/hp.h
cds/intrusive/details/feldman_hashset_base.h
cds/intrusive/details/skip_list_base.h
cds/intrusive/details/split_list_base.h
cds/intrusive/ellen_bintree_rcu.h
cds/intrusive/impl/feldman_hashset.h
cds/intrusive/impl/iterable_list.h
cds/intrusive/michael_set.h
cds/intrusive/split_list.h
cds/intrusive/striped_set.h
cds/memory/vyukov_queue_pool.h
cds/os/alloc_aligned.h
cds/sync/spinlock.h
cds/threading/details/pthread_manager.h
cds/threading/details/wintls_manager.h
cds/urcu/details/gp.h
src/dhp.cpp
src/hp.cpp
src/thread_data.cpp
test/include/cds_test/ext_byteswap.h
test/include/cds_test/fc_hevy_value.h
test/stress/main.cpp
test/stress/map/del3/map_del3.cpp
test/stress/map/delodd/map_delodd.cpp
test/stress/map/find_string/map_find_string.cpp
test/stress/map/insdel_func/map_insdel_func.cpp
test/stress/map/insdel_item_int/map_insdel_item_int.cpp
test/stress/map/insdel_string/map_insdel_string.cpp
test/stress/map/insdelfind/map_insdelfind.cpp
test/stress/map/iter_erase/map_iter_erase.cpp
test/stress/map/iter_erase/map_iter_erase.h
test/stress/map/minmax/map_minmax.h
test/stress/queue/intrusive_push_pop.cpp
test/stress/queue/pop.cpp
test/stress/queue/push.cpp
test/stress/queue/push_pop.cpp
test/stress/queue/random.cpp
test/stress/queue/spsc_buffer.cpp
test/stress/queue/spsc_queue.cpp
test/stress/queue/std_queue.h
test/stress/set/del3/set_del3.cpp
test/stress/set/delodd/set_delodd.cpp
test/stress/set/insdel_find/set_insdelfind.cpp
test/stress/set/insdel_func/set_insdel_func.cpp
test/stress/set/insdel_string/set_insdel_string.cpp
test/stress/set/iter_erase/set_iter_erase.cpp
test/stress/set/iteration/set_iteration.cpp
test/stress/set/set_type_feldman_hashset.h
test/unit/intrusive-list/test_intrusive_iterable_list.h
test/unit/intrusive-set/test_intrusive_michael_iterable_hp.h
test/unit/map/test_michael_iterable_hp.h
test/unit/misc/bit_reversal.cpp
test/unit/misc/cxx11_atomic_class.cpp
test/unit/misc/split_bitstring.cpp
test/unit/queue/fcqueue.cpp
test/unit/queue/test_bounded_queue.h
test/unit/queue/vyukov_mpmc_queue.cpp
test/unit/queue/weak_ringbuffer.cpp
test/unit/set/test_michael_iterable_hp.h
test/unit/set/test_split_iterable_hp.h

index cc676cf8725e125bb75e18515809faa52a22a4a0..237f63ca50d7ad4dd198628cb13df9f49176bbb1 100644 (file)
@@ -351,9 +351,9 @@ namespace cds {
             Choosing the best value for th timeout is platform and application specific task.
             The default values for timeout is provided by \p Traits class that should
             \p timeout data member. There are two predefined \p Traits implementation:
-            - \p delay_const_traits - defines \p timeout as a constant (enum). 
+            - \p delay_const_traits - defines \p timeout as a constant (enum).
               To change timeout you should recompile your application.
-            - \p delay_runtime_traits - specifies timeout as static data member that can be changed 
+            - \p delay_runtime_traits - specifies timeout as static data member that can be changed
               at runtime to tune the back-off strategy.
 
             You may use \p Traits template parameter to separate back-off implementations.
index ca9bcf7d5dd77fe55e3c6e890948119cbd9c4354..b102bfea8a3d130f66cd5a7a99ce0aca0dd0a629 100644 (file)
@@ -44,18 +44,18 @@ namespace cds { namespace algo {
             /// 32bit
             uint32_t operator()( uint32_t x ) const
             {
-                x = ( ( ( x & 0xaaaaaaaa ) >> 1 ) | ( ( x & 0x55555555 ) << 1 ) );
-                x = ( ( ( x & 0xcccccccc ) >> 2 ) | ( ( x & 0x33333333 ) << 2 ) );
-                x = ( ( ( x & 0xf0f0f0f0 ) >> 4 ) | ( ( x & 0x0f0f0f0f ) << 4 ) );
-                x = ( ( ( x & 0xff00ff00 ) >> 8 ) | ( ( x & 0x00ff00ff ) << 8 ) );
-                return( ( x >> 16 ) | ( x << 16 ) );
+                x = ( ( ( x & 0xaaaaaaaa ) >> 1 ) | ( ( x & 0x55555555 ) << 1 ));
+                x = ( ( ( x & 0xcccccccc ) >> 2 ) | ( ( x & 0x33333333 ) << 2 ));
+                x = ( ( ( x & 0xf0f0f0f0 ) >> 4 ) | ( ( x & 0x0f0f0f0f ) << 4 ));
+                x = ( ( ( x & 0xff00ff00 ) >> 8 ) | ( ( x & 0x00ff00ff ) << 8 ));
+                return( ( x >> 16 ) | ( x << 16 ));
             }
 
             /// 64bit
             uint64_t operator()( uint64_t x ) const
             {
-                return ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x ) ) ) << 32 )  // low 32bit
-                    | ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x >> 32 ) ) ) );  // high 32bit
+                return ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x )) ) << 32 )  // low 32bit
+                    | ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x >> 32 )) ));  // high 32bit
             }
         };
 
@@ -87,14 +87,14 @@ namespace cds { namespace algo {
                 return ( static_cast<uint32_t>( table[x & 0xff] ) << 24 ) |
                     ( static_cast<uint32_t>( table[( x >> 8 ) & 0xff] ) << 16 ) |
                     ( static_cast<uint32_t>( table[( x >> 16 ) & 0xff] ) << 8 ) |
-                    ( static_cast<uint32_t>( table[( x >> 24 ) & 0xff] ) );
+                    ( static_cast<uint32_t>( table[( x >> 24 ) & 0xff] ));
             }
 
             /// 64bit
             uint64_t operator()( uint64_t x ) const
             {
-                return ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x ) ) ) << 32 ) |
-                    static_cast<uint64_t>( operator()( static_cast<uint32_t>( x >> 32 ) ) );
+                return ( static_cast<uint64_t>( operator()( static_cast<uint32_t>( x )) ) << 32 ) |
+                    static_cast<uint64_t>( operator()( static_cast<uint32_t>( x >> 32 )) );
             }
         };
 
@@ -106,7 +106,7 @@ namespace cds { namespace algo {
             //@cond
             static uint8_t muldiv32_byte( uint8_t b )
             {
-                return static_cast<uint8_t>( ( ( b * 0x0802LU & 0x22110LU ) | ( b * 0x8020LU & 0x88440LU ) ) * 0x10101LU >> 16 );
+                return static_cast<uint8_t>( ( ( b * 0x0802LU & 0x22110LU ) | ( b * 0x8020LU & 0x88440LU )) * 0x10101LU >> 16 );
             }
 
             static uint8_t muldiv64_byte( uint8_t b )
@@ -117,43 +117,43 @@ namespace cds { namespace algo {
             // for 32bit architecture
             static uint32_t muldiv32( uint32_t x )
             {
-                return static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 24 ) ) )
-                    | ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 16 ) ) ) << 8 )
-                    | ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 8 ) ) ) << 16 )
-                    | ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x ) ) ) << 24 );
+                return static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 24 )) )
+                    | ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 16 )) ) << 8 )
+                    | ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x >> 8 )) ) << 16 )
+                    | ( static_cast<uint32_t>( muldiv32_byte( static_cast<uint8_t>( x )) ) << 24 );
             }
 
             static uint64_t muldiv32( uint64_t x )
             {
-                return static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 56 ) ) )
-                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 48 ) ) ) << 8 )
-                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 40 ) ) ) << 16 )
-                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 32 ) ) ) << 24 )
-                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 24 ) ) ) << 32 )
-                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 16 ) ) ) << 40 )
-                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 8 ) ) ) << 48 )
-                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x ) ) ) << 56 );
+                return static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 56 )) )
+                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 48 )) ) << 8 )
+                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 40 )) ) << 16 )
+                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 32 )) ) << 24 )
+                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 24 )) ) << 32 )
+                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 16 )) ) << 40 )
+                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x >> 8 )) ) << 48 )
+                    | ( static_cast<uint64_t>( muldiv32_byte( static_cast<uint8_t>( x )) ) << 56 );
             }
 
             /// for 64bit architectire
             static uint32_t muldiv64( uint32_t x )
             {
-                return static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 24 ) ) )
-                    | ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 16 ) ) ) << 8 )
-                    | ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 8 ) ) ) << 16 )
-                    | ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x ) ) ) << 24 );
+                return static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 24 )) )
+                    | ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 16 )) ) << 8 )
+                    | ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x >> 8 )) ) << 16 )
+                    | ( static_cast<uint32_t>( muldiv64_byte( static_cast<uint8_t>( x )) ) << 24 );
             }
 
             static uint64_t muldiv64( uint64_t x )
             {
-                return static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 56 ) ) )
-                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 48 ) ) ) << 8 )
-                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 40 ) ) ) << 16 )
-                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 32 ) ) ) << 24 )
-                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 24 ) ) ) << 32 )
-                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 16 ) ) ) << 40 )
-                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 8 ) ) ) << 48 )
-                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x ) ) ) << 56 );
+                return static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 56 )) )
+                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 48 )) ) << 8 )
+                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 40 )) ) << 16 )
+                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 32 )) ) << 24 )
+                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 24 )) ) << 32 )
+                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 16 )) ) << 40 )
+                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x >> 8 )) ) << 48 )
+                    | ( static_cast<uint64_t>( muldiv64_byte( static_cast<uint8_t>( x )) ) << 56 );
             }
             //@endcond
 
index 8a4a567beb72c45047493e5b028c57f0776a487a..680a21549c9ceb6593e06b463f0dfb9d818a6086 100644 (file)
@@ -252,7 +252,7 @@ namespace cds { namespace algo { namespace flat_combining {
                             return true;
                         }
 
-                        bool ret = m_condvar.wait_for( lock, std::chrono::milliseconds( c_nWaitMilliseconds ) ) == std::cv_status::no_timeout;
+                        bool ret = m_condvar.wait_for( lock, std::chrono::milliseconds( c_nWaitMilliseconds )) == std::cv_status::no_timeout;
                         m_wakeup = false;
                         return ret;
                     }
@@ -334,7 +334,7 @@ namespace cds { namespace algo { namespace flat_combining {
                             return true;
                         }
 
-                        bool ret = rec.m_condvar.wait_for( lock, std::chrono::milliseconds( c_nWaitMilliseconds ) ) == std::cv_status::no_timeout;
+                        bool ret = rec.m_condvar.wait_for( lock, std::chrono::milliseconds( c_nWaitMilliseconds )) == std::cv_status::no_timeout;
                         m_wakeup = false;
                         return ret;
                     }
@@ -411,7 +411,7 @@ namespace cds { namespace algo { namespace flat_combining {
                             return true;
                         }
 
-                        bool ret = rec.m_condvar.wait_for( lock, std::chrono::milliseconds( c_nWaitMilliseconds ) ) == std::cv_status::no_timeout;
+                        bool ret = rec.m_condvar.wait_for( lock, std::chrono::milliseconds( c_nWaitMilliseconds )) == std::cv_status::no_timeout;
                         rec.m_wakeup = false;
                         return ret;
                     }
index bdcc1589d8be372466ff9ef772a9c5dce1a303f7..ef4909e1e2ef8a0085f411bc1e001923846a7dfb 100644 (file)
@@ -71,7 +71,7 @@ namespace cds { namespace algo {
     public:
         /// Initializises the splitter with reference to \p h and zero start bit offset
         explicit split_bitstring( bitstring const& h )
-            : cur_( reinterpret_cast<uint8_t const*>( &h ) )
+            : cur_( reinterpret_cast<uint8_t const*>( &h ))
             , offset_( 0 )
             , first_( cur_ )
             , last_( cur_ + c_bitstring_size )
@@ -81,7 +81,7 @@ namespace cds { namespace algo {
         split_bitstring( bitstring const& h, size_t nBitOffset )
             : cur_( reinterpret_cast<uint8_t const*>( &h ) + nBitOffset / c_nBitPerByte )
             , offset_( nBitOffset % c_nBitPerByte  )
-            , first_( reinterpret_cast<uint8_t const*>( &h ) )
+            , first_( reinterpret_cast<uint8_t const*>( &h ))
             , last_( first_ + c_bitstring_size )
         {}
 
@@ -104,7 +104,7 @@ namespace cds { namespace algo {
         */
         uint_type cut( unsigned count )
         {
-            assert( !eos() );
+            assert( !eos());
 
             uint_type result = 0;
 #       if defined( CDS_ARCH_LITTLE_ENDIAN )
@@ -218,7 +218,7 @@ namespace cds { namespace algo {
     public:
         /// Initializises the splitter with reference to \p h and zero start bit offset
         explicit byte_splitter( bitstring const& h )
-            : cur_( reinterpret_cast<uint8_t const*>( &h ) )
+            : cur_( reinterpret_cast<uint8_t const*>( &h ))
             , first_( cur_ )
             , last_( cur_ + c_bitstring_size )
         {}
@@ -226,7 +226,7 @@ namespace cds { namespace algo {
         /// Initializises the splitter with reference to \p h and start bit offset \p nBitOffset
         byte_splitter( bitstring const& h, size_t nBitOffset )
             : cur_( reinterpret_cast<uint8_t const*>( &h ) + nBitOffset / c_nBitPerByte )
-            , first_( reinterpret_cast<uint8_t const*>( &h ) )
+            , first_( reinterpret_cast<uint8_t const*>( &h ))
             , last_( first_ + c_bitstring_size )
         {
             assert( is_correct( static_cast<unsigned>( nBitOffset )));
@@ -252,8 +252,8 @@ namespace cds { namespace algo {
         */
         uint_type cut( unsigned count )
         {
-            assert( !eos() );
-            assert( is_correct( count ) );
+            assert( !eos());
+            assert( is_correct( count ));
 
             uint_type result = 0;
 
@@ -379,7 +379,7 @@ namespace cds { namespace algo {
         */
         int_type cut( unsigned count )
         {
-            assert( !eos() );
+            assert( !eos());
             assert( is_correct( count ));
 
             int_type result = ( number_ >> shift_ ) & (( 1 << count ) - 1 );
@@ -396,10 +396,10 @@ namespace cds { namespace algo {
         */
         int_type safe_cut( unsigned count )
         {
-            if ( eos() )
+            if ( eos())
                 return 0;
 
-            unsigned rest = static_cast<unsigned>( rest_count() );
+            unsigned rest = static_cast<unsigned>( rest_count());
             if ( rest < count )
                 count = rest;
             return count ? cut( count ) : 0;
index 3d419f48b1ca05a9b3926e894e85fc71f2234a13..18178c8689e16a80fbe1325cff414d1c5832f8ec 100644 (file)
 // Sanitizer attributes
 // Example: CDS_DISABLE_SANITIZE( "function" )
 #ifdef CDS_ADDRESS_SANITIZER_ENABLED
-#   define CDS_SUPPRESS_SANITIZE( ... ) __attribute__(( no_sanitize( __VA_ARGS__ ) ))
+#   define CDS_SUPPRESS_SANITIZE( ... ) __attribute__(( no_sanitize( __VA_ARGS__ )))
 #else
 #   define CDS_SUPPRESS_SANITIZE( ... )
 #endif
index 35aa7de09950a01d0036dd5eed5eddb5495b5784..c8aaf832777b6ed9ccd3cd060da2fe822f5d3861 100644 (file)
 // double-width CAS support
 // note: gcc-4.8 does not support double-word atomics
 //       gcc-4.9: a lot of crashes when use DCAS
-//       gcc-7: 128-bit atomic is not lock-free, see https://gcc.gnu.org/ml/gcc/2017-01/msg00167.html 
+//       gcc-7: 128-bit atomic is not lock-free, see https://gcc.gnu.org/ml/gcc/2017-01/msg00167.html
 // You can manually suppress wide-atomic support by defining in compiler command line:
 //  for 64bit platform: -DCDS_DISABLE_128BIT_ATOMIC
 //  for 32bit platform: -DCDS_DISABLE_64BIT_ATOMIC
index c622234a0354e1578efb6a5f1d14bb6951a246cd..be4e3a508e6dcc1861916d589f5aa72505e173d5 100644 (file)
@@ -214,7 +214,7 @@ namespace cds { namespace container {
                         return pMem;
                     }
                     else
-                        pMem = reinterpret_cast<unsigned char *>( node_allocator_type().allocate( 1 ) );
+                        pMem = reinterpret_cast<unsigned char *>( node_allocator_type().allocate( 1 ));
 
                     return pMem;
                 }
index ff1f087f1455307aa62ca7efb93101198f10f43f..d1e2d9fab20326ed014bff7fcd2f7f9126c63167 100644 (file)
@@ -1349,7 +1349,7 @@ namespace cds { namespace container {
 
                     if ( !pChild ) {
                         // Found min/max
-                        if ( pNode->is_valued( memory_model::memory_order_acquire ) ) {
+                        if ( pNode->is_valued( memory_model::memory_order_acquire )) {
                             int result = try_remove_node( pParent, pNode, nVersion, func, disp );
 
                             if ( result == update_flags::result_removed )
@@ -1785,7 +1785,7 @@ namespace cds { namespace container {
 
                     int hLRL = height_null( child( pLRight, left_child, memory_model::memory_order_relaxed ), memory_model::memory_order_acquire );
                     int balance = hLL - hLRL;
-                    if ( balance >= -1 && balance <= 1 && !( ( hLL == 0 || hLRL == 0 ) && !pLeft->is_valued( memory_model::memory_order_relaxed ) ) ) {
+                    if ( balance >= -1 && balance <= 1 && !( ( hLL == 0 || hLRL == 0 ) && !pLeft->is_valued( memory_model::memory_order_relaxed )) ) {
                         // nParent.child.left won't be damaged after a double rotation
                         return rotate_right_over_left_locked( pParent, pNode, pLeft, hR, hLL, pLRight, hLRL );
                     }
@@ -1798,7 +1798,7 @@ namespace cds { namespace container {
                 // rotate right
                 return rotate_right_locked( pParent, pNode, pLeft, hR, hLL, pLRight, hLR );
             }
-            
+
             return pNode; // retry
         }
 
@@ -1840,7 +1840,7 @@ namespace cds { namespace container {
                     node_type * pRLRight = child( pRLeft, right_child, memory_model::memory_order_relaxed );
                     int hRLR = height_null( pRLRight, memory_model::memory_order_acquire );
                     int balance = hRR - hRLR;
-                    if ( balance >= -1 && balance <= 1 && !( ( hRR == 0 || hRLR == 0 ) && !pRight->is_valued( memory_model::memory_order_relaxed ) ) )
+                    if ( balance >= -1 && balance <= 1 && !( ( hRR == 0 || hRLR == 0 ) && !pRight->is_valued( memory_model::memory_order_relaxed )) )
                         return rotate_left_over_right_locked( pParent, pNode, hL, pRight, pRLeft, hRR, hRLR );
                 }
 
index 9f851f696d8fefc1d5d76b350b87b9586245e780..912ae81daef79af486deffdeb9ed5e4f59cff2a8 100644 (file)
@@ -688,7 +688,7 @@ namespace cds { namespace container {
         erase_at( Iterator const& iter )
 #endif
         {
-            assert( iter != end() );
+            assert( iter != end());
             assert( iter.bucket() != nullptr );
 
             if ( iter.bucket()->erase_at( iter.underlying_iterator())) {
index fb23c442295181c517e7fa2917fc88a8ecf105ea..32fddca4b131de57f1a8fe3e4c2ee170da1205f8 100644 (file)
@@ -584,7 +584,7 @@ namespace cds { namespace container {
         erase_at( Iterator const& iter )
 #endif
         {
-            assert( iter != end() );
+            assert( iter != end());
             assert( iter.bucket() != nullptr );
 
             if ( iter.bucket()->erase_at( iter.underlying_iterator())) {
index cf021320fba48f7aaacd7a88a677644f52054878..0198c0327de928875f71aed9ff2313b85f9c272d 100644 (file)
@@ -127,8 +127,8 @@ namespace cds { namespace container {
         Ring buffer is a bounded queue. Additionally, \p %WeakRingBuffer supports batch operations -
         you can push/pop an array of elements.
 
-        There are a specialization \ref cds_nonintrusive_WeakRingBuffer_void "WeakRingBuffer<void, Traits>" 
-        that is not a queue but a "memory pool" between producer and consumer threads. 
+        There are a specialization \ref cds_nonintrusive_WeakRingBuffer_void "WeakRingBuffer<void, Traits>"
+        that is not a queue but a "memory pool" between producer and consumer threads.
         \p WeakRingBuffer<void> supports variable-sized data.
 
         @warning: \p %WeakRingBuffer is developed for 64-bit architecture.
@@ -201,7 +201,7 @@ namespace cds { namespace container {
             \code
             cds::container::WeakRingBuffer<std::string> ringbuf;
             char const* arr[10];
-            ringbuf.push( arr, 10, 
+            ringbuf.push( arr, 10,
                 []( std::string& element, char const* src ) {
                     new( &element ) std::string( src );
                 });
@@ -221,10 +221,10 @@ namespace cds { namespace container {
         template <typename Q, typename CopyFunc>
         bool push( Q* arr, size_t count, CopyFunc copy )
         {
-            assert( count < capacity() );
+            assert( count < capacity());
             counter_type back = back_.load( memory_model::memory_order_relaxed );
 
-            assert( static_cast<size_t>( back - pfront_ ) <= capacity() );
+            assert( static_cast<size_t>( back - pfront_ ) <= capacity());
 
             if ( static_cast<size_t>( pfront_ + capacity() - back ) < count ) {
                 pfront_ = front_.load( memory_model::memory_order_acquire );
@@ -276,7 +276,7 @@ namespace cds { namespace container {
         {
             counter_type back = back_.load( memory_model::memory_order_relaxed );
 
-            assert( static_cast<size_t>( back - pfront_ ) <= capacity() );
+            assert( static_cast<size_t>( back - pfront_ ) <= capacity());
 
             if ( pfront_ + capacity() - back < 1 ) {
                 pfront_ = front_.load( memory_model::memory_order_acquire );
@@ -309,7 +309,7 @@ namespace cds { namespace container {
         {
             counter_type back = back_.load( memory_model::memory_order_relaxed );
 
-            assert( static_cast<size_t>( back - pfront_ ) <= capacity() );
+            assert( static_cast<size_t>( back - pfront_ ) <= capacity());
 
             if ( pfront_ + capacity() - back < 1 ) {
                 pfront_ = front_.load( memory_model::memory_order_acquire );
@@ -377,10 +377,10 @@ namespace cds { namespace container {
         template <typename Q, typename CopyFunc>
         bool pop( Q* arr, size_t count, CopyFunc copy )
         {
-            assert( count < capacity() );
+            assert( count < capacity());
 
             counter_type front = front_.load( memory_model::memory_order_relaxed );
-            assert( static_cast<size_t>( cback_ - front ) < capacity() );
+            assert( static_cast<size_t>( cback_ - front ) < capacity());
 
             if ( static_cast<size_t>( cback_ - front ) < count ) {
                 cback_ = back_.load( memory_model::memory_order_acquire );
@@ -458,7 +458,7 @@ namespace cds { namespace container {
         bool dequeue_with( Func f )
         {
             counter_type front = front_.load( memory_model::memory_order_relaxed );
-            assert( static_cast<size_t>( cback_ - front ) < capacity() );
+            assert( static_cast<size_t>( cback_ - front ) < capacity());
 
             if ( cback_ - front < 1 ) {
                 cback_ = back_.load( memory_model::memory_order_acquire );
@@ -491,7 +491,7 @@ namespace cds { namespace container {
         value_type* front()
         {
             counter_type front = front_.load( memory_model::memory_order_relaxed );
-            assert( static_cast<size_t>( cback_ - front ) < capacity() );
+            assert( static_cast<size_t>( cback_ - front ) < capacity());
 
             if ( cback_ - front < 1 ) {
                 cback_ = back_.load( memory_model::memory_order_acquire );
@@ -510,7 +510,7 @@ namespace cds { namespace container {
         bool pop_front()
         {
             counter_type front = front_.load( memory_model::memory_order_relaxed );
-            assert( static_cast<size_t>( cback_ - front ) <= capacity() );
+            assert( static_cast<size_t>( cback_ - front ) <= capacity());
 
             if ( cback_ - front < 1 ) {
                 cback_ = back_.load( memory_model::memory_order_acquire );
@@ -529,7 +529,7 @@ namespace cds { namespace container {
         void clear()
         {
             value_type v;
-            while ( pop( v ) );
+            while ( pop( v ));
         }
 
         /// Checks if the ring-buffer is empty
@@ -668,7 +668,7 @@ namespace cds { namespace container {
 
         /// [producer] Reserve \p size bytes
         /**
-            The function returns a pointer to reserved buffer of \p size bytes. 
+            The function returns a pointer to reserved buffer of \p size bytes.
             If no enough space in the ring buffer the function returns \p nullptr.
 
             After successful \p %back() you should fill the buffer provided and call \p push_back():
@@ -712,10 +712,10 @@ namespace cds { namespace container {
             size_t real_size = calc_real_size( size );
 
             // check if we can reserve read_size bytes
-            assert( real_size < capacity() );
+            assert( real_size < capacity());
             counter_type back = back_.load( memory_model::memory_order_relaxed );
 
-            assert( static_cast<size_t>( back - pfront_ ) <= capacity() );
+            assert( static_cast<size_t>( back - pfront_ ) <= capacity());
 
             if ( static_cast<size_t>( pfront_ + capacity() - back ) < real_size ) {
                 pfront_ = front_.load( memory_model::memory_order_acquire );
@@ -732,8 +732,8 @@ namespace cds { namespace container {
             size_t tail_size = capacity() - static_cast<size_t>( buffer_.mod( back ));
             if ( tail_size < real_size ) {
                 // make unused tail
-                assert( tail_size >= sizeof( size_t ) );
-                assert( !is_tail( tail_size ) );
+                assert( tail_size >= sizeof( size_t ));
+                assert( !is_tail( tail_size ));
 
                 *reinterpret_cast<size_t*>( reserved ) = make_tail( tail_size - sizeof(size_t));
                 back += tail_size;
@@ -757,7 +757,7 @@ namespace cds { namespace container {
             // reserve and store size
             *reinterpret_cast<size_t*>( reserved ) = size;
 
-            return reinterpret_cast<void*>( reserved + sizeof( size_t ) );
+            return reinterpret_cast<void*>( reserved + sizeof( size_t ));
         }
 
         /// [producer] Push reserved bytes into ring
@@ -801,8 +801,8 @@ namespace cds { namespace container {
             counter_type back = back_.load( memory_model::memory_order_relaxed );
             uint8_t* reserved = buffer_.buffer() + buffer_.mod( back );
 
-            size_t real_size = calc_real_size( *reinterpret_cast<size_t*>( reserved ) );
-            assert( real_size < capacity() );
+            size_t real_size = calc_real_size( *reinterpret_cast<size_t*>( reserved ));
+            assert( real_size < capacity());
 
             back_.store( back + real_size, memory_model::memory_order_release );
         }
@@ -830,30 +830,30 @@ namespace cds { namespace container {
         std::pair<void*, size_t> front()
         {
             counter_type front = front_.load( memory_model::memory_order_relaxed );
-            assert( static_cast<size_t>( cback_ - front ) < capacity() );
+            assert( static_cast<size_t>( cback_ - front ) < capacity());
 
             if ( cback_ - front < sizeof( size_t )) {
                 cback_ = back_.load( memory_model::memory_order_acquire );
-                if ( cback_ - front < sizeof( size_t ) )
+                if ( cback_ - front < sizeof( size_t ))
                     return std::make_pair( nullptr, 0u );
             }
 
             uint8_t * buf = buffer_.buffer() + buffer_.mod( front );
 
             // check alignment
-            assert( ( reinterpret_cast<uintptr_t>( buf ) & ( sizeof( uintptr_t ) - 1 ) ) == 0 );
+            assert( ( reinterpret_cast<uintptr_t>( buf ) & ( sizeof( uintptr_t ) - 1 )) == 0 );
 
             size_t size = *reinterpret_cast<size_t*>( buf );
-            if ( is_tail( size ) ) {
+            if ( is_tail( size )) {
                 // unused tail, skip
-                CDS_VERIFY( pop_front() );
+                CDS_VERIFY( pop_front());
 
                 front = front_.load( memory_model::memory_order_relaxed );
                 buf = buffer_.buffer() + buffer_.mod( front );
                 size = *reinterpret_cast<size_t*>( buf );
 
-                assert( !is_tail( size ) );
-                assert( buf == buffer_.buffer() );
+                assert( !is_tail( size ));
+                assert( buf == buffer_.buffer());
             }
 
 #ifdef _DEBUG
@@ -896,18 +896,18 @@ namespace cds { namespace container {
         bool pop_front()
         {
             counter_type front = front_.load( memory_model::memory_order_relaxed );
-            assert( static_cast<size_t>( cback_ - front ) <= capacity() );
+            assert( static_cast<size_t>( cback_ - front ) <= capacity());
 
-            if ( cback_ - front < sizeof(size_t) ) {
+            if ( cback_ - front < sizeof(size_t)) {
                 cback_ = back_.load( memory_model::memory_order_acquire );
-                if ( cback_ - front < sizeof( size_t ) )
+                if ( cback_ - front < sizeof( size_t ))
                     return false;
             }
 
             uint8_t * buf = buffer_.buffer() + buffer_.mod( front );
 
             // check alignment
-            assert( ( reinterpret_cast<uintptr_t>( buf ) & ( sizeof( uintptr_t ) - 1 ) ) == 0 );
+            assert( ( reinterpret_cast<uintptr_t>( buf ) & ( sizeof( uintptr_t ) - 1 )) == 0 );
 
             size_t size = *reinterpret_cast<size_t*>( buf );
             size_t real_size = calc_real_size( untail( size ));
@@ -927,7 +927,7 @@ namespace cds { namespace container {
         /// [consumer] Clears the ring buffer
         void clear()
         {
-            for ( auto el = front(); el.first; el = front() )
+            for ( auto el = front(); el.first; el = front())
                 pop_front();
         }
 
@@ -962,7 +962,7 @@ namespace cds { namespace container {
             size_t real_size =  (( size + sizeof( uintptr_t ) - 1 ) & ~( sizeof( uintptr_t ) - 1 )) + sizeof( size_t );
 
             assert( real_size > size );
-            assert( real_size - size >= sizeof( size_t ) );
+            assert( real_size - size >= sizeof( size_t ));
 
             return real_size;
         }
@@ -979,7 +979,7 @@ namespace cds { namespace container {
 
         static size_t untail( size_t size )
         {
-            return size & (( size_t( 1 ) << ( sizeof( size_t ) * 8 - 1 ) ) - 1);
+            return size & (( size_t( 1 ) << ( sizeof( size_t ) * 8 - 1 )) - 1);
         }
         //@endcond
 
index 187c4ffb0255522147a26e4afc4a81039ff97259..047e00f8834e70b7147a0fc6c86eaddc74b6a82b 100644 (file)
@@ -46,11 +46,11 @@ namespace cds {
         throws the \p exception.
 
         If exception is disabled, \p %throw_exception() prints an exception message to
-        standard output and call \p abort(). 
+        standard output and call \p abort().
 
         You can supply your own \p %cds::throw_exception() function;
         for that you should specify \p -DCDS_USER_DEFINED_THROW_EXCEPTION
-        in compiler command line. 
+        in compiler command line.
 
         @note \p %throw_exception() never returns. If the user-defined \p %throw_exception() returns,
         the behavior is undefined.
@@ -71,7 +71,7 @@ namespace cds {
     template <typename E>
     CDS_NORETURN static inline void throw_exception( E&& exception, char const* file, int line )
     {
-        printf( "file %s, line %d: %s\n", file, line, exception.what() );
+        printf( "file %s, line %d: %s\n", file, line, exception.what());
         abort();
     }
 #endif
index be180677bfa2415014474019026bb35a33249807..3beea93281e99fd37e6cb239a1914e8a5d149d12 100644 (file)
@@ -85,7 +85,7 @@ namespace cds { namespace gc { namespace hp { namespace common {
         template <typename T>
         T* get_as() const noexcept
         {
-            return reinterpret_cast<T*>( get() );
+            return reinterpret_cast<T*>( get());
         }
 
         template <typename T>
@@ -130,7 +130,7 @@ namespace cds { namespace gc { namespace hp { namespace common {
 
         guard* operator[]( size_t idx ) const noexcept
         {
-            assert( idx < capacity() );
+            assert( idx < capacity());
             return arr_[idx];
         }
 
@@ -145,7 +145,7 @@ namespace cds { namespace gc { namespace hp { namespace common {
 
         void clear( size_t idx ) noexcept
         {
-            assert( idx < capacity() );
+            assert( idx < capacity());
             assert( arr_[idx] != nullptr );
 
             arr_[idx]->clear();
@@ -153,7 +153,7 @@ namespace cds { namespace gc { namespace hp { namespace common {
 
         guard* release( size_t idx ) noexcept
         {
-            assert( idx < capacity() );
+            assert( idx < capacity());
 
             guard* g = arr_[idx];
             arr_[idx] = nullptr;
@@ -162,7 +162,7 @@ namespace cds { namespace gc { namespace hp { namespace common {
 
         void reset( size_t idx, guard* g ) noexcept
         {
-            assert( idx < capacity() );
+            assert( idx < capacity());
             assert( arr_[idx] == nullptr );
 
             arr_[idx] = g;
index d9dbf11fee139da60bb1dba937ad9247a4d00178..5772cc9708f1e74020a943b46fe81c7e3053149a 100644 (file)
@@ -107,7 +107,7 @@ namespace cds { namespace gc {
 
         //@cond
         /// Per-thread hazard pointer storage
-        class thread_hp_storage 
+        class thread_hp_storage
         {
             friend class smr;
         public:
@@ -326,13 +326,13 @@ namespace cds { namespace gc {
             {
                 assert( current_block_ != nullptr );
                 assert( current_block_->first() <= current_cell_ );
-                assert( current_cell_ < current_block_->last() );
+                assert( current_cell_ < current_block_->last());
                 //assert( &p != current_cell_ );
 
                 *current_cell_ = p;
                 CDS_HPSTAT( ++retire_call_count_ );
 
-                if ( ++current_cell_ == current_block_->last() ) {
+                if ( ++current_cell_ == current_block_->last()) {
                     // goto next block if exists
                     if ( current_block_->next_ ) {
                         current_block_ = current_block_->next_;
@@ -349,7 +349,7 @@ namespace cds { namespace gc {
             }
 
             bool repush( retired_ptr* p ) CDS_NOEXCEPT
-            {                
+            {
                 bool ret = push( *p );
                 CDS_HPSTAT( --retire_call_count_ );
                 assert( ret );
@@ -393,7 +393,7 @@ namespace cds { namespace gc {
             {
                 assert( list_head_ != nullptr );
                 assert( current_block_ == list_tail_ );
-                assert( current_cell_ == current_block_->last() );
+                assert( current_cell_ == current_block_->last());
 
                 retired_block* block = retired_allocator::instance().alloc();
                 assert( block->next_ == nullptr );
@@ -456,10 +456,10 @@ namespace cds { namespace gc {
                     free_count =
                     scan_count =
                     help_scan_count =
-                    thread_rec_count = 
-                    hp_block_count = 
-                    retired_block_count = 
-                    hp_extend_count = 
+                    thread_rec_count =
+                    hp_block_count =
+                    retired_block_count =
+                    hp_extend_count =
                     retired_extend_count = 0;
             }
         };
@@ -517,7 +517,7 @@ namespace cds { namespace gc {
                 assert( instance_ != nullptr );
 #       else
                 if ( !instance_ )
-                    CDS_THROW_EXCEPTION( not_initialized() );
+                    CDS_THROW_EXCEPTION( not_initialized());
 #       endif
                 return *instance_;
             }
@@ -729,7 +729,7 @@ namespace cds { namespace gc {
         public:
             /// Default ctor allocates a guard (hazard pointer) from thread-private storage
             Guard() CDS_NOEXCEPT
-                : guard_( dhp::smr::tls()->hazards_.alloc() )
+                : guard_( dhp::smr::tls()->hazards_.alloc())
             {}
 
             /// Initilalizes an unlinked guard i.e. the guard contains no hazard pointer. Used for move semantics support
@@ -984,7 +984,7 @@ namespace cds { namespace gc {
             template <typename T>
             T protect( size_t nIndex, atomics::atomic<T> const& toGuard )
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
 
                 T pRet;
                 do {
@@ -1014,7 +1014,7 @@ namespace cds { namespace gc {
             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 {
@@ -1031,7 +1031,7 @@ namespace cds { namespace gc {
             template <typename T>
             T * assign( size_t nIndex, T * p )
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
 
                 guards_.set( nIndex, p );
                 dhp::smr::tls()->sync();
@@ -1072,14 +1072,14 @@ namespace cds { namespace gc {
             template <typename T>
             T * get( size_t nIndex ) const
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
                 return guards_[nIndex]->template get_as<T>();
             }
 
             /// Get native guarded pointer stored
             guarded_pointer get_native( size_t nIndex ) const
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
                 return guards_[nIndex]->get();
             }
 
@@ -1238,14 +1238,14 @@ namespace cds { namespace gc {
             value_type * operator ->() const CDS_NOEXCEPT
             {
                 assert( !empty());
-                return value_cast()( guard_->get_as<guarded_type>() );
+                return value_cast()( guard_->get_as<guarded_type>());
             }
 
             /// Returns a reference to guarded value
             value_type& operator *() CDS_NOEXCEPT
             {
                 assert( !empty());
-                return *value_cast()( guard_->get_as<guarded_type>() );
+                return *value_cast()( guard_->get_as<guarded_type>());
             }
 
             /// Returns const reference to guarded value
@@ -1384,7 +1384,7 @@ namespace cds { namespace gc {
         static void retire( T * p, void (* func)(void *))
         {
             dhp::thread_data* rec = dhp::smr::tls();
-            if ( !rec->retired_.push( dhp::retired_ptr( p, func ) ) )
+            if ( !rec->retired_.push( dhp::retired_ptr( p, func )) )
                 dhp::smr::instance().scan( rec );
         }
 
@@ -1456,7 +1456,7 @@ namespace cds { namespace gc {
         */
         static void scan()
         {
-            dhp::smr::instance().scan( dhp::smr::tls() );
+            dhp::smr::instance().scan( dhp::smr::tls());
         }
 
         /// Synonym for \p scan()
index ba57dca6fef2a189b1df71a5d3739bda4ca9521e..75e8953a20c396a5d51872c041a4f5cc3c4ddadd 100644 (file)
@@ -153,7 +153,7 @@ namespace cds { namespace gc {
 #       ifdef CDS_DISABLE_SMR_EXCEPTION
                 assert( !full());
 #       else
-                if ( full() )
+                if ( full())
                     CDS_THROW_EXCEPTION( not_enought_hazard_ptr());
 #       endif
                 guard* g = free_head_;
@@ -164,7 +164,7 @@ namespace cds { namespace gc {
 
             void free( guard* g ) CDS_NOEXCEPT
             {
-                assert( g >= array_ && g < array_ + capacity() );
+                assert( g >= array_ && g < array_ + capacity());
 
                 if ( g ) {
                     g->clear();
@@ -220,7 +220,7 @@ namespace cds { namespace gc {
 
             guard& operator[]( size_t idx )
             {
-                assert( idx < capacity() );
+                assert( idx < capacity());
 
                 return array_[idx];
             }
@@ -393,8 +393,8 @@ namespace cds { namespace gc {
 
         /// \p smr::scan() strategy
         enum scan_type {
-            classic,    ///< classic scan as described in Michael's works (see smr::classic_scan() )
-            inplace     ///< inplace scan without allocation (see smr::inplace_scan() )
+            classic,    ///< classic scan as described in Michael's works (see smr::classic_scan())
+            inplace     ///< inplace scan without allocation (see smr::inplace_scan())
         };
 
         //@cond
@@ -521,7 +521,7 @@ namespace cds { namespace gc {
 #       ifdef CDS_DISABLE_SMR_EXCEPTION
                     assert( false );    // not enough hazard ptr
 #       else
-                    CDS_THROW_EXCEPTION( not_enought_hazard_ptr() );
+                    CDS_THROW_EXCEPTION( not_enought_hazard_ptr());
 #       endif
                 }
             }
@@ -698,7 +698,7 @@ namespace cds { namespace gc {
                 @warning Can throw \p too_many_hazard_ptr_exception if internal hazard pointer objects are exhausted.
             */
             Guard()
-                : guard_( hp::smr::tls()->hazards_.alloc() )
+                : guard_( hp::smr::tls()->hazards_.alloc())
             {}
 
             /// Initilalizes an unlinked guard i.e. the guard contains no hazard pointer. Used for move semantics support
@@ -1006,7 +1006,7 @@ namespace cds { namespace gc {
             template <typename T>
             T * assign( size_t nIndex, T * p )
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
 
                 guards_.set( nIndex, p );
                 hp::smr::tls()->sync();
@@ -1046,7 +1046,7 @@ namespace cds { namespace gc {
             template <typename T>
             T * get( size_t nIndex ) const
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
                 return guards_[nIndex]->template get_as<T>();
             }
 
index 60b00a629dd133f2156a348c17a7c592dca0bc1e..5cf7bcfd4de418687a12a8935fbd761aa5959f96 100644 (file)
@@ -650,7 +650,7 @@ namespace cds { namespace intrusive {
 
             bool expand_slot( traverse_data& pos, node_ptr current)
             {
-                assert( !pos.splitter.eos() );
+                assert( !pos.splitter.eos());
                 return expand_slot( pos.pArr, pos.nSlot, current, pos.splitter.bit_offset());
             }
 
@@ -671,7 +671,7 @@ namespace cds { namespace intrusive {
                     return false;
                 }
 
-                typename hash_splitter::uint_type idx = hash_splitter( hash_accessor()(*current.ptr()), nOffset ).cut( 
+                typename hash_splitter::uint_type idx = hash_splitter( hash_accessor()(*current.ptr()), nOffset ).cut(
                     static_cast<unsigned>( m_Metrics.array_node_size_log ));
                 pArr->nodes[idx].store(current, memory_model::memory_order_release);
 
index e2f4d52d84553705429483552f38a7cc7d05153c..89371d539a41c3e69fe5bbec461c58d8c8daa217 100644 (file)
@@ -276,7 +276,7 @@ namespace cds { namespace intrusive {
                 \p c_nUpperBound must be no more than 32.
             - <tt>random_generator()</tt> - the constructor of generator object initialises the generator instance (its internal state).
             - <tt>unsigned int operator()()</tt> - the main generating function. Returns random level from range <tt>[0 .. c_nUpperBound - 1]</tt>
-               
+
 
             Stateful generators are supported.
 
@@ -684,7 +684,7 @@ namespace cds { namespace intrusive {
             - \p opt::memory_model - C++ memory ordering model. Can be \p opt::v::relaxed_ordering (relaxed memory model, the default)
                 or \p opt::v::sequential_consistent (sequentially consisnent memory model).
             - \p skip_list::random_level_generator - random level generator. Can be \p skip_list::xor_shift,
-                \p skip_list::turbo32 (the default) or user-provided one. 
+                \p skip_list::turbo32 (the default) or user-provided one.
                 See \p skip_list::random_level_generator option description for explanation.
             - \p opt::allocator - although the skip-list is an intrusive container,
                 an allocator should be provided to maintain variable randomly-calculated height of the node
index ce7c299ef57b9cbba1777676a9ee03cc1ee9f8fe..8f2f0ed3a0bfaabcda602ccf5cb0f6c2556b9cf2 100644 (file)
@@ -492,8 +492,8 @@ namespace cds { namespace intrusive {
                 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() ) {
-                        CDS_TSAN_ANNOTATE_NEW_MEMORY( &m_auxNode[idx], sizeof( aux_node_type ) );
+                    if ( idx < capacity()) {
+                        CDS_TSAN_ANNOTATE_NEW_MEMORY( &m_auxNode[idx], sizeof( aux_node_type ));
                         return new( &m_auxNode[idx] ) aux_node_type();
                     }
                 }
@@ -710,7 +710,7 @@ namespace cds { namespace intrusive {
                     if ( aux_segment->aux_node_count.load( memory_model::memory_order_acquire ) < m_metrics.nSegmentSize ) {
                         size_t idx = aux_segment->aux_node_count.fetch_add( 1, memory_model::memory_order_relaxed );
                         if ( idx < m_metrics.nSegmentSize ) {
-                            CDS_TSAN_ANNOTATE_NEW_MEMORY( aux_segment->segment() + idx, sizeof( aux_node_type ) );
+                            CDS_TSAN_ANNOTATE_NEW_MEMORY( aux_segment->segment() + idx, sizeof( aux_node_type ));
                             return new( aux_segment->segment() + idx ) aux_node_type();
                         }
                     }
@@ -727,9 +727,9 @@ namespace cds { namespace intrusive {
                     new_aux_segment->next_segment = 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_release, atomics::memory_order_acquire ) ) {
-                        CDS_TSAN_ANNOTATE_NEW_MEMORY( new_aux_segment->segment(), sizeof( aux_node_type ) );
-                        return new( new_aux_segment->segment() ) aux_node_type();
+                    if ( m_auxNodeList.compare_exchange_strong( aux_segment, new_aux_segment, memory_model::memory_order_release, atomics::memory_order_acquire )) {
+                        CDS_TSAN_ANNOTATE_NEW_MEMORY( new_aux_segment->segment(), sizeof( aux_node_type ));
+                        return new( new_aux_segment->segment()) aux_node_type();
                     }
 
                     free_aux_segment( new_aux_segment );
@@ -810,7 +810,7 @@ namespace cds { namespace intrusive {
             aux_node_segment* allocate_aux_segment()
             {
                 char* p = raw_allocator().allocate( sizeof( aux_node_segment ) + sizeof( aux_node_type ) * m_metrics.nSegmentSize );
-                CDS_TSAN_ANNOTATE_NEW_MEMORY( p, sizeof( aux_node_segment ) );
+                CDS_TSAN_ANNOTATE_NEW_MEMORY( p, sizeof( aux_node_segment ));
                 return new(p) aux_node_segment();
             }
 
index 97ffde6c2b4449b67f9e09be00ae69934bdfe8e1..2919d96147698dbb12afa28ea8fd1076f3dba780 100644 (file)
@@ -599,7 +599,7 @@ namespace cds { namespace intrusive {
         }
         static void free_update_desc_void( void* pDesc )
         {
-            free_update_desc( reinterpret_cast<update_desc*>( pDesc ) );
+            free_update_desc( reinterpret_cast<update_desc*>( pDesc ));
         }
 
         class retired_list
index 68f4c66e205fbd0a44571020df49099d738e860b..95f1888af8dfe34583e7114df9929a59859ff9c3 100644 (file)
@@ -640,7 +640,7 @@ namespace cds { namespace intrusive {
                         return false;
                     }
 
-                    if ( !pos.splitter.eos() ) {
+                    if ( !pos.splitter.eos()) {
                         // the slot must be expanded
                         base_class::expand_slot( pos, slot );
                     }
@@ -1219,7 +1219,7 @@ namespace cds { namespace intrusive {
                     }
 
                     if ( bInsert ) {
-                        if ( !pos.splitter.eos() ) {
+                        if ( !pos.splitter.eos()) {
                             // the slot must be expanded
                             base_class::expand_slot( pos, slot );
                         }
index f9f5b2a399376f5f2b72c37614300cd5cf58946c..baa1bcbd9c2e58ae5868b8eac6ee7db4a84fabfe 100644 (file)
@@ -597,12 +597,12 @@ namespace cds { namespace intrusive {
         */
         bool erase_at( iterator const& iter )
         {
-            assert( iter != end() );
+            assert( iter != end());
 
-            marked_data_ptr val( iter.data() );
-            if ( iter.m_pNode->data.compare_exchange_strong( val, marked_data_ptr(), memory_model::memory_order_acquire, atomics::memory_order_relaxed ) ) {
+            marked_data_ptr val( iter.data());
+            if ( iter.m_pNode->data.compare_exchange_strong( val, marked_data_ptr(), memory_model::memory_order_acquire, atomics::memory_order_relaxed )) {
                 --m_ItemCounter;
-                retire_data( val.ptr() );
+                retire_data( val.ptr());
                 m_Stat.onEraseSuccess();
                 return true;
             }
index c1daccfc60febc808ab44da0d6613f7168b437b8..fe2c2f95666bbf2f0f7df95c3b11da74ea7016a2 100644 (file)
@@ -640,7 +640,7 @@ namespace cds { namespace intrusive {
         erase_at( Iterator const& iter )
 #endif
         {
-            assert( iter != end() );
+            assert( iter != end());
             assert( iter.bucket() != nullptr );
 
             if ( iter.bucket()->erase_at( iter.underlying_iterator())) {
index 1eadcfe3210c01da41e902b17683f7bdc4e88cb9..691a089d4d059d64bd21b1214c533355c0dfedf7 100644 (file)
@@ -862,7 +862,7 @@ namespace cds { namespace intrusive {
         erase_at( Iterator const& iter )
 #endif
         {
-            assert( iter != end() );
+            assert( iter != end());
 
             if ( m_List.erase_at( iter.underlying_iterator())) {
                 --m_ItemCounter;
@@ -1170,7 +1170,7 @@ namespace cds { namespace intrusive {
                 p->m_nHash = nHash;
                 CDS_TSAN_ANNOTATE_IGNORE_WRITES_END;
 #       ifdef CDS_DEBUG
-                cds_assert( !p->m_busy.load( atomics::memory_order_acquire ) );
+                cds_assert( !p->m_busy.load( atomics::memory_order_acquire ));
                 p->m_busy.store( true, atomics::memory_order_release );
 #       endif
             }
@@ -1180,7 +1180,7 @@ namespace cds { namespace intrusive {
         void free_aux_node( aux_node_type * p )
         {
 #       ifdef CDS_DEBUG
-            cds_assert( p->m_busy.load( atomics::memory_order_acquire ) );
+            cds_assert( p->m_busy.load( atomics::memory_order_acquire ));
             p->m_busy.store( false, atomics::memory_order_release );
 #       endif
 
index 00ab867438ba46beeb16ae9f63b116048243508f..30d41fcd985385470f49344948f33d11483501dd 100644 (file)
@@ -425,7 +425,7 @@ namespace cds { namespace intrusive {
 
             scoped_resize_lock al( m_MutexPolicy );
             if ( al.success()) {
-                if ( nOldCapacity != bucket_count( atomics::memory_order_acquire ) ) {
+                if ( nOldCapacity != bucket_count( atomics::memory_order_acquire )) {
                     // someone resized already
                     return;
                 }
@@ -443,7 +443,7 @@ namespace cds { namespace intrusive {
             , m_nBucketMask( c_nMinimalCapacity - 1 )
             , m_MutexPolicy( c_nMinimalCapacity )
         {
-            alloc_bucket_table( bucket_count() );
+            alloc_bucket_table( bucket_count());
         }
 
         /// Ctor with initial capacity specified
@@ -452,9 +452,9 @@ namespace cds { namespace intrusive {
         )
             : m_Buckets( nullptr )
             , m_nBucketMask( calc_init_capacity(nCapacity) - 1 )
-            , m_MutexPolicy( bucket_count() )
+            , m_MutexPolicy( bucket_count())
         {
-            alloc_bucket_table( bucket_count() );
+            alloc_bucket_table( bucket_count());
         }
 
         /// Ctor with resizing policy (copy semantics)
@@ -467,10 +467,10 @@ namespace cds { namespace intrusive {
         )
         : m_Buckets( nullptr )
         , m_nBucketMask( ( nCapacity ? calc_init_capacity(nCapacity) : c_nMinimalCapacity ) - 1 )
-        , m_MutexPolicy( bucket_count() )
+        , m_MutexPolicy( bucket_count())
         , m_ResizingPolicy( resizingPolicy )
         {
-            alloc_bucket_table( bucket_count() );
+            alloc_bucket_table( bucket_count());
         }
 
         /// Ctor with resizing policy (move semantics)
@@ -484,16 +484,16 @@ namespace cds { namespace intrusive {
         )
         : m_Buckets( nullptr )
         , m_nBucketMask( ( nCapacity ? calc_init_capacity(nCapacity) : c_nMinimalCapacity ) - 1 )
-        , m_MutexPolicy( bucket_count() )
+        , m_MutexPolicy( bucket_count())
         , m_ResizingPolicy( std::forward<resizing_policy>( resizingPolicy ))
         {
-            alloc_bucket_table( bucket_count() );
+            alloc_bucket_table( bucket_count());
         }
 
         /// Destructor destroys internal data
         ~StripedSet()
         {
-            free_bucket_table( m_Buckets, bucket_count() );
+            free_bucket_table( m_Buckets, bucket_count());
         }
 
     public:
index 8f9ce5d5cfa3d9348bec04e34776d98274270a06..432a7f02d9aeaeeabb68547c65788dd9e5943ff2 100644 (file)
@@ -511,7 +511,7 @@ namespace cds { namespace memory {
                 }
 
                 // The pool is empty
-                CDS_THROW_EXCEPTION( std::bad_alloc() );
+                CDS_THROW_EXCEPTION( std::bad_alloc());
             }
 
         ok:
index 1dd06d76f842587bb0562c632f1a8ff2dfd7e2fb..0be7b7226384bbabf01a22b4ffb93afb66c262b3 100644 (file)
@@ -178,7 +178,7 @@ namespace cds {
                 assert( cds::beans::is_power2( nAlign ));
                 pointer p = reinterpret_cast<T *>( cds::OS::aligned_malloc( sizeof(T) * nCount, nAlign ));
                 if ( !p )
-                    CDS_THROW_EXCEPTION( std::bad_alloc() );
+                    CDS_THROW_EXCEPTION( std::bad_alloc());
                 assert( cds::details::is_aligned( p, nAlign ));
                 return p;
             }
index f42d5eb4b8246537f34c2b95574c003c13510b76..f3a915840bcfc3dfe8b5940ce72aa38a82e346be 100644 (file)
@@ -371,7 +371,7 @@ namespace cds {
             /// Unlock the spin-lock
             void unlock() CDS_NOEXCEPT
             {
-                assert( is_taken( OS::get_current_thread_id() ));
+                assert( is_taken( OS::get_current_thread_id()));
 
                 integral_type n = m_spin.load( atomics::memory_order_relaxed );
                 if ( n > 1 )
@@ -386,7 +386,7 @@ namespace cds {
             /// Change the owner of locked spin-lock. May be called by thread that owns spin-lock
             void change_owner( OS::ThreadId newOwnerId ) CDS_NOEXCEPT
             {
-                assert( is_taken( OS::get_current_thread_id() ));
+                assert( is_taken( OS::get_current_thread_id()));
                 assert( newOwnerId != OS::c_NullThreadId );
 
                 m_OwnerId = newOwnerId;
index a00dda898644cb68833fd615bade746bf138046b..be5f5d1977a7cf075c437a0f21b3e37aced303d2 100644 (file)
@@ -78,14 +78,14 @@ namespace cds { namespace threading {
                 static void init()
                 {
                     pthread_error_code  nErr;
-                    if ( ( nErr = pthread_key_create( &m_key, key_destructor ) ) != 0 )
+                    if ( ( nErr = pthread_key_create( &m_key, key_destructor )) != 0 )
                         CDS_THROW_EXCEPTION( pthread_exception( nErr, "pthread_key_create" ));
                 }
 
                 static void fini()
                 {
                     pthread_error_code  nErr;
-                    if ( ( nErr = pthread_key_delete( m_key ) ) != 0 )
+                    if ( ( nErr = pthread_key_delete( m_key )) != 0 )
                         CDS_THROW_EXCEPTION( pthread_exception( nErr, "pthread_key_delete" ));
                 }
 
@@ -98,7 +98,7 @@ namespace cds { namespace threading {
                 {
                     pthread_error_code  nErr;
                     ThreadData * pData = new ThreadData;
-                    if ( ( nErr = pthread_setspecific( m_key, pData ) ) != 0 )
+                    if ( ( nErr = pthread_setspecific( m_key, pData )) != 0 )
                         CDS_THROW_EXCEPTION( pthread_exception( nErr, "pthread_setspecific" ));
                 }
                 static void free()
@@ -205,7 +205,7 @@ namespace cds { namespace threading {
                 assert( pData );
 
                 if ( pData ) {
-                    if ( pData->fini() )
+                    if ( pData->fini())
                         _threadData( do_detachThread );
                 }
                 else
index d41d1b860061f46f0be641b727f06fefdaa088f2..a7d6e9da2c1d31867fe67895b60fa9284c7593e9 100644 (file)
@@ -78,7 +78,7 @@ namespace cds { namespace threading {
                 static void init()
                 {
                     if ( m_key == TLS_OUT_OF_INDEXES ) {
-                        if ( ( m_key = ::TlsAlloc() ) == TLS_OUT_OF_INDEXES )
+                        if ( ( m_key = ::TlsAlloc()) == TLS_OUT_OF_INDEXES )
                             CDS_THROW_EXCEPTION( api_exception( ::GetLastError(), "TlsAlloc" ));
                     }
                 }
@@ -96,7 +96,7 @@ namespace cds { namespace threading {
                 {
                     api_error_code  nErr;
                     void * pData = ::TlsGetValue( m_key );
-                    if ( pData == nullptr && ( nErr = ::GetLastError() ) != ERROR_SUCCESS )
+                    if ( pData == nullptr && ( nErr = ::GetLastError()) != ERROR_SUCCESS )
                         CDS_THROW_EXCEPTION( api_exception( nErr, "TlsGetValue" ));
                     return reinterpret_cast<ThreadData *>( pData );
                 }
index fa8cf8a6d95c337dc63f4e9d19fa78c8bc44b752..b8173c4c1c65590dc1fc45c3048ecd75490fb777 100644 (file)
@@ -88,7 +88,7 @@ namespace cds { namespace urcu { namespace details {
         assert( (tmp & rcu_class::c_nNestMask) > 0 );
 
 #if CDS_COMPILER == CDS_COMPILER_CLANG && CDS_COMPILER_VERSION < 30800
-        // CLang 3.6-3.7: some tests of intrusive::FeldmanHashSet based on general-purpose RCU 
+        // CLang 3.6-3.7: some tests of intrusive::FeldmanHashSet based on general-purpose RCU
         // are failed even in single-threaded mode (unit tests) without magic compiler barrier below
         CDS_COMPILER_RW_BARRIER;
 #endif
index ac8ec62f56f3de94fb91a51fde63b31bae7c2527..27014fc84b2946d31a6eb511a09937f36d240c9f 100644 (file)
@@ -99,7 +99,7 @@ namespace cds { namespace gc { namespace dhp {
         else {
             // allocate new block
             gb = new( s_alloc_memory( sizeof( guard_block ) + sizeof( guard ) * defaults::c_extended_guard_block_size )) guard_block;
-            new ( gb->first() ) guard[defaults::c_extended_guard_block_size];
+            new ( gb->first()) guard[defaults::c_extended_guard_block_size];
 
             CDS_HPSTAT( block_allocated_.fetch_add( 1, atomics::memory_order_relaxed ));
         }
@@ -118,7 +118,7 @@ namespace cds { namespace gc { namespace dhp {
 
     CDS_EXPORT_API retired_allocator::~retired_allocator()
     {
-        while ( retired_block* rb = static_cast<retired_block*>( free_list_.get() ) ) {
+        while ( retired_block* rb = static_cast<retired_block*>( free_list_.get()) ) {
             rb->~retired_block();
             s_free_memory( rb );
         }
@@ -134,7 +134,7 @@ namespace cds { namespace gc { namespace dhp {
             // allocate new block
             rb = new( s_alloc_memory( sizeof( retired_block ) + sizeof( retired_ptr ) * retired_block::c_capacity )) retired_block;
             new ( rb->first()) retired_ptr[retired_block::c_capacity];
-            CDS_HPSTAT( block_allocated_.fetch_add( 1, atomics::memory_order_relaxed ) );
+            CDS_HPSTAT( block_allocated_.fetch_add( 1, atomics::memory_order_relaxed ));
         }
 
         rb->next_ = nullptr;
@@ -204,7 +204,7 @@ namespace cds { namespace gc { namespace dhp {
         CDS_DEBUG_ONLY( const cds::OS::ThreadId nullThreadId = cds::OS::c_NullThreadId; )
         CDS_DEBUG_ONLY( const cds::OS::ThreadId mainThreadId = cds::OS::get_current_thread_id(); )
 
-        CDS_HPSTAT( statistics( s_postmortem_stat ) );
+        CDS_HPSTAT( statistics( s_postmortem_stat ));
 
         thread_record* pHead = thread_list_.load( atomics::memory_order_relaxed );
         thread_list_.store( nullptr, atomics::memory_order_release );
@@ -250,7 +250,7 @@ namespace cds { namespace gc { namespace dhp {
         thread_data* rec = tls_;
         if ( rec ) {
             tls_ = nullptr;
-            instance().free_thread_data( static_cast<thread_record*>( rec ) );
+            instance().free_thread_data( static_cast<thread_record*>( rec ));
         }
     }
 
@@ -289,7 +289,7 @@ namespace cds { namespace gc { namespace dhp {
 
         char* mem = reinterpret_cast<char*>( s_alloc_memory( sizeof( thread_record ) + guard_array_size ));
         return new( mem ) thread_record(
-            reinterpret_cast<guard*>( mem + sizeof( thread_record ) ), initial_hazard_count_
+            reinterpret_cast<guard*>( mem + sizeof( thread_record )), initial_hazard_count_
         );
     }
 
@@ -307,14 +307,14 @@ namespace cds { namespace gc { namespace dhp {
         const cds::OS::ThreadId curThreadId = cds::OS::get_current_thread_id();
 
         // First try to reuse a free (non-active) DHP record
-        for ( hprec = thread_list_.load( atomics::memory_order_acquire ); hprec; hprec = hprec->m_pNextNode.load( atomics::memory_order_acquire ) ) {
+        for ( hprec = thread_list_.load( atomics::memory_order_acquire ); hprec; hprec = hprec->m_pNextNode.load( atomics::memory_order_acquire )) {
             cds::OS::ThreadId thId = nullThreadId;
-            if ( !hprec->m_idOwner.compare_exchange_strong( thId, curThreadId, atomics::memory_order_relaxed, atomics::memory_order_relaxed ) )
+            if ( !hprec->m_idOwner.compare_exchange_strong( thId, curThreadId, atomics::memory_order_relaxed, atomics::memory_order_relaxed ))
                 continue;
             hprec->m_bFree.store( false, atomics::memory_order_release );
             break;
         }
-        
+
         if ( !hprec ) {
             // No HP records available for reuse
             // Allocate and push a new HP record
@@ -324,7 +324,7 @@ namespace cds { namespace gc { namespace dhp {
             thread_record* pOldHead = thread_list_.load( atomics::memory_order_acquire );
             do {
                 hprec->m_pNextNode.store( pOldHead, atomics::memory_order_release );
-            } while ( !thread_list_.compare_exchange_weak( pOldHead, hprec, atomics::memory_order_release, atomics::memory_order_acquire ) );
+            } while ( !thread_list_.compare_exchange_weak( pOldHead, hprec, atomics::memory_order_release, atomics::memory_order_acquire ));
         }
 
         hprec->hazards_.init();
@@ -342,7 +342,7 @@ namespace cds { namespace gc { namespace dhp {
         scan( pRec );
         help_scan( pRec );
 
-        if ( pRec->retired_.empty() ) {
+        if ( pRec->retired_.empty()) {
             pRec->retired_.fini();
             pRec->m_bFree.store( true, std::memory_order_release );
         }
@@ -411,9 +411,9 @@ namespace cds { namespace gc { namespace dhp {
             if ( pNode->m_idOwner.load( std::memory_order_relaxed ) != cds::OS::c_NullThreadId ) {
                 copy_hazards( plist, pNode->hazards_.array_, pNode->hazards_.initial_capacity_ );
 
-                for ( guard_block* block = pNode->hazards_.extended_list_.load( atomics::memory_order_acquire ); 
+                for ( guard_block* block = pNode->hazards_.extended_list_.load( atomics::memory_order_acquire );
                     block;
-                    block = block->next_block_.load( atomics::memory_order_acquire ) )
+                    block = block->next_block_.load( atomics::memory_order_acquire ))
                 {
                     copy_hazards( plist, block->first(), defaults::c_extended_guard_block_size );
                 }
@@ -427,7 +427,7 @@ namespace cds { namespace gc { namespace dhp {
             last_plist_size_.compare_exchange_weak( plist_size, plist.size(), std::memory_order_relaxed, std::memory_order_relaxed );
 
         // Sort plist to simplify search in
-        std::sort( plist.begin(), plist.end() );
+        std::sort( plist.begin(), plist.end());
 
         // Stage 2: Search plist
         size_t free_count = 0;
@@ -451,26 +451,26 @@ namespace cds { namespace gc { namespace dhp {
         CDS_HPSTAT( pRec->free_call_count_ += free_count );
 
         // If the count of freed elements is too small, increase retired array
-        if ( free_count < retired_count / 4 && last_block == pRec->retired_.list_tail_ && last_block_cell == last_block->last() )
+        if ( free_count < retired_count / 4 && last_block == pRec->retired_.list_tail_ && last_block_cell == last_block->last())
             pRec->retired_.extend();
     }
 
     CDS_EXPORT_API void smr::help_scan( thread_data* pThis )
     {
-        assert( static_cast<thread_record*>( pThis )->m_idOwner.load( atomics::memory_order_relaxed ) == cds::OS::get_current_thread_id() );
+        assert( static_cast<thread_record*>( pThis )->m_idOwner.load( atomics::memory_order_relaxed ) == cds::OS::get_current_thread_id());
         CDS_HPSTAT( ++pThis->help_scan_call_count_ );
 
         const cds::OS::ThreadId nullThreadId = cds::OS::c_NullThreadId;
         const cds::OS::ThreadId curThreadId = cds::OS::get_current_thread_id();
-        for ( thread_record* hprec = thread_list_.load( atomics::memory_order_acquire ); hprec; hprec = hprec->m_pNextNode.load( atomics::memory_order_relaxed ) )
+        for ( thread_record* hprec = thread_list_.load( atomics::memory_order_acquire ); hprec; hprec = hprec->m_pNextNode.load( atomics::memory_order_relaxed ))
         {
             if ( hprec == static_cast<thread_record*>( pThis ))
                 continue;
 
             // If m_bFree == true then hprec->retired_ 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 )) {
                 CDS_TSAN_ANNOTATE_IGNORE_READS_BEGIN;
-                assert( hprec->retired_.empty() );
+                assert( hprec->retired_.empty());
                 CDS_TSAN_ANNOTATE_IGNORE_READS_END;
                 continue;
             }
@@ -480,7 +480,7 @@ namespace cds { namespace gc { namespace dhp {
             {
                 cds::OS::ThreadId curOwner = hprec->m_idOwner.load( atomics::memory_order_relaxed );
                 if ( curOwner == nullThreadId ) {
-                    if ( !hprec->m_idOwner.compare_exchange_strong( curOwner, curThreadId, atomics::memory_order_acquire, atomics::memory_order_relaxed ) )
+                    if ( !hprec->m_idOwner.compare_exchange_strong( curOwner, curThreadId, atomics::memory_order_acquire, atomics::memory_order_relaxed ))
                         continue;
                 }
                 else
@@ -495,7 +495,7 @@ namespace cds { namespace gc { namespace dhp {
             for ( retired_block* block = src.list_head_; block; block = block->next_ ) {
                 retired_ptr* last = block == src.current_block_ ? src.current_cell_ : block->last();
                 for ( retired_ptr* p = block->first(); p != last; ++p ) {
-                    if ( !dest.push( *p ) )
+                    if ( !dest.push( *p ))
                         scan( pThis );
                 }
 
@@ -515,7 +515,7 @@ namespace cds { namespace gc { namespace dhp {
     {
         st.clear();
 #   ifdef CDS_ENABLE_HPSTAT
-        for ( thread_record* hprec = thread_list_.load( atomics::memory_order_acquire ); hprec; hprec = hprec->m_pNextNode.load( atomics::memory_order_relaxed ) )
+        for ( thread_record* hprec = thread_list_.load( atomics::memory_order_acquire ); hprec; hprec = hprec->m_pNextNode.load( atomics::memory_order_relaxed ))
         {
             CDS_TSAN_ANNOTATE_IGNORE_READS_BEGIN;
             ++st.thread_rec_count;
index 616ea59bcda1ebe876e31c601d64d9331b803b54..44ec31b3e140a66daa67f5e15c3020aa8878f157 100644 (file)
@@ -63,12 +63,12 @@ namespace cds { namespace gc { namespace hp {
 
             static T* allocate( size_t nCount )
             {
-                return reinterpret_cast<T*>( s_alloc_memory( sizeof( value_type ) * nCount ) );
+                return reinterpret_cast<T*>( s_alloc_memory( sizeof( value_type ) * nCount ));
             }
 
             static void deallocate( T* p, size_t /*nCount*/ )
             {
-                s_free_memory( reinterpret_cast<void*>( p ) );
+                s_free_memory( reinterpret_cast<void*>( p ));
             }
         };
 
@@ -156,7 +156,7 @@ namespace cds { namespace gc { namespace hp {
         CDS_DEBUG_ONLY( const cds::OS::ThreadId nullThreadId = cds::OS::c_NullThreadId; )
         CDS_DEBUG_ONLY( const cds::OS::ThreadId mainThreadId = cds::OS::get_current_thread_id();)
 
-        CDS_HPSTAT( statistics( s_postmortem_stat ) );
+        CDS_HPSTAT( statistics( s_postmortem_stat ));
 
         thread_record* pHead = thread_list_.load( atomics::memory_order_relaxed );
         thread_list_.store( nullptr, atomics::memory_order_release );
@@ -250,7 +250,7 @@ namespace cds { namespace gc { namespace hp {
         thread_record* pOldHead = thread_list_.load( atomics::memory_order_relaxed );
         do {
             hprec->m_pNextNode.store( pOldHead, atomics::memory_order_release );
-        } while ( !thread_list_.compare_exchange_weak( pOldHead, hprec, atomics::memory_order_release, atomics::memory_order_acquire ) );
+        } while ( !thread_list_.compare_exchange_weak( pOldHead, hprec, atomics::memory_order_release, atomics::memory_order_acquire ));
 
         return hprec;
     }
@@ -410,7 +410,7 @@ namespace cds { namespace gc { namespace hp {
         }
 
         // Sort plist to simplify search in
-        std::sort( plist.begin(), plist.end() );
+        std::sort( plist.begin(), plist.end());
 
         // Stage 2: Search plist
         retired_array& retired = pRec->retired_;
@@ -423,7 +423,7 @@ namespace cds { namespace gc { namespace hp {
             auto itEnd = plist.end();
             retired_ptr* insert_pos = first_retired;
             for ( retired_ptr* it = first_retired; it != last_retired; ++it ) {
-                if ( std::binary_search( itBegin, itEnd, first_retired->m_p ) ) {
+                if ( std::binary_search( itBegin, itEnd, first_retired->m_p )) {
                     if ( insert_pos != it )
                         *insert_pos = *it;
                     ++insert_pos;
@@ -440,7 +440,7 @@ namespace cds { namespace gc { namespace hp {
 
     CDS_EXPORT_API void smr::help_scan( thread_data* pThis )
     {
-        assert( static_cast<thread_record*>( pThis )->m_idOwner.load( atomics::memory_order_relaxed ) == cds::OS::get_current_thread_id() );
+        assert( static_cast<thread_record*>( pThis )->m_idOwner.load( atomics::memory_order_relaxed ) == cds::OS::get_current_thread_id());
 
         CDS_HPSTAT( ++pThis->help_scan_count_ );
 
@@ -460,7 +460,7 @@ namespace cds { namespace gc { namespace hp {
             {
                 cds::OS::ThreadId curOwner = hprec->m_idOwner.load( atomics::memory_order_relaxed );
                 if ( curOwner == nullThreadId ) {
-                    if ( !hprec->m_idOwner.compare_exchange_strong( curOwner, curThreadId, atomics::memory_order_acquire, atomics::memory_order_relaxed ) )
+                    if ( !hprec->m_idOwner.compare_exchange_strong( curOwner, curThreadId, atomics::memory_order_acquire, atomics::memory_order_relaxed ))
                         continue;
                 }
                 else
@@ -471,7 +471,7 @@ namespace cds { namespace gc { namespace hp {
             // If it has ones then we move them to pThis that is private for current thread.
             retired_array& src = hprec->retired_;
             retired_array& dest = pThis->retired_;
-            assert( !dest.full() );
+            assert( !dest.full());
 
             retired_ptr* src_first = src.first();
             retired_ptr* src_last = src.last();
@@ -493,7 +493,7 @@ namespace cds { namespace gc { namespace hp {
     {
         st.clear();
 #   ifdef CDS_ENABLE_HPSTAT
-        for ( thread_record* hprec = thread_list_.load( atomics::memory_order_acquire ); hprec; hprec = hprec->m_pNextNode.load( atomics::memory_order_relaxed ) )
+        for ( thread_record* hprec = thread_list_.load( atomics::memory_order_acquire ); hprec; hprec = hprec->m_pNextNode.load( atomics::memory_order_relaxed ))
         {
             CDS_TSAN_ANNOTATE_IGNORE_READS_BEGIN;
             ++st.thread_rec_count;
index 2824f2c5103642d0e128db3d3bb5fb5a7e5f546f..5af071401e30ccbe15f86229f79e21b909010a8e 100644 (file)
@@ -40,19 +40,19 @@ namespace cds { namespace threading {
     CDS_EXPORT_API void ThreadData::init()
     {
         if ( m_nAttachCount++ == 0 ) {
-            if ( cds::gc::HP::isUsed() )
+            if ( cds::gc::HP::isUsed())
                 cds::gc::hp::smr::attach_thread();
-            if ( cds::gc::DHP::isUsed() )
+            if ( cds::gc::DHP::isUsed())
                 cds::gc::dhp::smr::attach_thread();
 
-            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();
 #endif
         }
@@ -61,25 +61,25 @@ namespace cds { namespace threading {
     CDS_EXPORT_API bool ThreadData::fini()
     {
         if ( --m_nAttachCount == 0 ) {
-            if ( cds::gc::DHP::isUsed() )
+            if ( cds::gc::DHP::isUsed())
                 cds::gc::dhp::smr::detach_thread();
-            if ( cds::gc::HP::isUsed() )
+            if ( cds::gc::HP::isUsed())
                 cds::gc::hp::smr::detach_thread();
 
-            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;
             }
index 14628f922b66f08a4891a0f4348bce5ef13bd1ab..5def35c74e35715de44bfe725b7b1254f9ebd98e 100644 (file)
@@ -42,4 +42,4 @@
 #define bswap_64(value) (((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) << 32) | (uint64_t)bswap_32((uint32_t)((value) >> 32)))
 
 #endif
-#endif // CDSTEST_BYTESWAP_H
\ No newline at end of file
+#endif // CDSTEST_BYTESWAP_H
index 4159bd7f45bcb8dd980adfc61fda21548b59df53..6c8baf0ee68bbd121a54ec3980c6b514a9a45572 100644 (file)
@@ -24,11 +24,11 @@ namespace fc_test {
         template <typename C, void (C::*) (size_t)> class selector
         {};
 
-        template <typename C> static select_small test( selector<C, &C::set_array>* ) ;
+        template <typename C> static select_small test( selector<C, &C::set_array>* );
         template <typename C> static select_big   test(...);
 
     public:
-        static constexpr bool value = sizeof(test<T>(0)) == sizeof(char) ;
+        static constexpr bool value = sizeof(test<T>(0)) == sizeof(char);
     };
 
     template<int DefaultSize = 10>
@@ -58,7 +58,7 @@ namespace fc_test {
                 pop_buff[i] = static_cast<int>( std::sqrt( std::abs( static_cast<double>( pop_buff[i] ) * rand())));
         }
 
-        void set_array(size_t new_size) 
+        void set_array(size_t new_size)
         {
             set_array_size(new_size);
         }
index ee8bcf9db370a143edae981e9d1641d7dd651c5e..4544d1c0a01497af9be45b702e2991ec83a7ce0d 100644 (file)
@@ -62,7 +62,7 @@ int main( int argc, char **argv )
         cds_test::config const& general_cfg = cds_test::stress_fixture::get_config( "General" );\r
 \r
         // Init SMR\r
-        cds::gc::HP hzpGC( \r
+        cds::gc::HP hzpGC(\r
             general_cfg.get_size_t( "hazard_pointer_count", 16 ),\r
             general_cfg.get_size_t( "hp_max_thread_count", 0 ),\r
             general_cfg.get_size_t( "hp_retired_ptr_count", 0 ),\r
index b8fff4e5ac13eed671f38b4b45c66c392486bea7..01b0d6ee9dcccc6a272c4b4fae7acb5c34108bc1 100644 (file)
@@ -123,8 +123,8 @@ namespace map {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Map_Del3_LF, ::testing::ValuesIn( Map_Del3_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Map_Del3_LF, ::testing::ValuesIn( Map_Del3_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Map_Del3_LF, ::testing::ValuesIn( Map_Del3_LF::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Map_Del3_LF, ::testing::ValuesIn( Map_Del3_LF::get_load_factors()) );
 #endif
 } // namespace map
index 098c54b7290df100c7822ac28f62ab9955d83c6e..236bb97b046c20a80704de6f5c6b6b8b631b0737 100644 (file)
@@ -123,9 +123,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Map_DelOdd_LF, ::testing::ValuesIn( Map_DelOdd_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Map_DelOdd_LF, ::testing::ValuesIn( Map_DelOdd_LF::get_load_factors()), get_test_parameter_name );
 #else
-    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()) );
 #endif
 
 } // namespace map
index 1f47bd9d186d52194af5a40cdd62e4b5deb97118..b23188605f60042ec840f22580eb7f44a1ad6d20 100644 (file)
@@ -200,9 +200,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Map_find_string_LF, ::testing::ValuesIn( Map_find_string::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Map_find_string_LF, ::testing::ValuesIn( Map_find_string::get_load_factors()), get_test_parameter_name );
 #else
-    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()) );
 #endif
 
 
index 15983f581cbe7fe3ebbb2f2475e8d603121892fd..4bef9eabb8a6352ae366d541292ab656ce5d800b 100644 (file)
@@ -127,9 +127,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_func_LF, ::testing::ValuesIn( Map_InsDel_func_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_func_LF, ::testing::ValuesIn( Map_InsDel_func_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_func_LF, ::testing::ValuesIn( Map_InsDel_func_LF::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_func_LF, ::testing::ValuesIn( Map_InsDel_func_LF::get_load_factors()) );
 #endif
 
 } // namespace map
index 3c40b57f83035070fa59dc06161b99f4f89583b3..2b333b2a8637de448ad63ea9915f807c696fadcf 100644 (file)
@@ -112,9 +112,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_item_int_LF, ::testing::ValuesIn( Map_InsDel_item_int_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_item_int_LF, ::testing::ValuesIn( Map_InsDel_item_int_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_item_int_LF, ::testing::ValuesIn( Map_InsDel_item_int_LF::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_item_int_LF, ::testing::ValuesIn( Map_InsDel_item_int_LF::get_load_factors()) );
 #endif
 
 } // namespace map
index a067cb9d65206423e62e073d481917a5e0e1cf64..e6a282b9b191b5f98312a397561125b4ef776d60 100644 (file)
@@ -183,9 +183,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_string_LF, ::testing::ValuesIn( Map_InsDel_string::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_string_LF, ::testing::ValuesIn( Map_InsDel_string::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_string_LF, ::testing::ValuesIn( Map_InsDel_string::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Map_InsDel_string_LF, ::testing::ValuesIn( Map_InsDel_string::get_load_factors()) );
 #endif
 
 } // namespace map
index a846bdf084a6ad85761279e2cf1c44387294c7e7..d2fe73ff963fa053b44a53ce5c93c6ccb8f4e13b 100644 (file)
@@ -135,9 +135,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Map_InsDelFind_LF, ::testing::ValuesIn( Map_InsDelFind_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Map_InsDelFind_LF, ::testing::ValuesIn( Map_InsDelFind_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Map_InsDelFind_LF, ::testing::ValuesIn( Map_InsDelFind_LF::get_load_factors() ) ); 
+    INSTANTIATE_TEST_CASE_P( a, Map_InsDelFind_LF, ::testing::ValuesIn( Map_InsDelFind_LF::get_load_factors()) );
 #endif
 
 } // namespace map
index 1f227e12d894ed98f53905d78792b34ecf4a66bc..ffb6cd546e0a3a2261d3e1e02a1a19459451e340 100644 (file)
@@ -109,9 +109,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Map_Iter_Del3_LF, ::testing::ValuesIn( Map_Iter_Del3_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Map_Iter_Del3_LF, ::testing::ValuesIn( Map_Iter_Del3_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Map_Iter_Del3_LF, ::testing::ValuesIn( Map_Iter_Del3_LF::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Map_Iter_Del3_LF, ::testing::ValuesIn( Map_Iter_Del3_LF::get_load_factors()) );
 #endif
 
 } // namespace map
index 89a18573f652ebf067dcd96365fe46769c68321d..cceb358569c9be92c77a3293a9434bf08d7ca56f 100644 (file)
@@ -341,7 +341,7 @@ namespace map {
                     auto itEnd = rMap.template get_end<Iterator>();
                     for ( auto it = rMap.template get_begin<Iterator>(); it != itEnd; ++it ) {
                         if ( it->first.nKey & 3 ) {
-                            if ( rMap.erase_at( it ) )
+                            if ( rMap.erase_at( it ))
                                 ++m_nDeleteSuccess;
                             else
                                 ++m_nDeleteFailed;
index 61bb8a1ddb49a657e9f0aff08f53940684e1ff70..6958d727cb7cd511e0b8474dcb88fd5b2e4989dc 100644 (file)
@@ -80,7 +80,7 @@ namespace map {
                     m_arr.push_back( i );
                 for ( key_type i = keyMax - 10; i <= keyMax; ++i )
                     m_arr.push_back( i );
-                shuffle( m_arr.begin(), m_arr.end() );
+                shuffle( m_arr.begin(), m_arr.end());
             }
 
         public:
@@ -118,7 +118,7 @@ namespace map {
 
                 for ( size_t nPass = 0; nPass < s_nPassCount; ++nPass ) {
                     for ( key_type key : m_arr ) {
-                        if ( m_Map.insert( key, key ) ) {
+                        if ( m_Map.insert( key, key )) {
                             if ( key == keyMin )
                                 ++m_nInsertMinSuccess;
                             else if ( key == keyMax )
@@ -301,7 +301,7 @@ namespace map {
                 arr.resize( s_nMapSize );
                 for ( int i = 0; i < static_cast<int>( s_nMapSize ); ++i )
                     arr[i] = i;;
-                shuffle( arr.begin(), arr.end() );
+                shuffle( arr.begin(), arr.end());
 
                 for ( key_type key : arr )
                     testMap.insert( key, key );
index b30e398c24194b6c95822eb385b835c805ee660f..777736bf82417aad873cab8f47479faaa30f2493 100644 (file)
@@ -518,11 +518,11 @@ namespace {
 
     INSTANTIATE_TEST_CASE_P( SQ,
         intrusive_segmented_queue_push_pop,
-        ::testing::ValuesIn( intrusive_segmented_queue_push_pop::get_test_parameters() ), get_test_parameter_name );
+        ::testing::ValuesIn( intrusive_segmented_queue_push_pop::get_test_parameters()), get_test_parameter_name );
 #else
     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()) );
 #endif
 
 
index af86b836b27030ea90aa57c1ab98c8d88888152e..499309a41079ae7117a1e258d522885f3749529d 100644 (file)
@@ -248,11 +248,11 @@ namespace {
     }
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_pop,
-        ::testing::ValuesIn( segmented_queue_pop::get_test_parameters() ), get_test_parameter_name );
+        ::testing::ValuesIn( segmented_queue_pop::get_test_parameters()), get_test_parameter_name );
 #else
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_pop,
-        ::testing::ValuesIn( segmented_queue_pop::get_test_parameters() ) );
+        ::testing::ValuesIn( segmented_queue_pop::get_test_parameters()) );
 #endif
 
 
index 5840f33b20a391fc40737beadb4a786295f4ec10..fb286143160ce6f37305dc90cfc1dab1da16becf 100644 (file)
@@ -251,11 +251,11 @@ namespace {
     }
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_push,
-        ::testing::ValuesIn( segmented_queue_push::get_test_parameters() ), get_test_parameter_name );
+        ::testing::ValuesIn( segmented_queue_push::get_test_parameters()), get_test_parameter_name );
 #else
         INSTANTIATE_TEST_CASE_P( SQ,
             segmented_queue_push,
-            ::testing::ValuesIn( segmented_queue_push::get_test_parameters() ) );
+            ::testing::ValuesIn( segmented_queue_push::get_test_parameters()) );
 #endif
 
 
index 060629f566c61e39dd66690c43eaeae24c9d5b92..14b027652054931e3b7a0aadb45964f045103b7b 100644 (file)
@@ -430,11 +430,11 @@ namespace {
     }
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_push_pop,
-        ::testing::ValuesIn( segmented_queue_push_pop::get_test_parameters() ), get_test_parameter_name );
+        ::testing::ValuesIn( segmented_queue_push_pop::get_test_parameters()), get_test_parameter_name );
 #else
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_push_pop,
-        ::testing::ValuesIn( segmented_queue_push_pop::get_test_parameters() ) );
+        ::testing::ValuesIn( segmented_queue_push_pop::get_test_parameters()) );
 #endif
 
 } // namespace
index 75ca671d7535954c177f156f9995d25e07ee3a45..7c5dea9b701a6ea41560bdfa431a8e947b6fe9c2 100644 (file)
@@ -334,7 +334,7 @@ namespace {
 #else
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_random,
-        ::testing::ValuesIn( segmented_queue_random::get_test_parameters() ));
+        ::testing::ValuesIn( segmented_queue_random::get_test_parameters()));
 #endif
 
 } // namespace
index 32ca2d5580d086e5cec58eefa6fcefcd1d1491d1..55b9e71c5a36c55bcb096873e26e1c9eb8e3a74b 100644 (file)
@@ -141,13 +141,13 @@ namespace {
                             }
                         }
 
-                        if ( !m_Queue.pop_front() )
+                        if ( !m_Queue.pop_front())
                             ++m_nPopFrontFailed;
                     }
                     else {
                         ++m_nPopEmpty;
                         if ( s_nProducerDone.load() != 0 ) {
-                            if ( m_Queue.empty() )
+                            if ( m_Queue.empty())
                                 break;
                         }
                     }
index 3a0119dd29131161d6e91dfb462cc904a29da3bc..4fa440a61e23dd461752fca0c03780729918a92b 100644 (file)
@@ -79,7 +79,7 @@ namespace {
                 m_nPushFailed = 0;
 
                 for ( value_type v = 0; v < nPushCount; ++v ) {
-                    if ( !m_Queue.push( v ) ) {
+                    if ( !m_Queue.push( v )) {
                         ++m_nPushFailed;
                         --v;
                     }
index 0c27a31368e8cc50c66d526ea07722e3f400c1a2..b2079323b81ece45ce3fc0856a0a0f2df99af527 100644 (file)
@@ -54,7 +54,7 @@ namespace queue {
         }
 
         bool push( const T& data )
-        { 
+        {
             return enqueue( data );
         }
 
@@ -70,7 +70,7 @@ namespace queue {
         }
 
         bool pop( T& data )
-        { 
+        {
             return dequeue( data );
         }
 
index 05579093cc26a647f32d921a801d7e6b65097301..283f441c09eebc19cd036109d6cec08280e5c8db 100644 (file)
@@ -125,9 +125,9 @@ namespace set {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Set_Del3_LF, ::testing::ValuesIn( Set_Del3_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Set_Del3_LF, ::testing::ValuesIn( Set_Del3_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Set_Del3_LF, ::testing::ValuesIn( Set_Del3_LF::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Set_Del3_LF, ::testing::ValuesIn( Set_Del3_LF::get_load_factors()) );
 #endif
 
 } // namespace set
index 7243bab75b120273069483521618470c679ef462..0835a4729488cbb75894728d9e7972156fd77eb4 100644 (file)
@@ -124,8 +124,8 @@ namespace set {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Set_DelOdd_LF, ::testing::ValuesIn( Set_DelOdd_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Set_DelOdd_LF, ::testing::ValuesIn( Set_DelOdd_LF::get_load_factors()), get_test_parameter_name );
 #else
-    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()) );
 #endif
 } // namespace set
index 1b9296ca11f97db07517658f18b1abfb4a866089..f0b5a7b57a1e580324adb2f6bbc361c3e79ab802 100644 (file)
@@ -128,9 +128,9 @@ namespace set {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Set_InsDelFind_LF, ::testing::ValuesIn( Set_InsDelFind_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Set_InsDelFind_LF, ::testing::ValuesIn( Set_InsDelFind_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Set_InsDelFind_LF, ::testing::ValuesIn( Set_InsDelFind_LF::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Set_InsDelFind_LF, ::testing::ValuesIn( Set_InsDelFind_LF::get_load_factors()) );
 #endif
 
 } // namespace set
index deddcf29fd66eba05552ff7a9e0c551e3886631d..9c120459dede89546bc2d78d721a58046cbd01f9 100644 (file)
@@ -115,8 +115,8 @@ namespace set {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Set_InsDel_func_LF, ::testing::ValuesIn( Set_InsDel_func_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Set_InsDel_func_LF, ::testing::ValuesIn( Set_InsDel_func_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Set_InsDel_func_LF, ::testing::ValuesIn( Set_InsDel_func_LF::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Set_InsDel_func_LF, ::testing::ValuesIn( Set_InsDel_func_LF::get_load_factors()) );
 #endif
 } // namespace set
index 03f61d096e87d85355b1bb0daf0b7e4e3753e259..dee00c9f2c86871c321580c4990b5c0133a7e45c 100644 (file)
@@ -119,10 +119,10 @@ namespace set {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Set_InsDel_string_LF, ::testing::ValuesIn( Set_InsDel_string_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Set_InsDel_string_LF, ::testing::ValuesIn( Set_InsDel_string_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Set_InsDel_string_LF, ::testing::ValuesIn( Set_InsDel_string_LF::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Set_InsDel_string_LF, ::testing::ValuesIn( Set_InsDel_string_LF::get_load_factors()) );
 #endif
 
-    
+
 } // namespace set
index c549af57725aefb34a00881a3db01d8e11f7ee3c..d53196750e6bb24bd7efce80c76ee71278b1528c 100644 (file)
@@ -109,8 +109,8 @@ namespace set {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Set_Iter_Del3_LF, ::testing::ValuesIn( Set_Iter_Del3_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Set_Iter_Del3_LF, ::testing::ValuesIn( Set_Iter_Del3_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Set_Iter_Del3_LF, ::testing::ValuesIn( Set_Iter_Del3_LF::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Set_Iter_Del3_LF, ::testing::ValuesIn( Set_Iter_Del3_LF::get_load_factors()) );
 #endif
 } // namespace set
index b41eb7db6fa9c93bbfdc67fed97e5ab2d22ddeee..5c8fc46b3bf77432f8e205b04ebb4df8f8fe9552 100644 (file)
@@ -119,8 +119,8 @@ namespace set {
     {
         return std::to_string( p.param );
     }
-    INSTANTIATE_TEST_CASE_P( a, Set_Iteration_LF, ::testing::ValuesIn( Set_Iteration_LF::get_load_factors() ), get_test_parameter_name );
+    INSTANTIATE_TEST_CASE_P( a, Set_Iteration_LF, ::testing::ValuesIn( Set_Iteration_LF::get_load_factors()), get_test_parameter_name );
 #else
-    INSTANTIATE_TEST_CASE_P( a, Set_Iteration_LF, ::testing::ValuesIn( Set_Iteration_LF::get_load_factors() ) );
+    INSTANTIATE_TEST_CASE_P( a, Set_Iteration_LF, ::testing::ValuesIn( Set_Iteration_LF::get_load_factors()) );
 #endif
 } // namespace set
index d9fcbbd1ab4d2fc82a37f98499396aceb579a970..22ef14b25066b6c9b54505fd6487d5c50a1dd2cb 100644 (file)
@@ -47,7 +47,7 @@ namespace set {
     {
         typedef cc::FeldmanHashSet< GC, T, Traits > base_class;
 
-        
+
         template <typename GC2>
         struct get_extracted_ptr
         {
index 4cf8ab762148bed90b66a7425f401876fa8d2098..6c49b305e7dcdf415de9d078dc9f6d3fcdd71f02 100644 (file)
@@ -535,15 +535,15 @@ namespace cds_test {
                 EXPECT_EQ( it->nKey, key );
                 EXPECT_EQ( ( *it ).nKey, key );
 
-                EXPECT_TRUE( l.erase_at( it ) );
+                EXPECT_TRUE( l.erase_at( it ));
 
                 EXPECT_EQ( it->nKey, key );
                 EXPECT_EQ( ( *it ).nKey, key );
 
-                EXPECT_FALSE( l.erase_at( it ) );
+                EXPECT_FALSE( l.erase_at( it ));
                 ++key;
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             List::gc::force_dispose();
index 0a892cb5d9c945db065f138b31317bc34cb29a7d..3f5f40a72e8dc5b929ba65cf0d18374903e8685f 100644 (file)
@@ -155,14 +155,14 @@ namespace cds_test {
             // erase_at() test
             for ( auto& i : data ) {
                 i.nDisposeCount = 0;
-                ASSERT_TRUE( s.insert( i ) );
+                ASSERT_TRUE( s.insert( i ));
             }
 
             for ( auto it = s.begin(); it != s.end(); ++it ) {
                 EXPECT_TRUE( s.erase_at( it ));
                 EXPECT_FALSE( s.erase_at( it ));
             }
-            ASSERT_TRUE( s.empty() );
+            ASSERT_TRUE( s.empty());
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // Force retiring cycle
index 36b93af0289a678a286555c4032ff1aa867a117f..c5c860375403c89d7eab3b6ee62867481794c8e2 100644 (file)
@@ -136,15 +136,15 @@ namespace cds_test {
 
             // erase_at()
             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 );
 
             for ( auto it = m.begin(); it != m.end(); ++it ) {
                 EXPECT_TRUE( m.erase_at( it ));
                 EXPECT_FALSE( m.erase_at( it ));
             }
-            EXPECT_TRUE( m.empty() );
+            EXPECT_TRUE( m.empty());
             EXPECT_CONTAINER_SIZE( m, 0u );
         }
     };
index 2c1eb109ecfb359f640fce24cc599ef65144777a..191dd03be55a993a555ddaa82a4272aa84917220 100644 (file)
@@ -67,7 +67,7 @@ namespace {
         {
             Algo f;
             for ( auto i : arr_ ) {
-                EXPECT_EQ( cds::algo::bit_reversal::swar()( i ), f( i ) ) << "i=" << i;
+                EXPECT_EQ( cds::algo::bit_reversal::swar()( i ), f( i )) << "i=" << i;
             }
         }
     };
index 1f99d513314a19b1d055f40c1cdf42734b3fba9c..c17702ad3238e0b9be59e3fe2265a7b4eb94c3bb 100644 (file)
@@ -32,7 +32,7 @@
 #include <cds/algo/atomic.h>
 #include "cxx11_convert_memory_order.h"
 
-#define EXPECT_ATOMIC_IS_LOCK_FREE( x ) EXPECT_TRUE( x.is_lock_free() )
+#define EXPECT_ATOMIC_IS_LOCK_FREE( x ) EXPECT_TRUE( x.is_lock_free())
 
 namespace {
     class cxx11_atomic_class: public ::testing::Test
index 8702d833976bd5a215dacb00accec5d1f820126b..23e97e6dd7ca1e792fd1de2d665cba6aaab83955 100644 (file)
@@ -55,24 +55,24 @@ 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 );
 
             EXPECT_EQ( *splitter.source(), src );
@@ -154,24 +154,24 @@ 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 );
 
             EXPECT_EQ( *splitter.source(), src );
@@ -212,7 +212,7 @@ namespace {
                     ASSERT_FALSE( !splitter );
                     if ( i % 8 == 0 )
                         res = res << 8;
-                    res |= ( splitter.cut( 1 ) ) << ( i % 8 );
+                    res |= ( splitter.cut( 1 )) << ( i % 8 );
                 }
                 ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
@@ -378,7 +378,7 @@ namespace {
                     ASSERT_FALSE( !splitter );
                     if ( i % 8 == 0 )
                         res = res << 8;
-                    res |= ( splitter.cut( 1 ) ) << ( i % 8 );
+                    res |= ( splitter.cut( 1 )) << ( i % 8 );
                 }
                 ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
@@ -455,24 +455,24 @@ namespace {
                 split_bitstring splitter( src );
 
                 // Trivial case
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 res = splitter.cut( int48_size * 8 );
-                EXPECT_EQ( res, src.to64() );
-                ASSERT_TRUE( splitter.eos() );
+                EXPECT_EQ( res, src.to64());
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 EXPECT_EQ( splitter.safe_cut( int48_size * 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( int48_size * 8 );
-                EXPECT_EQ( res, src.to64() );
-                ASSERT_TRUE( splitter.eos() );
+                EXPECT_EQ( res, src.to64());
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 EXPECT_EQ( splitter.safe_cut( int48_size * 8 ), 0u );
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
             }
 #endif
@@ -480,34 +480,34 @@ namespace {
             typedef cds::algo::split_bitstring< int48, int48_size, size_t > split_bitstring;
             split_bitstring splitter( src );
 
-            EXPECT_EQ( splitter.source()->to64(), src.to64() );
+            EXPECT_EQ( splitter.source()->to64(), src.to64());
             EXPECT_EQ( splitter.rest_count(), int48_size * 8 );
             EXPECT_EQ( splitter.bit_offset(), 0u );
 
             // Cut each hex digit
             splitter.reset();
             for ( size_t i = 0; i < int48_size * 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 );
             EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
-            EXPECT_EQ( splitter.source()->to64(), src.to64() );
+            EXPECT_EQ( splitter.source()->to64(), src.to64());
             EXPECT_EQ( splitter.rest_count(), 0u );
             EXPECT_EQ( splitter.bit_offset(), int48_size * 8 );
 
             // by one bit
             {
                 splitter.reset();
-                EXPECT_EQ( splitter.source()->to64(), src.to64() );
+                EXPECT_EQ( splitter.source()->to64(), src.to64());
                 EXPECT_EQ( splitter.rest_count(), int48_size * 8 );
                 EXPECT_EQ( splitter.bit_offset(), 0u );
 
                 res = 0;
                 for ( size_t i = 0; i < int48_size * 8; ++i ) {
-                    ASSERT_FALSE( splitter.eos() );
+                    ASSERT_FALSE( splitter.eos());
                     ASSERT_FALSE( !splitter );
 #if CDS_BUILD_BITS == 64
                     res |= splitter.cut( 1 ) << i;
@@ -515,11 +515,11 @@ namespace {
                     res |= static_cast<decltype(res)>( splitter.cut( 1 )) << i;
 #endif
                 }
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
-                EXPECT_EQ( res, src.to64() );
+                EXPECT_EQ( res, src.to64());
                 EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
-                EXPECT_EQ( splitter.source()->to64(), src.to64() );
+                EXPECT_EQ( splitter.source()->to64(), src.to64());
                 EXPECT_EQ( splitter.rest_count(), 0u );
                 EXPECT_EQ( splitter.bit_offset(), int48_size * 8 );
             }
@@ -528,14 +528,14 @@ namespace {
             {
                 for ( size_t k = 0; k < 100; ++k ) {
                     splitter.reset();
-                    EXPECT_EQ( splitter.source()->to64(), src.to64() );
+                    EXPECT_EQ( splitter.source()->to64(), src.to64());
                     EXPECT_EQ( splitter.rest_count(), int48_size * 8 );
                     EXPECT_EQ( splitter.bit_offset(), 0u );
 
                     res = 0;
                     size_t shift = 0;
                     while ( splitter ) {
-                        ASSERT_FALSE( splitter.eos() );
+                        ASSERT_FALSE( splitter.eos());
                         ASSERT_FALSE( !splitter );
                         int bits = std::rand() % 16;
 #if CDS_BUILD_BITS == 64
@@ -545,11 +545,11 @@ namespace {
 #endif
                         shift += bits;
                     }
-                    ASSERT_TRUE( splitter.eos() );
+                    ASSERT_TRUE( splitter.eos());
                     ASSERT_TRUE( !splitter );
-                    EXPECT_EQ( res, src.to64() );
+                    EXPECT_EQ( res, src.to64());
                     EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
-                    EXPECT_EQ( splitter.source()->to64(), src.to64() );
+                    EXPECT_EQ( splitter.source()->to64(), src.to64());
                     EXPECT_EQ( splitter.rest_count(), 0u );
                     EXPECT_EQ( splitter.bit_offset(), int48_size * 8 );
                 }
@@ -570,24 +570,24 @@ namespace {
                 split_bitstring splitter( src );
 
                 // Trivial case
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 res = splitter.cut( int48_size * 8 );
-                ASSERT_EQ( res, src.to64() );
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_EQ( res, src.to64());
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 EXPECT_EQ( splitter.safe_cut( int48_size * 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( int48_size * 8 );
-                EXPECT_EQ( res, src.to64() );
-                ASSERT_TRUE( splitter.eos() );
+                EXPECT_EQ( res, src.to64());
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 EXPECT_EQ( splitter.safe_cut( int48_size * 8 ), 0u );
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
             }
 #endif
@@ -595,14 +595,14 @@ namespace {
             typedef cds::algo::split_bitstring< int48, int48_size, size_t > split_bitstring;
             split_bitstring splitter( src );
 
-            EXPECT_EQ( splitter.source()->to64(), src.to64() );
+            EXPECT_EQ( splitter.source()->to64(), src.to64());
             EXPECT_EQ( splitter.rest_count(), int48_size * 8 );
             EXPECT_EQ( splitter.bit_offset(), 0u );
 
             // Cut each hex digit
             splitter.reset();
             for ( size_t i = 0; i < int48_size * 2; ++i ) {
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 if ( i % 2 == 0 ) {
                     EXPECT_EQ( splitter.cut( 4 ), 0x0A - i );
@@ -611,37 +611,37 @@ namespace {
                     EXPECT_EQ( splitter.cut( 4 ), 0x0B - i + 1 );
                 }
             }
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
             EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
-            EXPECT_EQ( splitter.source()->to64(), src.to64() );
+            EXPECT_EQ( splitter.source()->to64(), src.to64());
             EXPECT_EQ( splitter.rest_count(), 0u );
             EXPECT_EQ( splitter.bit_offset(), int48_size * 8 );
 
             // by one bit
             {
                 splitter.reset();
-                EXPECT_EQ( splitter.source()->to64(), src.to64() );
+                EXPECT_EQ( splitter.source()->to64(), src.to64());
                 EXPECT_EQ( splitter.rest_count(), int48_size * 8 );
                 EXPECT_EQ( splitter.bit_offset(), 0u );
 
                 res = 0;
                 for ( size_t i = 0; i < int48_size * 8; ++i ) {
-                    ASSERT_FALSE( splitter.eos() );
+                    ASSERT_FALSE( splitter.eos());
                     ASSERT_FALSE( !splitter );
 #if CDS_BUILD_BITS == 64
                     if ( i % 8 == 0 )
                         res = res << 8;
-                    res |= ( splitter.cut( 1 ) ) << ( i % 8 );
+                    res |= ( splitter.cut( 1 )) << ( i % 8 );
 #else
-                    res = ( res << 1 ) | static_cast<decltype(res)>( splitter.cut( 1 ) );
+                    res = ( res << 1 ) | static_cast<decltype(res)>( splitter.cut( 1 ));
 #endif
                 }
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
-                EXPECT_EQ( res, src.to64() );
+                EXPECT_EQ( res, src.to64());
                 EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
-                EXPECT_EQ( splitter.source()->to64(), src.to64() );
+                EXPECT_EQ( splitter.source()->to64(), src.to64());
                 EXPECT_EQ( splitter.rest_count(), 0u );
                 EXPECT_EQ( splitter.bit_offset(), int48_size * 8 );
             }
@@ -651,13 +651,13 @@ namespace {
             {
                 for ( size_t k = 0; k < 100; ++k ) {
                     splitter.reset();
-                    EXPECT_EQ( splitter.source()->to64(), src.to64() );
+                    EXPECT_EQ( splitter.source()->to64(), src.to64());
                     EXPECT_EQ( splitter.rest_count(), int48_size * 8 );
                     EXPECT_EQ( splitter.bit_offset(), 0u );
 
                     res = 0;
                     while ( splitter ) {
-                        ASSERT_FALSE( splitter.eos() );
+                        ASSERT_FALSE( splitter.eos());
                         ASSERT_FALSE( !splitter );
                         unsigned bits = std::rand() % 16;
                         size_t shift = splitter.rest_count();
@@ -669,11 +669,11 @@ namespace {
                         res = ( res << shift ) | static_cast<decltype(res)>( splitter.safe_cut( bits ));
 #endif
                     }
-                    ASSERT_TRUE( splitter.eos() );
+                    ASSERT_TRUE( splitter.eos());
                     ASSERT_TRUE( !splitter );
-                    EXPECT_EQ( res, src.to64() );
+                    EXPECT_EQ( res, src.to64());
                     EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
-                    EXPECT_EQ( splitter.source()->to64(), src.to64() );
+                    EXPECT_EQ( splitter.source()->to64(), src.to64());
                     EXPECT_EQ( splitter.rest_count(), 0u );
                     EXPECT_EQ( splitter.bit_offset(), int48_size * 8 );
                 }
@@ -688,12 +688,12 @@ namespace {
             typedef cds::algo::byte_splitter< size_t > splitter_type;
             splitter_type splitter( src );
 
-            ASSERT_TRUE( !splitter.eos() );
+            ASSERT_TRUE( !splitter.eos());
             EXPECT_EQ( *splitter.source(), src );
             EXPECT_EQ( splitter.rest_count(), sizeof( src ) * 8 );
             EXPECT_EQ( splitter.bit_offset(), 0u );
-            EXPECT_TRUE( splitter.is_correct( 8 ) );
-            EXPECT_FALSE( splitter.is_correct( 4 ) );
+            EXPECT_TRUE( splitter.is_correct( 8 ));
+            EXPECT_FALSE( splitter.is_correct( 4 ));
 
             unsigned expected = 0x10;
             for ( unsigned i = 0; i < splitter_type::c_bitstring_size; ++i ) {
@@ -702,7 +702,7 @@ namespace {
                 expected += 0x22;
             }
 
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
             EXPECT_EQ( *splitter.source(), src );
             EXPECT_EQ( splitter.rest_count(), 0u );
@@ -716,12 +716,12 @@ namespace {
             typedef cds::algo::byte_splitter< size_t > splitter_type;
             splitter_type splitter( src );
 
-            ASSERT_TRUE( !splitter.eos() );
+            ASSERT_TRUE( !splitter.eos());
             EXPECT_EQ( *splitter.source(), src );
             EXPECT_EQ( splitter.rest_count(), sizeof( src ) * 8 );
             EXPECT_EQ( splitter.bit_offset(), 0u );
-            EXPECT_TRUE( splitter.is_correct( 8 ) );
-            EXPECT_FALSE( splitter.is_correct( 4 ) );
+            EXPECT_TRUE( splitter.is_correct( 8 ));
+            EXPECT_FALSE( splitter.is_correct( 4 ));
 
             unsigned expected = 0xFE;
             for ( unsigned i = 0; i < splitter_type::c_bitstring_size; ++i ) {
@@ -730,7 +730,7 @@ namespace {
                 expected -= 0x22;
             }
 
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
             EXPECT_EQ( *splitter.source(), src );
             EXPECT_EQ( splitter.rest_count(), 0u );
@@ -799,7 +799,7 @@ namespace {
 
     TEST_F( Split_bitstrig, cut_int48 )
     {
-        if ( is_big_endian() )
+        if ( is_big_endian())
             cut_int48_be();
         else
             cut_int48_le();
@@ -807,7 +807,7 @@ namespace {
 
     TEST_F( Split_bitstrig, cut_byte )
     {
-        if ( is_big_endian() )
+        if ( is_big_endian())
             cut_byte_be();
         else
             cut_byte_le();
index 1a05b6837fcd862a2849d966fc267897e52aa13d..a757749241e085ed9bfa59087ac67b149a2a1c55 100644 (file)
@@ -146,7 +146,7 @@ namespace {
 
             const int nSize = 100;
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // enqueue/dequeue
@@ -154,16 +154,16 @@ namespace {
                 ASSERT_TRUE( q.enqueue( value_type( i )));
                 ASSERT_EQ( q.size(), static_cast<size_t>( i + 1 ));
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_EQ( q.size(), static_cast<size_t>( nSize ));
 
             for ( int i = 0; i < nSize; ++i ) {
                 it.value = -1;
-                ASSERT_TRUE( q.dequeue( it ) );
+                ASSERT_TRUE( q.dequeue( it ));
                 ASSERT_EQ( it.value, i );
                 ASSERT_EQ( q.size(), static_cast<size_t>( nSize - i - 1 ));
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // push/pop
@@ -171,39 +171,39 @@ namespace {
                 ASSERT_TRUE( q.push( value_type( i )));
                 ASSERT_EQ( q.size(), static_cast<size_t>( i + 1 ));
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_EQ( q.size(), static_cast<size_t>( nSize ));
 
             for ( int i = 0; i < nSize; ++i ) {
                 it.value = -1;
-                ASSERT_TRUE( q.pop( it ) );
+                ASSERT_TRUE( q.pop( it ));
                 ASSERT_EQ( it.value, i );
                 ASSERT_EQ( q.size(), static_cast<size_t>( nSize - i - 1 ));
             }
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // clear
             for ( int i = 0; i < nSize; ++i ) {
                 ASSERT_TRUE( q.push( value_type( i )));
             }
-            ASSERT_FALSE( q.empty() );
+            ASSERT_FALSE( q.empty());
             ASSERT_EQ( q.size(), static_cast<size_t>( nSize ));
 
             q.clear();
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // pop from empty queue
             it = value_type( nSize * 2 );
-            ASSERT_FALSE( q.pop( it ) );
+            ASSERT_FALSE( q.pop( it ));
             ASSERT_EQ( it.value, 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.value, nSize * 2 );
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
         }
 
index 9186771db8264652555c2ae1217282fa96eb251c..698b957445b82acd875f44a0a2ad96dde80b8f9a 100644 (file)
@@ -53,20 +53,20 @@ namespace cds_test {
             for ( unsigned pass = 0; pass < 3; ++pass ) {
                 for ( size_t i = 0; i < nSize; ++i ) {
                     it = static_cast<value_type>( i );
-                    ASSERT_TRUE( q.enqueue( it ) );
+                    ASSERT_TRUE( q.enqueue( it ));
                     ASSERT_CONTAINER_SIZE( q, i + 1 );
                 }
-                ASSERT_FALSE( q.empty() );
+                ASSERT_FALSE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, nSize );
-                ASSERT_FALSE( q.enqueue( static_cast<value_type>( nSize ) * 2 ) );
+                ASSERT_FALSE( q.enqueue( static_cast<value_type>( nSize ) * 2 ));
 
                 for ( size_t i = 0; i < nSize; ++i ) {
                     it = -1;
-                    ASSERT_TRUE( q.dequeue( it ) );
-                    ASSERT_EQ( it, static_cast<value_type>( i ) );
+                    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 );
             }
 
@@ -74,19 +74,19 @@ namespace cds_test {
             for ( unsigned pass = 0; pass < 3; ++pass ) {
                 for ( size_t i = 0; i < nSize; ++i ) {
                     it = static_cast<value_type>( i );
-                    ASSERT_TRUE( q.push( it ) );
+                    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_EQ( it, static_cast<value_type>( i ) );
+                    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 );
             }
 
@@ -97,26 +97,26 @@ namespace cds_test {
                     ASSERT_NE( it, -1 );
                     auto f = [&it]( value_type& dest ) { dest = it; it = -1; };
                     if ( i & 1 )
-                        ASSERT_TRUE( q.enqueue_with( f ) );
+                        ASSERT_TRUE( q.enqueue_with( f ));
                     else
-                        ASSERT_TRUE( q.push_with( f ) );
+                        ASSERT_TRUE( q.push_with( f ));
                     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 ) {
                     it = -1;
                     auto f = [&it]( value_type& src ) { it = src; src = -1; };
                     if ( i & 1 )
-                        ASSERT_TRUE( q.pop_with( f ) );
+                        ASSERT_TRUE( q.pop_with( f ));
                     else
-                        ASSERT_TRUE( q.dequeue_with( f ) );
-                    ASSERT_EQ( it, static_cast<value_type>( i ) );
+                        ASSERT_TRUE( q.dequeue_with( f ));
+                    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 );
             }
 
index fb145024e537aeab46596fb2e535b03c6395da2c..2023d245c982b0969d8e95fcb187dbe196f2b818 100644 (file)
@@ -45,31 +45,31 @@ namespace {
 
             const size_t nSize = q.capacity();
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_CONTAINER_SIZE( q, 0 );
 
             // enqueue/dequeue
             for ( unsigned pass = 0; pass < 3; ++pass ) {
                 for ( size_t i = 0; i < nSize; ++i ) {
-                    ASSERT_TRUE( q.enqueue( static_cast<value_type>( i ) ) );
+                    ASSERT_TRUE( q.enqueue( static_cast<value_type>( i )) );
                     ASSERT_CONTAINER_SIZE( q, i + 1 );
                 }
-                ASSERT_FALSE( q.empty() );
+                ASSERT_FALSE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, nSize );
-                ASSERT_FALSE( q.enqueue( static_cast<value_type>( nSize ) * 2 ) );
+                ASSERT_FALSE( q.enqueue( static_cast<value_type>( nSize ) * 2 ));
 
                 for ( size_t i = 0; i < nSize; ++i ) {
                     value_type* fr = q.front();
                     ASSERT_TRUE( fr != nullptr );
-                    ASSERT_EQ( *fr, static_cast<value_type>( i ) );
-                    ASSERT_TRUE( q.pop_front() );
+                    ASSERT_EQ( *fr, static_cast<value_type>( i ));
+                    ASSERT_TRUE( q.pop_front());
                     ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
                 }
-                ASSERT_TRUE( q.empty() );
+                ASSERT_TRUE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, 0 );
 
                 ASSERT_TRUE( q.front() == nullptr );
-                ASSERT_FALSE( q.pop_front() );
+                ASSERT_FALSE( q.pop_front());
             }
         }
     };
index 7718dad045f9e14ee6442a5ad31ff918c9384fc5..c6eee650b67fc1558bca4bc5910162fe2d3adacf 100644 (file)
@@ -58,27 +58,27 @@ namespace {
                             el[k] = static_cast<value_type>( i + k );
 
                         if ( i + nArrSize <= nSize ) {
-                            ASSERT_TRUE( q.push( el, nArrSize ) );
+                            ASSERT_TRUE( q.push( el, nArrSize ));
                         }
                         else {
-                            ASSERT_FALSE( q.push( el, nArrSize ) );
+                            ASSERT_FALSE( q.push( el, nArrSize ));
                         }
                     }
 
-                    ASSERT_TRUE( !q.empty() );
+                    ASSERT_TRUE( !q.empty());
                     if ( nSize % nArrSize != 0 ) {
-                        ASSERT_FALSE( q.full() );
+                        ASSERT_FALSE( q.full());
                         ASSERT_CONTAINER_SIZE( q, nArrCount * nArrSize );
                         for ( size_t i = nArrCount * nArrSize; i < nSize; ++i ) {
-                            ASSERT_TRUE( q.enqueue( static_cast<value_type>( i ) ) );
+                            ASSERT_TRUE( q.enqueue( static_cast<value_type>( i )) );
                         }
                     }
-                    ASSERT_TRUE( q.full() );
+                    ASSERT_TRUE( q.full());
                     ASSERT_CONTAINER_SIZE( q, nSize );
 
                     // batch pop
                     value_type expected = 0;
-                    while ( q.pop( el, nArrSize ) ) {
+                    while ( q.pop( el, nArrSize )) {
                         for ( size_t i = 0; i < nArrSize; ++i ) {
                             ASSERT_EQ( el[i], expected );
                             ++expected;
@@ -86,15 +86,15 @@ namespace {
                     }
 
                     if ( nSize % nArrSize == 0 ) {
-                        ASSERT_TRUE( q.empty() );
+                        ASSERT_TRUE( q.empty());
                     }
                     else {
-                        ASSERT_FALSE( q.empty() );
+                        ASSERT_FALSE( q.empty());
                         ASSERT_CONTAINER_SIZE( q, nSize % nArrSize );
                         q.clear();
                     }
-                    ASSERT_TRUE( q.empty() );
-                    ASSERT_FALSE( q.full() );
+                    ASSERT_TRUE( q.empty());
+                    ASSERT_FALSE( q.full());
                     ASSERT_CONTAINER_SIZE( q, 0u );
                 }
             }
@@ -111,28 +111,28 @@ namespace {
                             el[k] = i + k;
 
                         if ( i + nArrSize <= nSize ) {
-                            ASSERT_TRUE( q.push( el, nArrSize, func_push ) );
+                            ASSERT_TRUE( q.push( el, nArrSize, func_push ));
                         }
                         else {
-                            ASSERT_FALSE( q.push( el, nArrSize, func_push ) );
+                            ASSERT_FALSE( q.push( el, nArrSize, func_push ));
                         }
                     }
 
-                    ASSERT_TRUE( !q.empty() );
+                    ASSERT_TRUE( !q.empty());
                     if ( nSize % nArrSize != 0 ) {
-                        ASSERT_FALSE( q.full() );
+                        ASSERT_FALSE( q.full());
                         ASSERT_CONTAINER_SIZE( q, nArrCount * nArrSize );
                         for ( size_t i = nArrCount * nArrSize; i < nSize; ++i ) {
-                            ASSERT_TRUE( q.push( &i, 1, func_push ) );
+                            ASSERT_TRUE( q.push( &i, 1, func_push ));
                         }
                     }
-                    ASSERT_TRUE( q.full() );
+                    ASSERT_TRUE( q.full());
                     ASSERT_CONTAINER_SIZE( q, nSize );
 
                     // batch pop with functor
                     auto func_pop = []( size_t& dest, value_type src ) { dest = static_cast<size_t>( src / 10 ); };
                     size_t expected = 0;
-                    while ( q.pop( el, nArrSize, func_pop ) ) {
+                    while ( q.pop( el, nArrSize, func_pop )) {
                         for ( size_t i = 0; i < nArrSize; ++i ) {
                             ASSERT_EQ( el[i], expected );
                             ++expected;
@@ -140,19 +140,19 @@ namespace {
                     }
 
                     if ( nSize % nArrSize == 0 ) {
-                        ASSERT_TRUE( q.empty() );
+                        ASSERT_TRUE( q.empty());
                     }
                     else {
-                        ASSERT_FALSE( q.empty() );
+                        ASSERT_FALSE( q.empty());
                         ASSERT_CONTAINER_SIZE( q, nSize % nArrSize );
                         size_t v;
-                        while ( q.pop( &v, 1, func_pop ) ) {
+                        while ( q.pop( &v, 1, func_pop )) {
                             ASSERT_EQ( v, expected );
                             ++expected;
                         }
                     }
-                    ASSERT_TRUE( q.empty() );
-                    ASSERT_FALSE( q.full() );
+                    ASSERT_TRUE( q.empty());
+                    ASSERT_FALSE( q.full());
                     ASSERT_CONTAINER_SIZE( q, 0u );
                 }
 
@@ -163,36 +163,36 @@ namespace {
                             el[k] = i + k;
 
                         if ( i + nArrSize <= nSize ) {
-                            ASSERT_TRUE( q.push( el, nArrSize, func_push ) );
+                            ASSERT_TRUE( q.push( el, nArrSize, func_push ));
                         }
                         else {
-                            ASSERT_FALSE( q.push( el, nArrSize, func_push ) );
+                            ASSERT_FALSE( q.push( el, nArrSize, func_push ));
                         }
                     }
 
-                    ASSERT_TRUE( !q.empty() );
+                    ASSERT_TRUE( !q.empty());
                     if ( nSize % nArrSize != 0 ) {
-                        ASSERT_FALSE( q.full() );
+                        ASSERT_FALSE( q.full());
                         ASSERT_CONTAINER_SIZE( q, nArrCount * nArrSize );
                         for ( size_t i = nArrCount * nArrSize; i < nSize; ++i ) {
-                            ASSERT_TRUE( q.push( &i, 1, func_push ) );
+                            ASSERT_TRUE( q.push( &i, 1, func_push ));
                         }
                     }
-                    ASSERT_TRUE( q.full() );
+                    ASSERT_TRUE( q.full());
                     ASSERT_CONTAINER_SIZE( q, nSize );
 
                     value_type cur = 0;
-                    while ( !q.empty() ) {
+                    while ( !q.empty()) {
                         value_type* front = q.front();
                         ASSERT_TRUE( front != nullptr );
                         ASSERT_EQ( cur, *front );
-                        ASSERT_TRUE( q.pop_front() );
+                        ASSERT_TRUE( q.pop_front());
                         cur += 10;
                     }
 
-                    ASSERT_TRUE( q.empty() );
+                    ASSERT_TRUE( q.empty());
                     ASSERT_TRUE( q.front() == nullptr );
-                    ASSERT_FALSE( q.pop_front() );
+                    ASSERT_FALSE( q.pop_front());
                 }
             }
         }
@@ -202,10 +202,10 @@ namespace {
         {
             size_t const capacity = q.capacity();
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
             ASSERT_TRUE( q.front().first == nullptr );
-            ASSERT_FALSE( q.pop_front() );
+            ASSERT_FALSE( q.pop_front());
 
             size_t total_push = 0;
             uint8_t chfill = 0;
@@ -227,14 +227,14 @@ namespace {
                 for ( size_t i = 0; i < pair.second; ++i )
                     ASSERT_EQ( *reinterpret_cast<uint8_t*>( pair.first ), chfill );
 
-                ASSERT_TRUE( q.pop_front() );
-                ASSERT_FALSE( q.pop_front() );
+                ASSERT_TRUE( q.pop_front());
+                ASSERT_FALSE( q.pop_front());
             }
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
             ASSERT_TRUE( q.front().first == nullptr );
-            ASSERT_FALSE( q.pop_front() );
+            ASSERT_FALSE( q.pop_front());
         }
     };
 
@@ -320,4 +320,4 @@ namespace {
         test_varsize_buffer( q );
     }
 
-} // namespace
\ No newline at end of file
+} // namespace
index 08cfbf5b9d6aae3218c0ceef9728e92f76ef7be2..20be60ba5b9ff9787e034e458c27c7b49513c946 100644 (file)
@@ -148,9 +148,9 @@ namespace cds_test {
 
             // erase_at()
             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 );
 
             for ( auto it = s.begin(); it != s.end(); ++it ) {
@@ -158,7 +158,7 @@ namespace cds_test {
                 EXPECT_FALSE( s.erase_at( it ));
             }
 
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0 );
         }
 
index 2b558fcd75921c3703ffc6d89e56bb70a78f234d..96a07802152e73f1d48b735ed7d0e17de1907e0d 100644 (file)
@@ -148,9 +148,9 @@ namespace cds_test {
 
             // erase_at()
             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 );
 
             for ( auto it = s.begin(); it != s.end(); ++it ) {
@@ -158,7 +158,7 @@ namespace cds_test {
                 EXPECT_FALSE( s.erase_at( it ));
             }
 
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0 );
         }