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 cc676cf..237f63c 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:
             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.
               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.
               at runtime to tune the back-off strategy.
 
             You may use \p Traits template parameter to separate back-off implementations.
index ca9bcf7..b102bfe 100644 (file)
@@ -44,18 +44,18 @@ namespace cds { namespace algo {
             /// 32bit
             uint32_t operator()( uint32_t x ) const
             {
             /// 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
             {
             }
 
             /// 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 ) |
                 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
             {
             }
 
             /// 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 )
             {
             //@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 )
             }
 
             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 )
             {
             // 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 )
             {
             }
 
             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 )
             {
             }
 
             /// 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 )
             {
             }
 
             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
 
             }
             //@endcond
 
index 8a4a567..680a215 100644 (file)
@@ -252,7 +252,7 @@ namespace cds { namespace algo { namespace flat_combining {
                             return true;
                         }
 
                             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;
                     }
                         m_wakeup = false;
                         return ret;
                     }
@@ -334,7 +334,7 @@ namespace cds { namespace algo { namespace flat_combining {
                             return true;
                         }
 
                             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;
                     }
                         m_wakeup = false;
                         return ret;
                     }
@@ -411,7 +411,7 @@ namespace cds { namespace algo { namespace flat_combining {
                             return true;
                         }
 
                             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;
                     }
                         rec.m_wakeup = false;
                         return ret;
                     }
index bdcc158..ef4909e 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 )
     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 )
             , 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  )
         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 )
         {}
 
             , last_( first_ + c_bitstring_size )
         {}
 
@@ -104,7 +104,7 @@ namespace cds { namespace algo {
         */
         uint_type cut( unsigned count )
         {
         */
         uint_type cut( unsigned count )
         {
-            assert( !eos() );
+            assert( !eos());
 
             uint_type result = 0;
 #       if defined( CDS_ARCH_LITTLE_ENDIAN )
 
             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 )
     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 )
         {}
             , 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 )
         /// 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 )));
             , 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 )
         {
         */
         uint_type cut( unsigned count )
         {
-            assert( !eos() );
-            assert( is_correct( count ) );
+            assert( !eos());
+            assert( is_correct( count ));
 
             uint_type result = 0;
 
 
             uint_type result = 0;
 
@@ -379,7 +379,7 @@ namespace cds { namespace algo {
         */
         int_type cut( unsigned count )
         {
         */
         int_type cut( unsigned count )
         {
-            assert( !eos() );
+            assert( !eos());
             assert( is_correct( count ));
 
             int_type result = ( number_ >> shift_ ) & (( 1 << count ) - 1 );
             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 )
         {
         */
         int_type safe_cut( unsigned count )
         {
-            if ( eos() )
+            if ( eos())
                 return 0;
 
                 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;
             if ( rest < count )
                 count = rest;
             return count ? cut( count ) : 0;
index 3d419f4..18178c8 100644 (file)
 // Sanitizer attributes
 // Example: CDS_DISABLE_SANITIZE( "function" )
 #ifdef CDS_ADDRESS_SANITIZER_ENABLED
 // 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
 #else
 #   define CDS_SUPPRESS_SANITIZE( ... )
 #endif
index 35aa7de..c8aaf83 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
 // 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
 // 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 c622234..be4e3a5 100644 (file)
@@ -214,7 +214,7 @@ namespace cds { namespace container {
                         return pMem;
                     }
                     else
                         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;
                 }
 
                     return pMem;
                 }
index ff1f087..d1e2d9f 100644 (file)
@@ -1349,7 +1349,7 @@ namespace cds { namespace container {
 
                     if ( !pChild ) {
                         // Found min/max
 
                     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 )
                             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;
 
                     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 );
                     }
                         // 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 );
             }
                 // rotate right
                 return rotate_right_locked( pParent, pNode, pLeft, hR, hLL, pLRight, hLR );
             }
-            
+
             return pNode; // retry
         }
 
             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;
                     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 );
                 }
 
                         return rotate_left_over_right_locked( pParent, pNode, hL, pRight, pRLeft, hRR, hRLR );
                 }
 
index 9f851f6..912ae81 100644 (file)
@@ -688,7 +688,7 @@ namespace cds { namespace container {
         erase_at( Iterator const& iter )
 #endif
         {
         erase_at( Iterator const& iter )
 #endif
         {
-            assert( iter != end() );
+            assert( iter != end());
             assert( iter.bucket() != nullptr );
 
             if ( iter.bucket()->erase_at( iter.underlying_iterator())) {
             assert( iter.bucket() != nullptr );
 
             if ( iter.bucket()->erase_at( iter.underlying_iterator())) {
index fb23c44..32fddca 100644 (file)
@@ -584,7 +584,7 @@ namespace cds { namespace container {
         erase_at( Iterator const& iter )
 #endif
         {
         erase_at( Iterator const& iter )
 #endif
         {
-            assert( iter != end() );
+            assert( iter != end());
             assert( iter.bucket() != nullptr );
 
             if ( iter.bucket()->erase_at( iter.underlying_iterator())) {
             assert( iter.bucket() != nullptr );
 
             if ( iter.bucket()->erase_at( iter.underlying_iterator())) {
index cf02132..0198c03 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.
 
         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.
         \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];
             \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 );
                 });
                 []( 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 )
         {
         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 );
 
             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 );
 
             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 );
 
         {
             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 );
 
             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 );
 
         {
             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 );
 
             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 )
         {
         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 );
 
             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 );
 
             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 );
         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 );
 
             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 );
         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 );
 
             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 );
         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 );
 
             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;
         void clear()
         {
             value_type v;
-            while ( pop( v ) );
+            while ( pop( v ));
         }
 
         /// Checks if the ring-buffer is empty
         }
 
         /// Checks if the ring-buffer is empty
@@ -668,7 +668,7 @@ namespace cds { namespace container {
 
         /// [producer] Reserve \p size bytes
         /**
 
         /// [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():
             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
             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 );
 
             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 );
 
             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
             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;
 
                 *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;
 
             // 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
         }
 
         /// [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 );
 
             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 );
         }
 
             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 );
         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 )) {
                 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
                     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 );
 
             size_t size = *reinterpret_cast<size_t*>( buf );
-            if ( is_tail( size ) ) {
+            if ( is_tail( size )) {
                 // unused tail, skip
                 // 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 );
 
 
                 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
             }
 
 #ifdef _DEBUG
@@ -896,18 +896,18 @@ namespace cds { namespace container {
         bool pop_front()
         {
             counter_type front = front_.load( memory_model::memory_order_relaxed );
         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 );
                 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
                     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 ));
 
             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()
         {
         /// [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();
         }
 
                 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 );
             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;
         }
 
             return real_size;
         }
@@ -979,7 +979,7 @@ namespace cds { namespace container {
 
         static size_t untail( size_t size )
         {
 
         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
 
         }
         //@endcond
 
index 187c4ff..047e00f 100644 (file)
@@ -46,11 +46,11 @@ namespace cds {
         throws the \p exception.
 
         If exception is disabled, \p %throw_exception() prints an exception message to
         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
 
         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.
 
         @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 )
     {
     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
         abort();
     }
 #endif
index be18067..3beea93 100644 (file)
@@ -85,7 +85,7 @@ namespace cds { namespace gc { namespace hp { namespace common {
         template <typename T>
         T* get_as() const noexcept
         {
         template <typename T>
         T* get_as() const noexcept
         {
-            return reinterpret_cast<T*>( get() );
+            return reinterpret_cast<T*>( get());
         }
 
         template <typename T>
         }
 
         template <typename T>
@@ -130,7 +130,7 @@ namespace cds { namespace gc { namespace hp { namespace common {
 
         guard* operator[]( size_t idx ) const noexcept
         {
 
         guard* operator[]( size_t idx ) const noexcept
         {
-            assert( idx < capacity() );
+            assert( idx < capacity());
             return arr_[idx];
         }
 
             return arr_[idx];
         }
 
@@ -145,7 +145,7 @@ namespace cds { namespace gc { namespace hp { namespace common {
 
         void clear( size_t idx ) noexcept
         {
 
         void clear( size_t idx ) noexcept
         {
-            assert( idx < capacity() );
+            assert( idx < capacity());
             assert( arr_[idx] != nullptr );
 
             arr_[idx]->clear();
             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
         {
 
         guard* release( size_t idx ) noexcept
         {
-            assert( idx < capacity() );
+            assert( idx < capacity());
 
             guard* g = arr_[idx];
             arr_[idx] = nullptr;
 
             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
         {
 
         void reset( size_t idx, guard* g ) noexcept
         {
-            assert( idx < capacity() );
+            assert( idx < capacity());
             assert( arr_[idx] == nullptr );
 
             arr_[idx] = g;
             assert( arr_[idx] == nullptr );
 
             arr_[idx] = g;
index d9dbf11..5772cc9 100644 (file)
@@ -107,7 +107,7 @@ namespace cds { namespace gc {
 
         //@cond
         /// Per-thread hazard pointer storage
 
         //@cond
         /// Per-thread hazard pointer storage
-        class thread_hp_storage 
+        class thread_hp_storage
         {
             friend class smr;
         public:
         {
             friend class smr;
         public:
@@ -326,13 +326,13 @@ namespace cds { namespace gc {
             {
                 assert( current_block_ != nullptr );
                 assert( current_block_->first() <= current_cell_ );
             {
                 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_ );
 
                 //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_;
                     // 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 repush( retired_ptr* p ) CDS_NOEXCEPT
-            {                
+            {
                 bool ret = push( *p );
                 CDS_HPSTAT( --retire_call_count_ );
                 assert( ret );
                 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( 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 );
 
                 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 =
                     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;
             }
         };
                     retired_extend_count = 0;
             }
         };
@@ -517,7 +517,7 @@ namespace cds { namespace gc {
                 assert( instance_ != nullptr );
 #       else
                 if ( !instance_ )
                 assert( instance_ != nullptr );
 #       else
                 if ( !instance_ )
-                    CDS_THROW_EXCEPTION( not_initialized() );
+                    CDS_THROW_EXCEPTION( not_initialized());
 #       endif
                 return *instance_;
             }
 #       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
         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
             {}
 
             /// 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 )
             {
             template <typename T>
             T protect( size_t nIndex, atomics::atomic<T> const& toGuard )
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
 
                 T pRet;
                 do {
 
                 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 )
             {
             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 {
 
                 T pRet;
                 do {
@@ -1031,7 +1031,7 @@ namespace cds { namespace gc {
             template <typename T>
             T * assign( size_t nIndex, T * p )
             {
             template <typename T>
             T * assign( size_t nIndex, T * p )
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
 
                 guards_.set( nIndex, p );
                 dhp::smr::tls()->sync();
 
                 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
             {
             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
             {
                 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();
             }
 
                 return guards_[nIndex]->get();
             }
 
@@ -1238,14 +1238,14 @@ namespace cds { namespace gc {
             value_type * operator ->() const CDS_NOEXCEPT
             {
                 assert( !empty());
             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());
             }
 
             /// 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
             }
 
             /// 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();
         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 );
         }
 
                 dhp::smr::instance().scan( rec );
         }
 
@@ -1456,7 +1456,7 @@ namespace cds { namespace gc {
         */
         static void scan()
         {
         */
         static void scan()
         {
-            dhp::smr::instance().scan( dhp::smr::tls() );
+            dhp::smr::instance().scan( dhp::smr::tls());
         }
 
         /// Synonym for \p scan()
         }
 
         /// Synonym for \p scan()
index ba57dca..75e8953 100644 (file)
@@ -153,7 +153,7 @@ namespace cds { namespace gc {
 #       ifdef CDS_DISABLE_SMR_EXCEPTION
                 assert( !full());
 #       else
 #       ifdef CDS_DISABLE_SMR_EXCEPTION
                 assert( !full());
 #       else
-                if ( full() )
+                if ( full())
                     CDS_THROW_EXCEPTION( not_enought_hazard_ptr());
 #       endif
                 guard* g = free_head_;
                     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
             {
 
             void free( guard* g ) CDS_NOEXCEPT
             {
-                assert( g >= array_ && g < array_ + capacity() );
+                assert( g >= array_ && g < array_ + capacity());
 
                 if ( g ) {
                     g->clear();
 
                 if ( g ) {
                     g->clear();
@@ -220,7 +220,7 @@ namespace cds { namespace gc {
 
             guard& operator[]( size_t idx )
             {
 
             guard& operator[]( size_t idx )
             {
-                assert( idx < capacity() );
+                assert( idx < capacity());
 
                 return array_[idx];
             }
 
                 return array_[idx];
             }
@@ -393,8 +393,8 @@ namespace cds { namespace gc {
 
         /// \p smr::scan() strategy
         enum scan_type {
 
         /// \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
         };
 
         //@cond
@@ -521,7 +521,7 @@ namespace cds { namespace gc {
 #       ifdef CDS_DISABLE_SMR_EXCEPTION
                     assert( false );    // not enough hazard ptr
 #       else
 #       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
                 }
             }
 #       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()
                 @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
             {}
 
             /// 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 )
             {
             template <typename T>
             T * assign( size_t nIndex, T * p )
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
 
                 guards_.set( nIndex, p );
                 hp::smr::tls()->sync();
 
                 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
             {
             template <typename T>
             T * get( size_t nIndex ) const
             {
-                assert( nIndex < capacity() );
+                assert( nIndex < capacity());
                 return guards_[nIndex]->template get_as<T>();
             }
 
                 return guards_[nIndex]->template get_as<T>();
             }
 
index 60b00a6..5cf7bcf 100644 (file)
@@ -650,7 +650,7 @@ namespace cds { namespace intrusive {
 
             bool expand_slot( traverse_data& pos, node_ptr current)
             {
 
             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());
             }
 
                 return expand_slot( pos.pArr, pos.nSlot, current, pos.splitter.bit_offset());
             }
 
@@ -671,7 +671,7 @@ namespace cds { namespace intrusive {
                     return false;
                 }
 
                     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);
 
                     static_cast<unsigned>( m_Metrics.array_node_size_log ));
                 pArr->nodes[idx].store(current, memory_model::memory_order_release);
 
index e2f4d52..89371d5 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>
                 \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.
 
 
             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 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
                 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 ce7c299..8f2f0ed 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 ( 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();
                     }
                 }
                         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 ) {
                     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();
                         }
                     }
                             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 );
 
                     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 );
                     }
 
                     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 );
             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();
             }
 
                 return new(p) aux_node_segment();
             }
 
index 97ffde6..2919d96 100644 (file)
@@ -599,7 +599,7 @@ namespace cds { namespace intrusive {
         }
         static void free_update_desc_void( void* pDesc )
         {
         }
         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
         }
 
         class retired_list
index 68f4c66..95f1888 100644 (file)
@@ -640,7 +640,7 @@ namespace cds { namespace intrusive {
                         return false;
                     }
 
                         return false;
                     }
 
-                    if ( !pos.splitter.eos() ) {
+                    if ( !pos.splitter.eos()) {
                         // the slot must be expanded
                         base_class::expand_slot( pos, slot );
                     }
                         // the slot must be expanded
                         base_class::expand_slot( pos, slot );
                     }
@@ -1219,7 +1219,7 @@ namespace cds { namespace intrusive {
                     }
 
                     if ( bInsert ) {
                     }
 
                     if ( bInsert ) {
-                        if ( !pos.splitter.eos() ) {
+                        if ( !pos.splitter.eos()) {
                             // the slot must be expanded
                             base_class::expand_slot( pos, slot );
                         }
                             // the slot must be expanded
                             base_class::expand_slot( pos, slot );
                         }
index f9f5b2a..baa1bcb 100644 (file)
@@ -597,12 +597,12 @@ namespace cds { namespace intrusive {
         */
         bool erase_at( iterator const& iter )
         {
         */
         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;
                 --m_ItemCounter;
-                retire_data( val.ptr() );
+                retire_data( val.ptr());
                 m_Stat.onEraseSuccess();
                 return true;
             }
                 m_Stat.onEraseSuccess();
                 return true;
             }
index c1daccf..fe2c2f9 100644 (file)
@@ -640,7 +640,7 @@ namespace cds { namespace intrusive {
         erase_at( Iterator const& iter )
 #endif
         {
         erase_at( Iterator const& iter )
 #endif
         {
-            assert( iter != end() );
+            assert( iter != end());
             assert( iter.bucket() != nullptr );
 
             if ( iter.bucket()->erase_at( iter.underlying_iterator())) {
             assert( iter.bucket() != nullptr );
 
             if ( iter.bucket()->erase_at( iter.underlying_iterator())) {
index 1eadcfe..691a089 100644 (file)
@@ -862,7 +862,7 @@ namespace cds { namespace intrusive {
         erase_at( Iterator const& iter )
 #endif
         {
         erase_at( Iterator const& iter )
 #endif
         {
-            assert( iter != end() );
+            assert( iter != end());
 
             if ( m_List.erase_at( iter.underlying_iterator())) {
                 --m_ItemCounter;
 
             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
                 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
             }
                 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
         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
 
             p->m_busy.store( false, atomics::memory_order_release );
 #       endif
 
index 00ab867..30d41fc 100644 (file)
@@ -425,7 +425,7 @@ namespace cds { namespace intrusive {
 
             scoped_resize_lock al( m_MutexPolicy );
             if ( al.success()) {
 
             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;
                 }
                     // someone resized already
                     return;
                 }
@@ -443,7 +443,7 @@ namespace cds { namespace intrusive {
             , m_nBucketMask( c_nMinimalCapacity - 1 )
             , m_MutexPolicy( c_nMinimalCapacity )
         {
             , m_nBucketMask( c_nMinimalCapacity - 1 )
             , m_MutexPolicy( c_nMinimalCapacity )
         {
-            alloc_bucket_table( bucket_count() );
+            alloc_bucket_table( bucket_count());
         }
 
         /// Ctor with initial capacity specified
         }
 
         /// Ctor with initial capacity specified
@@ -452,9 +452,9 @@ namespace cds { namespace intrusive {
         )
             : m_Buckets( nullptr )
             , m_nBucketMask( calc_init_capacity(nCapacity) - 1 )
         )
             : 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)
         }
 
         /// 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_Buckets( nullptr )
         , m_nBucketMask( ( nCapacity ? calc_init_capacity(nCapacity) : c_nMinimalCapacity ) - 1 )
-        , m_MutexPolicy( bucket_count() )
+        , m_MutexPolicy( bucket_count())
         , m_ResizingPolicy( resizingPolicy )
         {
         , m_ResizingPolicy( resizingPolicy )
         {
-            alloc_bucket_table( bucket_count() );
+            alloc_bucket_table( bucket_count());
         }
 
         /// Ctor with resizing policy (move semantics)
         }
 
         /// 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_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 ))
         {
         , m_ResizingPolicy( std::forward<resizing_policy>( resizingPolicy ))
         {
-            alloc_bucket_table( bucket_count() );
+            alloc_bucket_table( bucket_count());
         }
 
         /// Destructor destroys internal data
         ~StripedSet()
         {
         }
 
         /// Destructor destroys internal data
         ~StripedSet()
         {
-            free_bucket_table( m_Buckets, bucket_count() );
+            free_bucket_table( m_Buckets, bucket_count());
         }
 
     public:
         }
 
     public:
index 8f9ce5d..432a7f0 100644 (file)
@@ -511,7 +511,7 @@ namespace cds { namespace memory {
                 }
 
                 // The pool is empty
                 }
 
                 // The pool is empty
-                CDS_THROW_EXCEPTION( std::bad_alloc() );
+                CDS_THROW_EXCEPTION( std::bad_alloc());
             }
 
         ok:
             }
 
         ok:
index 1dd06d7..0be7b72 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 )
                 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;
             }
                 assert( cds::details::is_aligned( p, nAlign ));
                 return p;
             }
index f42d5eb..f3a9158 100644 (file)
@@ -371,7 +371,7 @@ namespace cds {
             /// Unlock the spin-lock
             void unlock() CDS_NOEXCEPT
             {
             /// 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 )
 
                 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
             {
             /// 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;
                 assert( newOwnerId != OS::c_NullThreadId );
 
                 m_OwnerId = newOwnerId;
index a00dda8..be5f5d1 100644 (file)
@@ -78,14 +78,14 @@ namespace cds { namespace threading {
                 static void init()
                 {
                     pthread_error_code  nErr;
                 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;
                         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" ));
                 }
 
                         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;
                 {
                     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()
                         CDS_THROW_EXCEPTION( pthread_exception( nErr, "pthread_setspecific" ));
                 }
                 static void free()
@@ -205,7 +205,7 @@ namespace cds { namespace threading {
                 assert( pData );
 
                 if ( pData ) {
                 assert( pData );
 
                 if ( pData ) {
-                    if ( pData->fini() )
+                    if ( pData->fini())
                         _threadData( do_detachThread );
                 }
                 else
                         _threadData( do_detachThread );
                 }
                 else
index d41d1b8..a7d6e9d 100644 (file)
@@ -78,7 +78,7 @@ namespace cds { namespace threading {
                 static void init()
                 {
                     if ( m_key == TLS_OUT_OF_INDEXES ) {
                 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" ));
                     }
                 }
                             CDS_THROW_EXCEPTION( api_exception( ::GetLastError(), "TlsAlloc" ));
                     }
                 }
@@ -96,7 +96,7 @@ namespace cds { namespace threading {
                 {
                     api_error_code  nErr;
                     void * pData = ::TlsGetValue( m_key );
                 {
                     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 );
                 }
                         CDS_THROW_EXCEPTION( api_exception( nErr, "TlsGetValue" ));
                     return reinterpret_cast<ThreadData *>( pData );
                 }
index fa8cf8a..b8173c4 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
         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
         // are failed even in single-threaded mode (unit tests) without magic compiler barrier below
         CDS_COMPILER_RW_BARRIER;
 #endif
index ac8ec62..27014fc 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;
         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 ));
         }
 
             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()
     {
 
     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 );
         }
             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];
             // 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;
         }
 
         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_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 );
 
         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;
         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(
 
         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
         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;
             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;
         }
                 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
         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 );
             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();
         }
 
         hprec->hazards_.init();
@@ -342,7 +342,7 @@ namespace cds { namespace gc { namespace dhp {
         scan( pRec );
         help_scan( pRec );
 
         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 );
         }
             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_ );
 
             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 = 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 );
                 }
                 {
                     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
             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;
 
         // 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
         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 )
     {
             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();
         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 == 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;
                 CDS_TSAN_ANNOTATE_IGNORE_READS_BEGIN;
-                assert( hprec->retired_.empty() );
+                assert( hprec->retired_.empty());
                 CDS_TSAN_ANNOTATE_IGNORE_READS_END;
                 continue;
             }
                 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 ) {
             {
                 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
                         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 ) {
             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 );
                 }
 
                         scan( pThis );
                 }
 
@@ -515,7 +515,7 @@ namespace cds { namespace gc { namespace dhp {
     {
         st.clear();
 #   ifdef CDS_ENABLE_HPSTAT
     {
         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;
         {
             CDS_TSAN_ANNOTATE_IGNORE_READS_BEGIN;
             ++st.thread_rec_count;
index 616ea59..44ec31b 100644 (file)
@@ -63,12 +63,12 @@ namespace cds { namespace gc { namespace hp {
 
             static T* allocate( size_t nCount )
             {
 
             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*/ )
             {
             }
 
             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_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 );
 
         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 );
         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;
     }
 
         return hprec;
     }
@@ -410,7 +410,7 @@ namespace cds { namespace gc { namespace hp {
         }
 
         // Sort plist to simplify search in
         }
 
         // 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_;
 
         // 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 ) {
             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;
                     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 )
     {
 
     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_ );
 
 
         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 ) {
             {
                 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
                         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_;
             // 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();
 
             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
     {
         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;
         {
             CDS_TSAN_ANNOTATE_IGNORE_READS_BEGIN;
             ++st.thread_rec_count;
index 2824f2c..5af0714 100644 (file)
@@ -40,19 +40,19 @@ namespace cds { namespace threading {
     CDS_EXPORT_API void ThreadData::init()
     {
         if ( m_nAttachCount++ == 0 ) {
     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();
                 cds::gc::hp::smr::attach_thread();
-            if ( cds::gc::DHP::isUsed() )
+            if ( cds::gc::DHP::isUsed())
                 cds::gc::dhp::smr::attach_thread();
 
                 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();
                 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();
                 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
                 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
         }
                 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 ) {
     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();
                 cds::gc::dhp::smr::detach_thread();
-            if ( cds::gc::HP::isUsed() )
+            if ( cds::gc::HP::isUsed())
                 cds::gc::hp::smr::detach_thread();
 
                 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;
             }
                 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;
             }
                 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
                 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;
             }
                 cds::urcu::details::singleton<cds::urcu::signal_buffered_tag>::detach_thread( m_pSHBRCU );
                 m_pSHBRCU = nullptr;
             }
index 14628f9..5def35c 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
 #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 4159bd7..6c8baf0 100644 (file)
@@ -24,11 +24,11 @@ namespace fc_test {
         template <typename C, void (C::*) (size_t)> class selector
         {};
 
         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:
         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>
     };
 
     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())));
         }
 
                 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);
         }
         {
             set_array_size(new_size);
         }
index ee8bcf9..4544d1c 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_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
             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 b8fff4e..01b0d6e 100644 (file)
@@ -123,8 +123,8 @@ namespace map {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 } // namespace map
index 098c54b..236bb97 100644 (file)
@@ -123,9 +123,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 
 } // namespace map
index 1f47bd9..b231886 100644 (file)
@@ -200,9 +200,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 
 
 #endif
 
 
index 15983f5..4bef9ea 100644 (file)
@@ -127,9 +127,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 
 } // namespace map
index 3c40b57..2b333b2 100644 (file)
@@ -112,9 +112,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 
 } // namespace map
index a067cb9..e6a282b 100644 (file)
@@ -183,9 +183,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 
 } // namespace map
index a846bdf..d2fe73f 100644 (file)
@@ -135,9 +135,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 
 } // namespace map
index 1f227e1..ffb6cd5 100644 (file)
@@ -109,9 +109,9 @@ namespace map {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 
 } // namespace map
index 89a1857..cceb358 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 ) {
                     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;
                                 ++m_nDeleteSuccess;
                             else
                                 ++m_nDeleteFailed;
index 61bb8a1..6958d72 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 );
                     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:
             }
 
         public:
@@ -118,7 +118,7 @@ namespace map {
 
                 for ( size_t nPass = 0; nPass < s_nPassCount; ++nPass ) {
                     for ( key_type key : m_arr ) {
 
                 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 )
                             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;;
                 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 );
 
                 for ( key_type key : arr )
                     testMap.insert( key, key );
index b30e398..777736b 100644 (file)
@@ -518,11 +518,11 @@ namespace {
 
     INSTANTIATE_TEST_CASE_P( SQ,
         intrusive_segmented_queue_push_pop,
 
     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,
 #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
 
 
 #endif
 
 
index af86b83..499309a 100644 (file)
@@ -248,11 +248,11 @@ namespace {
     }
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_pop,
     }
     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,
 #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
 
 
 #endif
 
 
index 5840f33..fb28614 100644 (file)
@@ -251,11 +251,11 @@ namespace {
     }
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_push,
     }
     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,
 #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
 
 
 #endif
 
 
index 060629f..14b0276 100644 (file)
@@ -430,11 +430,11 @@ namespace {
     }
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_push_pop,
     }
     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,
 #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
 #endif
 
 } // namespace
index 75ca671..7c5dea9 100644 (file)
@@ -334,7 +334,7 @@ namespace {
 #else
     INSTANTIATE_TEST_CASE_P( SQ,
         segmented_queue_random,
 #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
 #endif
 
 } // namespace
index 32ca2d5..55b9e71 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 ) {
                             ++m_nPopFrontFailed;
                     }
                     else {
                         ++m_nPopEmpty;
                         if ( s_nProducerDone.load() != 0 ) {
-                            if ( m_Queue.empty() )
+                            if ( m_Queue.empty())
                                 break;
                         }
                     }
                                 break;
                         }
                     }
index 3a0119d..4fa440a 100644 (file)
@@ -79,7 +79,7 @@ namespace {
                 m_nPushFailed = 0;
 
                 for ( value_type v = 0; v < nPushCount; ++v ) {
                 m_nPushFailed = 0;
 
                 for ( value_type v = 0; v < nPushCount; ++v ) {
-                    if ( !m_Queue.push( v ) ) {
+                    if ( !m_Queue.push( v )) {
                         ++m_nPushFailed;
                         --v;
                     }
                         ++m_nPushFailed;
                         --v;
                     }
index 0c27a31..b207932 100644 (file)
@@ -54,7 +54,7 @@ namespace queue {
         }
 
         bool push( const T& data )
         }
 
         bool push( const T& data )
-        { 
+        {
             return enqueue( data );
         }
 
             return enqueue( data );
         }
 
@@ -70,7 +70,7 @@ namespace queue {
         }
 
         bool pop( T& data )
         }
 
         bool pop( T& data )
-        { 
+        {
             return dequeue( data );
         }
 
             return dequeue( data );
         }
 
index 0557909..283f441 100644 (file)
@@ -125,9 +125,9 @@ namespace set {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 
 } // namespace set
index 7243bab..0835a47 100644 (file)
@@ -124,8 +124,8 @@ namespace set {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 } // namespace set
index 1b9296c..f0b5a7b 100644 (file)
@@ -128,9 +128,9 @@ namespace set {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 
 } // namespace set
index deddcf2..9c12045 100644 (file)
@@ -115,8 +115,8 @@ namespace set {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 } // namespace set
index 03f61d0..dee00c9 100644 (file)
@@ -119,10 +119,10 @@ namespace set {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 
 #endif
 
-    
+
 } // namespace set
 } // namespace set
index c549af5..d531967 100644 (file)
@@ -109,8 +109,8 @@ namespace set {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 } // namespace set
index b41eb7d..5c8fc46 100644 (file)
@@ -119,8 +119,8 @@ namespace set {
     {
         return std::to_string( p.param );
     }
     {
         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
 #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
 #endif
 } // namespace set
index d9fcbbd..22ef14b 100644 (file)
@@ -47,7 +47,7 @@ namespace set {
     {
         typedef cc::FeldmanHashSet< GC, T, Traits > base_class;
 
     {
         typedef cc::FeldmanHashSet< GC, T, Traits > base_class;
 
-        
+
         template <typename GC2>
         struct get_extracted_ptr
         {
         template <typename GC2>
         struct get_extracted_ptr
         {
index 4cf8ab7..6c49b30 100644 (file)
@@ -535,15 +535,15 @@ namespace cds_test {
                 EXPECT_EQ( it->nKey, key );
                 EXPECT_EQ( ( *it ).nKey, key );
 
                 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_EQ( it->nKey, key );
                 EXPECT_EQ( ( *it ).nKey, key );
 
-                EXPECT_FALSE( l.erase_at( it ) );
+                EXPECT_FALSE( l.erase_at( it ));
                 ++key;
             }
                 ++key;
             }
-            EXPECT_TRUE( l.empty() );
+            EXPECT_TRUE( l.empty());
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             List::gc::force_dispose();
             EXPECT_CONTAINER_SIZE( l, 0 );
 
             List::gc::force_dispose();
index 0a892cb..3f5f40a 100644 (file)
@@ -155,14 +155,14 @@ namespace cds_test {
             // erase_at() test
             for ( auto& i : data ) {
                 i.nDisposeCount = 0;
             // 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 ));
             }
             }
 
             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
             ASSERT_CONTAINER_SIZE( s, 0 );
 
             // Force retiring cycle
index 36b93af..c5c8603 100644 (file)
@@ -136,15 +136,15 @@ namespace cds_test {
 
             // erase_at()
             for ( auto const& i : arrKeys )
 
             // 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_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 );
         }
     };
             EXPECT_CONTAINER_SIZE( m, 0u );
         }
     };
index 2c1eb10..191dd03 100644 (file)
@@ -67,7 +67,7 @@ namespace {
         {
             Algo f;
             for ( auto i : arr_ ) {
         {
             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 1f99d51..c17702a 100644 (file)
@@ -32,7 +32,7 @@
 #include <cds/algo/atomic.h>
 #include "cxx11_convert_memory_order.h"
 
 #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
 
 namespace {
     class cxx11_atomic_class: public ::testing::Test
index 8702d83..23e97e6 100644 (file)
@@ -55,24 +55,24 @@ namespace {
             size_t res;
 
             // Trivial case
             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_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 );
             EXPECT_EQ( splitter.safe_cut( sizeof( src ) * 8 ), 0u );
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
             splitter.reset();
             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_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 );
             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 );
             ASSERT_TRUE( !splitter );
 
             EXPECT_EQ( *splitter.source(), src );
@@ -154,24 +154,24 @@ namespace {
             size_t res;
 
             // Trivial case
             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_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 );
             EXPECT_EQ( splitter.safe_cut( sizeof( src ) * 8 ), 0u );
-            ASSERT_TRUE( splitter.eos() );
+            ASSERT_TRUE( splitter.eos());
             ASSERT_TRUE( !splitter );
             splitter.reset();
             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_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 );
             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 );
             ASSERT_TRUE( !splitter );
 
             EXPECT_EQ( *splitter.source(), src );
@@ -212,7 +212,7 @@ namespace {
                     ASSERT_FALSE( !splitter );
                     if ( i % 8 == 0 )
                         res = res << 8;
                     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 );
                 }
                 ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
@@ -378,7 +378,7 @@ namespace {
                     ASSERT_FALSE( !splitter );
                     if ( i % 8 == 0 )
                         res = res << 8;
                     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 );
                 }
                 ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
@@ -455,24 +455,24 @@ namespace {
                 split_bitstring splitter( src );
 
                 // Trivial case
                 split_bitstring splitter( src );
 
                 // Trivial case
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 res = splitter.cut( int48_size * 8 );
                 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 );
                 EXPECT_EQ( splitter.safe_cut( int48_size * 8 ), 0u );
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 splitter.reset();
                 ASSERT_TRUE( !splitter );
                 splitter.reset();
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 res = splitter.cut( int48_size * 8 );
                 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 );
                 EXPECT_EQ( splitter.safe_cut( int48_size * 8 ), 0u );
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
             }
 #endif
                 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 );
 
             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 ) {
             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_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 );
             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.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 ) {
                 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;
                     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
                 }
                     res |= static_cast<decltype(res)>( splitter.cut( 1 )) << i;
 #endif
                 }
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 ASSERT_TRUE( !splitter );
-                EXPECT_EQ( res, src.to64() );
+                EXPECT_EQ( res, src.to64());
                 EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
                 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 );
             }
                 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();
             {
                 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 ) {
                     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
                         ASSERT_FALSE( !splitter );
                         int bits = std::rand() % 16;
 #if CDS_BUILD_BITS == 64
@@ -545,11 +545,11 @@ namespace {
 #endif
                         shift += bits;
                     }
 #endif
                         shift += bits;
                     }
-                    ASSERT_TRUE( splitter.eos() );
+                    ASSERT_TRUE( splitter.eos());
                     ASSERT_TRUE( !splitter );
                     ASSERT_TRUE( !splitter );
-                    EXPECT_EQ( res, src.to64() );
+                    EXPECT_EQ( res, src.to64());
                     EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
                     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 );
                 }
                     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
                 split_bitstring splitter( src );
 
                 // Trivial case
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 res = splitter.cut( int48_size * 8 );
                 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 );
                 EXPECT_EQ( splitter.safe_cut( int48_size * 8 ), 0u );
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 splitter.reset();
                 ASSERT_TRUE( !splitter );
                 splitter.reset();
-                ASSERT_FALSE( splitter.eos() );
+                ASSERT_FALSE( splitter.eos());
                 ASSERT_FALSE( !splitter );
                 res = splitter.cut( int48_size * 8 );
                 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 );
                 EXPECT_EQ( splitter.safe_cut( int48_size * 8 ), 0u );
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
             }
 #endif
                 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 );
 
             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 ) {
             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 );
                 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 );
                 }
             }
                     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 );
             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.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 ) {
                 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;
                     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
 #else
-                    res = ( res << 1 ) | static_cast<decltype(res)>( splitter.cut( 1 ) );
+                    res = ( res << 1 ) | static_cast<decltype(res)>( splitter.cut( 1 ));
 #endif
                 }
 #endif
                 }
-                ASSERT_TRUE( splitter.eos() );
+                ASSERT_TRUE( splitter.eos());
                 ASSERT_TRUE( !splitter );
                 ASSERT_TRUE( !splitter );
-                EXPECT_EQ( res, src.to64() );
+                EXPECT_EQ( res, src.to64());
                 EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
                 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 );
             }
                 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();
             {
                 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 ) {
                     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();
                         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
                     }
                         res = ( res << shift ) | static_cast<decltype(res)>( splitter.safe_cut( bits ));
 #endif
                     }
-                    ASSERT_TRUE( splitter.eos() );
+                    ASSERT_TRUE( splitter.eos());
                     ASSERT_TRUE( !splitter );
                     ASSERT_TRUE( !splitter );
-                    EXPECT_EQ( res, src.to64() );
+                    EXPECT_EQ( res, src.to64());
                     EXPECT_EQ( splitter.safe_cut( 8 ), 0u );
                     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 );
                 }
                     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 );
 
             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_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 ) {
 
             unsigned expected = 0x10;
             for ( unsigned i = 0; i < splitter_type::c_bitstring_size; ++i ) {
@@ -702,7 +702,7 @@ namespace {
                 expected += 0x22;
             }
 
                 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 );
             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 );
 
             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_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 ) {
 
             unsigned expected = 0xFE;
             for ( unsigned i = 0; i < splitter_type::c_bitstring_size; ++i ) {
@@ -730,7 +730,7 @@ namespace {
                 expected -= 0x22;
             }
 
                 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 );
             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 )
     {
 
     TEST_F( Split_bitstrig, cut_int48 )
     {
-        if ( is_big_endian() )
+        if ( is_big_endian())
             cut_int48_be();
         else
             cut_int48_le();
             cut_int48_be();
         else
             cut_int48_le();
@@ -807,7 +807,7 @@ namespace {
 
     TEST_F( Split_bitstrig, cut_byte )
     {
 
     TEST_F( Split_bitstrig, cut_byte )
     {
-        if ( is_big_endian() )
+        if ( is_big_endian())
             cut_byte_be();
         else
             cut_byte_le();
             cut_byte_be();
         else
             cut_byte_le();
index 1a05b68..a757749 100644 (file)
@@ -146,7 +146,7 @@ namespace {
 
             const int nSize = 100;
 
 
             const int nSize = 100;
 
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             // enqueue/dequeue
             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_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_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_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
             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_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_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_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_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_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_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_EQ( it.value, nSize * 2 );
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
 
             ASSERT_EQ( q.size(), 0u );
 
-            ASSERT_FALSE( q.dequeue( it ) );
+            ASSERT_FALSE( q.dequeue( it ));
             ASSERT_EQ( it.value, nSize * 2 );
             ASSERT_EQ( it.value, nSize * 2 );
-            ASSERT_TRUE( q.empty() );
+            ASSERT_TRUE( q.empty());
             ASSERT_EQ( q.size(), 0u );
         }
 
             ASSERT_EQ( q.size(), 0u );
         }
 
index 9186771..698b957 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 );
             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_CONTAINER_SIZE( q, i + 1 );
                 }
-                ASSERT_FALSE( q.empty() );
+                ASSERT_FALSE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, nSize );
                 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;
 
                 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_CONTAINER_SIZE( q, nSize - i - 1 );
                 }
-                ASSERT_TRUE( q.empty() );
+                ASSERT_TRUE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, 0 );
             }
 
                 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 );
             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_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_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_CONTAINER_SIZE( q, nSize - i - 1 );
                 }
-                ASSERT_TRUE( q.empty() );
+                ASSERT_TRUE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, 0 );
             }
 
                 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_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
                     else
-                        ASSERT_TRUE( q.push_with( f ) );
+                        ASSERT_TRUE( q.push_with( f ));
                     ASSERT_EQ( it, -1 );
                     ASSERT_CONTAINER_SIZE( q, i + 1 );
                 }
                     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_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
                     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_CONTAINER_SIZE( q, nSize - i - 1 );
                 }
-                ASSERT_TRUE( q.empty() );
+                ASSERT_TRUE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, 0u );
             }
 
                 ASSERT_CONTAINER_SIZE( q, 0u );
             }
 
index fb14502..2023d24 100644 (file)
@@ -45,31 +45,31 @@ namespace {
 
             const size_t nSize = q.capacity();
 
 
             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_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_CONTAINER_SIZE( q, i + 1 );
                 }
-                ASSERT_FALSE( q.empty() );
+                ASSERT_FALSE( q.empty());
                 ASSERT_CONTAINER_SIZE( q, nSize );
                 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 );
 
                 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_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_CONTAINER_SIZE( q, 0 );
 
                 ASSERT_TRUE( q.front() == nullptr );
-                ASSERT_FALSE( q.pop_front() );
+                ASSERT_FALSE( q.pop_front());
             }
         }
     };
             }
         }
     };
index 7718dad..c6eee65 100644 (file)
@@ -58,27 +58,27 @@ namespace {
                             el[k] = static_cast<value_type>( i + k );
 
                         if ( i + nArrSize <= nSize ) {
                             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 {
                         }
                         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 ) {
                     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_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;
                     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;
                         for ( size_t i = 0; i < nArrSize; ++i ) {
                             ASSERT_EQ( el[i], expected );
                             ++expected;
@@ -86,15 +86,15 @@ namespace {
                     }
 
                     if ( nSize % nArrSize == 0 ) {
                     }
 
                     if ( nSize % nArrSize == 0 ) {
-                        ASSERT_TRUE( q.empty() );
+                        ASSERT_TRUE( q.empty());
                     }
                     else {
                     }
                     else {
-                        ASSERT_FALSE( q.empty() );
+                        ASSERT_FALSE( q.empty());
                         ASSERT_CONTAINER_SIZE( q, nSize % nArrSize );
                         q.clear();
                     }
                         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 );
                 }
             }
                     ASSERT_CONTAINER_SIZE( q, 0u );
                 }
             }
@@ -111,28 +111,28 @@ namespace {
                             el[k] = i + k;
 
                         if ( i + nArrSize <= nSize ) {
                             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 {
                         }
                         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 ) {
                     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_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;
                     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;
                         for ( size_t i = 0; i < nArrSize; ++i ) {
                             ASSERT_EQ( el[i], expected );
                             ++expected;
@@ -140,19 +140,19 @@ namespace {
                     }
 
                     if ( nSize % nArrSize == 0 ) {
                     }
 
                     if ( nSize % nArrSize == 0 ) {
-                        ASSERT_TRUE( q.empty() );
+                        ASSERT_TRUE( q.empty());
                     }
                     else {
                     }
                     else {
-                        ASSERT_FALSE( q.empty() );
+                        ASSERT_FALSE( q.empty());
                         ASSERT_CONTAINER_SIZE( q, nSize % nArrSize );
                         size_t v;
                         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_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 );
                 }
 
                     ASSERT_CONTAINER_SIZE( q, 0u );
                 }
 
@@ -163,36 +163,36 @@ namespace {
                             el[k] = i + k;
 
                         if ( i + nArrSize <= nSize ) {
                             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 {
                         }
                         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 ) {
                     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_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;
                     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 );
                         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;
                     }
 
                         cur += 10;
                     }
 
-                    ASSERT_TRUE( q.empty() );
+                    ASSERT_TRUE( q.empty());
                     ASSERT_TRUE( q.front() == nullptr );
                     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();
 
         {
             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_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;
 
             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 );
 
                 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_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 );
     }
 
         test_varsize_buffer( q );
     }
 
-} // namespace
\ No newline at end of file
+} // namespace
index 08cfbf5..20be60b 100644 (file)
@@ -148,9 +148,9 @@ namespace cds_test {
 
             // erase_at()
             for ( auto& i : data ) {
 
             // 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 ) {
             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_FALSE( s.erase_at( it ));
             }
 
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0 );
         }
 
             EXPECT_CONTAINER_SIZE( s, 0 );
         }
 
index 2b558fc..96a0780 100644 (file)
@@ -148,9 +148,9 @@ namespace cds_test {
 
             // erase_at()
             for ( auto& i : data ) {
 
             // 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 ) {
             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_FALSE( s.erase_at( it ));
             }
 
-            EXPECT_TRUE( s.empty() );
+            EXPECT_TRUE( s.empty());
             EXPECT_CONTAINER_SIZE( s, 0 );
         }
 
             EXPECT_CONTAINER_SIZE( s, 0 );
         }