Replace NULL with nullptr
authorkhizmax <libcds.dev@gmail.com>
Sat, 20 Sep 2014 14:00:52 +0000 (18:00 +0400)
committerkhizmax <libcds.dev@gmail.com>
Sat, 20 Sep 2014 14:00:52 +0000 (18:00 +0400)
153 files changed:
.gitignore
cds/algo/backoff_strategy.h
cds/compiler/cxx11_atomic.h
cds/compiler/gcc/amd64/cxx11_atomic.h
cds/compiler/gcc/ia64/cxx11_atomic.h
cds/compiler/gcc/sparc/cxx11_atomic.h
cds/compiler/gcc/x86/cxx11_atomic.h
cds/compiler/vc/amd64/cxx11_atomic.h
cds/compiler/vc/x86/cxx11_atomic.h
cds/container/basket_queue.h
cds/container/cuckoo_map.h
cds/container/cuckoo_set.h
cds/container/ellen_bintree_map_rcu.h
cds/container/ellen_bintree_set_rcu.h
cds/container/lazy_kvlist_impl.h
cds/container/lazy_kvlist_nogc.h
cds/container/lazy_kvlist_rcu.h
cds/container/lazy_list_rcu.h
cds/container/michael_deque.h
cds/container/michael_kvlist_impl.h
cds/container/michael_kvlist_nogc.h
cds/container/michael_kvlist_rcu.h
cds/container/michael_list_impl.h
cds/container/michael_list_nogc.h
cds/container/michael_list_rcu.h
cds/container/michael_map.h
cds/container/michael_map_rcu.h
cds/container/michael_set.h
cds/container/michael_set_rcu.h
cds/container/moir_queue.h
cds/container/msqueue.h
cds/container/optimistic_queue.h
cds/container/skip_list_map_impl.h
cds/container/skip_list_map_nogc.h
cds/container/skip_list_map_rcu.h
cds/container/skip_list_set_impl.h
cds/container/skip_list_set_nogc.h
cds/container/skip_list_set_rcu.h
cds/container/split_list_map_rcu.h
cds/container/split_list_set_rcu.h
cds/container/tsigas_cycle_queue.h
cds/details/bitop_generic.h
cds/details/functor_wrapper.h
cds/gc/details/retired_ptr.h
cds/gc/guarded_ptr.h
cds/gc/hp_decl.h
cds/gc/hrc/hrc.h
cds/gc/hzp/details/hp_alloc.h
cds/gc/hzp/hzp.h
cds/gc/ptb/ptb.h
cds/gc/ptb_decl.h
cds/intrusive/basket_queue.h
cds/intrusive/cuckoo_set.h
cds/intrusive/ellen_bintree_rcu.h
cds/intrusive/lazy_list_base.h
cds/intrusive/lazy_list_nogc.h
cds/intrusive/lazy_list_rcu.h
cds/intrusive/michael_deque.h
cds/intrusive/michael_list_base.h
cds/intrusive/michael_list_hrc.h
cds/intrusive/michael_list_impl.h
cds/intrusive/michael_list_nogc.h
cds/intrusive/michael_list_rcu.h
cds/intrusive/michael_set_nogc.h
cds/intrusive/michael_set_rcu.h
cds/intrusive/msqueue.h
cds/intrusive/node_traits.h
cds/intrusive/optimistic_queue.h
cds/intrusive/options.h
cds/intrusive/single_link_struct.h
cds/intrusive/skip_list_base.h
cds/intrusive/skip_list_hrc.h
cds/intrusive/skip_list_impl.h
cds/intrusive/skip_list_nogc.h
cds/intrusive/skip_list_rcu.h
cds/intrusive/split_list_nogc.h
cds/intrusive/split_list_rcu.h
cds/intrusive/striped_set.h
cds/intrusive/treiber_stack.h
cds/intrusive/tsigas_cycle_queue.h
cds/intrusive/vyukov_mpmc_cycle_queue.h
cds/lock/array.h
cds/memory/michael/allocator.h
cds/opt/value_cleaner.h
cds/os/alloc_aligned.h
cds/os/free_bsd/topology.h
cds/os/posix/alloc_aligned.h
cds/os/posix/thread.h
cds/os/thread.h
cds/os/win/syserror.h
cds/os/win/thread.h
cds/threading/details/_common.h
cds/threading/details/cxx11_manager.h
cds/threading/details/gcc_manager.h
cds/threading/details/msvc_manager.h
cds/threading/details/pthread_manager.h
cds/threading/details/wintls_manager.h
cds/threading/model.h
cds/urcu/details/gp_decl.h
cds/urcu/details/sh.h
cds/urcu/details/sh_decl.h
cds/urcu/exempt_ptr.h
projects/Win/vc12/cds.vcxproj
projects/Win/vc12/cds.vcxproj.filters
src/dllmain.cpp
src/hzp_gc.cpp
src/init.cpp
src/ptb_gc.cpp
src/topology_hpux.cpp
src/topology_osx.cpp
tests/cppunit/cppunit_mini.h
tests/cppunit/test_main.cpp
tests/cppunit/thread.h
tests/test-hdr/deque/hdr_intrusive_deque.h
tests/test-hdr/map/hdr_map.h
tests/test-hdr/map/hdr_skiplist_map.h
tests/test-hdr/map/hdr_skiplist_map_rcu.h
tests/test-hdr/misc/allocator_test.cpp
tests/test-hdr/ordered_list/hdr_intrusive_lazy.h
tests/test-hdr/ordered_list/hdr_intrusive_michael.h
tests/test-hdr/ordered_list/hdr_lazy.h
tests/test-hdr/ordered_list/hdr_lazy_kv.h
tests/test-hdr/ordered_list/hdr_michael.h
tests/test-hdr/ordered_list/hdr_michael_kv.h
tests/test-hdr/priority_queue/hdr_intrusive_pqueue.h
tests/test-hdr/queue/hdr_intrusive_fcqueue.cpp
tests/test-hdr/queue/hdr_intrusive_msqueue.h
tests/test-hdr/queue/hdr_intrusive_segmented_queue.h
tests/test-hdr/set/hdr_intrusive_cuckoo_set.h
tests/test-hdr/set/hdr_intrusive_set.h
tests/test-hdr/set/hdr_intrusive_skiplist_set.h
tests/test-hdr/set/hdr_intrusive_skiplist_set_rcu.h
tests/test-hdr/set/hdr_intrusive_striped_set.h
tests/test-hdr/set/hdr_set.h
tests/test-hdr/set/hdr_skiplist_set.h
tests/test-hdr/set/hdr_skiplist_set_rcu.h
tests/test-hdr/stack/hdr_intrusive_fcstack.cpp
tests/test-hdr/stack/hdr_intrusive_treiber_stack.h
tests/test-hdr/tree/hdr_ellenbintree_map.h
tests/test-hdr/tree/hdr_ellenbintree_set.h
tests/test-hdr/tree/hdr_intrusive_bintree.h
tests/unit/alloc/hoard_threadtest.cpp
tests/unit/alloc/larson.cpp
tests/unit/alloc/linux_scale.cpp
tests/unit/alloc/random.cpp
tests/unit/ellen_bintree_update_desc_pool.h
tests/unit/lock/win32_lock.h
tests/unit/michael_alloc.h
tests/unit/queue/intrusive_queue_reader_writer.cpp
tests/unit/queue/intrusive_queue_type.h
tests/unit/queue/queue_reader_writer.cpp
tests/unit/set2/set_insdelfind.cpp
tests/unit/stack/intrusive_stack_type.h

index ac4f212f826fdbc7da3a017a2fae14111ead3bde..8081443990928ae43ee66b430ed22ff8c3ff1625 100644 (file)
@@ -1,2 +1,9 @@
 /tools/doxygen.log
 /doc
 /tools/doxygen.log
 /doc
+/projects/Win/vc12/cds.opensdf
+/projects/Win/vc12/cds.sdf
+/projects/Win/vc12/cds.v12.suo
+/tests/cppunit/*.o
+*.o
+/todo-2.0.txt
+/tests/data/dictionary.txt
index a4f99072b14ef820e88bee3ad11e6644fcc3c556..01c1dbd194d0a0b9670b2fe2d6329b76ab3dd424 100644 (file)
@@ -342,7 +342,7 @@ namespace cds {
             \endcode
 
         */
             \endcode
 
         */
-        template <class Duration = cds::chrono::milliseconds, typename Tag=void >
+        template <class Duration = std::chrono::milliseconds, typename Tag=void >
         class delay
         {
         public:
         class delay
         {
         public:
@@ -400,7 +400,7 @@ namespace cds {
             The declaration <tt>cds::backoff::delay_of< 5 > bkoff</tt> is equal for
             <tt>cds::backoff::delay<> bkoff(5)</tt>.
         */
             The declaration <tt>cds::backoff::delay_of< 5 > bkoff</tt> is equal for
             <tt>cds::backoff::delay<> bkoff(5)</tt>.
         */
-        template <unsigned int Timeout, class Duration = cds::chrono::milliseconds >
+        template <unsigned int Timeout, class Duration = std::chrono::milliseconds >
         class delay_of: public delay<Duration>
         {
         //@cond
         class delay_of: public delay<Duration>
         {
         //@cond
index 1adbb3e844179c55671fb2f5a01c861143921bf9..96ab439917f70db610c26b3c8d5cb7d9c30eb5ee 100644 (file)
@@ -253,12 +253,12 @@ namespace cds { namespace cxx11_atomics {
             // cas
             static bool atomic_compare_exchange_weak_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
             // cas
             static bool atomic_compare_exchange_weak_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas8_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
                 return platform::cas8_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas8_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
                 return platform::cas8_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
@@ -271,12 +271,12 @@ namespace cds { namespace cxx11_atomics {
             }
             static bool atomic_compare_exchange_strong_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
             }
             static bool atomic_compare_exchange_strong_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas8_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
                 return platform::cas8_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas8_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
                 return platform::cas8_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
@@ -475,12 +475,12 @@ namespace cds { namespace cxx11_atomics {
             // cas
             static bool atomic_compare_exchange_weak_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
             // cas
             static bool atomic_compare_exchange_weak_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas16_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
                 return platform::cas16_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas16_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
                 return platform::cas16_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
@@ -493,12 +493,12 @@ namespace cds { namespace cxx11_atomics {
             }
             static bool atomic_compare_exchange_strong_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
             }
             static bool atomic_compare_exchange_strong_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas16_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
                 return platform::cas16_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas16_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
                 return platform::cas16_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
@@ -697,12 +697,12 @@ namespace cds { namespace cxx11_atomics {
             // cas
             static bool atomic_compare_exchange_weak_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
             // cas
             static bool atomic_compare_exchange_weak_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas32_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
                 return platform::cas32_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas32_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
                 return platform::cas32_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
@@ -715,12 +715,12 @@ namespace cds { namespace cxx11_atomics {
             }
             static bool atomic_compare_exchange_strong_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
             }
             static bool atomic_compare_exchange_strong_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas32_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
                 return platform::cas32_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas32_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
                 return platform::cas32_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
@@ -919,12 +919,12 @@ namespace cds { namespace cxx11_atomics {
             // cas
             static bool atomic_compare_exchange_weak_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
             // cas
             static bool atomic_compare_exchange_weak_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas64_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
                 return platform::cas64_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas64_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
                 return platform::cas64_weak( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
@@ -937,12 +937,12 @@ namespace cds { namespace cxx11_atomics {
             }
             static bool atomic_compare_exchange_strong_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
             }
             static bool atomic_compare_exchange_strong_explicit( T volatile * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas64_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
                 return platform::cas64_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong_explicit( T * pDest, T * expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas64_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
                 return platform::cas64_strong( primary::ptr(pDest), primary::ref(*expected), primary::val(desired), mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong( T volatile * pDest, T * expected, T desired ) CDS_NOEXCEPT
@@ -1141,12 +1141,12 @@ namespace cds { namespace cxx11_atomics {
             // cas
             static bool atomic_compare_exchange_weak_explicit( T * volatile * pDest, T * * expected, T * desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
             // cas
             static bool atomic_compare_exchange_weak_explicit( T * volatile * pDest, T * * expected, T * desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas_ptr_weak( pDest, *expected, desired, mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak_explicit( T * * pDest, T * * expected, T * desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
                 return platform::cas_ptr_weak( pDest, *expected, desired, mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak_explicit( T * * pDest, T * * expected, T * desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas_ptr_weak( pDest, *expected, desired, mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak( T * volatile * pDest, T ** expected, T * desired ) CDS_NOEXCEPT
                 return platform::cas_ptr_weak( pDest, *expected, desired, mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_weak( T * volatile * pDest, T ** expected, T * desired ) CDS_NOEXCEPT
@@ -1159,12 +1159,12 @@ namespace cds { namespace cxx11_atomics {
             }
             static bool atomic_compare_exchange_strong_explicit( T * volatile * pDest, T ** expected, T * desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
             }
             static bool atomic_compare_exchange_strong_explicit( T * volatile * pDest, T ** expected, T * desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas_ptr_strong( pDest, *expected, desired, mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong_explicit( T ** pDest, T ** expected, T * desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
                 return platform::cas_ptr_strong( pDest, *expected, desired, mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong_explicit( T ** pDest, T ** expected, T * desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
             {
-                assert( expected != NULL );
+                assert( expected );
                 return platform::cas_ptr_strong( pDest, *expected, desired, mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong( T * volatile * pDest, T ** expected, T * desired ) CDS_NOEXCEPT
                 return platform::cas_ptr_strong( pDest, *expected, desired, mo_success, mo_fail );
             }
             static bool atomic_compare_exchange_strong( T * volatile * pDest, T ** expected, T * desired ) CDS_NOEXCEPT
index afb9a74941abf2935f25e47771c4f9ce7df16760..b79befcc11e367803eed24c823b00d46404abf6b 100644 (file)
@@ -55,7 +55,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
             assert( cds::details::is_aligned( pSrc, 8 ));
 
             T v = *pSrc;
             assert( cds::details::is_aligned( pSrc, 8 ));
 
             T v = *pSrc;
@@ -87,7 +87,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
             assert( cds::details::is_aligned( pDest, 8 ));
 
             if (order != memory_order_seq_cst) {
             assert( cds::details::is_aligned( pDest, 8 ));
 
             if (order != memory_order_seq_cst) {
@@ -153,7 +153,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
@@ -173,7 +173,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             T * v = *pSrc;
             fence_after_load( order );
 
             T * v = *pSrc;
             fence_after_load( order );
index cacfa9d19e744b48ba3331364d7b1056604607b5..12582c2d987dc57fa3bc228818e855655fdadaae 100644 (file)
@@ -105,7 +105,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire  \
                 || order == memory_order_seq_cst   \
                 ) ; \
                 || order ==  memory_order_acquire  \
                 || order == memory_order_seq_cst   \
                 ) ; \
-            assert( pSrc != NULL )  ; \
+            assert( pSrc )  ; \
             T val    ; \
             __asm__ __volatile__ ( \
                 "ld" #n_bytes ".acq %[val] = [%[pSrc]]  \n\t" \
             T val    ; \
             __asm__ __volatile__ ( \
                 "ld" #n_bytes ".acq %[val] = [%[pSrc]]  \n\t" \
@@ -125,7 +125,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release  \
                 || order == memory_order_seq_cst   \
                 ) ; \
                 || order ==  memory_order_release  \
                 || order == memory_order_seq_cst   \
                 ) ; \
-            assert( pDest != NULL )  ; \
+            assert( pDest )  ; \
             if ( order == memory_order_seq_cst ) { \
                 __asm__ __volatile__ ( \
                     "st" #n_bytes ".rel [%[pDest]] = %[val] \n\t" \
             if ( order == memory_order_seq_cst ) { \
                 __asm__ __volatile__ ( \
                     "st" #n_bytes ".rel [%[pDest]] = %[val] \n\t" \
@@ -199,7 +199,7 @@ namespace cds { namespace cxx11_atomics {
         static inline T exchange##n_bits( T volatile * pDest, T val, memory_order order ) CDS_NOEXCEPT \
         { \
             static_assert( sizeof(T) == n_bytes, "Illegal size of operand" )   ; \
         static inline T exchange##n_bits( T volatile * pDest, T val, memory_order order ) CDS_NOEXCEPT \
         { \
             static_assert( sizeof(T) == n_bytes, "Illegal size of operand" )   ; \
-            assert( pDest != NULL ) ; \
+            assert( pDest ) ; \
             T current ; \
             switch(order) \
             { \
             T current ; \
             switch(order) \
             { \
@@ -295,7 +295,7 @@ namespace cds { namespace cxx11_atomics {
         static inline T fetch32_add( T volatile * pDest, T val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 4, "Illegal size of operand" );
         static inline T fetch32_add( T volatile * pDest, T val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 4, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             T cur;
             switch ( val ) {
 
             T cur;
             switch ( val ) {
@@ -324,7 +324,7 @@ namespace cds { namespace cxx11_atomics {
         static inline T fetch32_sub( T volatile * pDest, T val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 4, "Illegal size of operand" );
         static inline T fetch32_sub( T volatile * pDest, T val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 4, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
             T cur;
             switch ( val ) {
                 case 1:
             T cur;
             switch ( val ) {
                 case 1:
@@ -361,7 +361,7 @@ namespace cds { namespace cxx11_atomics {
         static inline T fetch64_add( T volatile * pDest, T val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 8, "Illegal size of operand" );
         static inline T fetch64_add( T volatile * pDest, T val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 8, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             T cur;
             switch ( val ) {
 
             T cur;
             switch ( val ) {
@@ -390,7 +390,7 @@ namespace cds { namespace cxx11_atomics {
         static inline T fetch64_sub( T volatile * pDest, T val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 8, "Illegal size of operand" );
         static inline T fetch64_sub( T volatile * pDest, T val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 8, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
             T cur;
             switch ( val ) {
                 case 1:
             T cur;
             switch ( val ) {
                 case 1:
@@ -424,7 +424,7 @@ namespace cds { namespace cxx11_atomics {
                  || order ==  memory_order_acquire
                  || order == memory_order_seq_cst
             );
                  || order ==  memory_order_acquire
                  || order == memory_order_seq_cst
             );
-            assert( pSrc != NULL );
+            assert( pSrc );
             T * val;
             __asm__ __volatile__ (
                 "ld8.acq %[val] = [%[pSrc]]  \n\t"
             T * val;
             __asm__ __volatile__ (
                 "ld8.acq %[val] = [%[pSrc]]  \n\t"
@@ -442,7 +442,7 @@ namespace cds { namespace cxx11_atomics {
                  || order ==  memory_order_release
                  || order == memory_order_seq_cst
             );
                  || order ==  memory_order_release
                  || order == memory_order_seq_cst
             );
-            assert( pDest != NULL );
+            assert( pDest );
 
             if ( order == memory_order_seq_cst ) {
                 __asm__ __volatile__ (
 
             if ( order == memory_order_seq_cst ) {
                 __asm__ __volatile__ (
@@ -466,7 +466,7 @@ namespace cds { namespace cxx11_atomics {
         static inline bool cas_ptr_strong( T * volatile * pDest, T *& expected, T * desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T *) == 8, "Illegal size of operand" );
         static inline bool cas_ptr_strong( T * volatile * pDest, T *& expected, T * desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T *) == 8, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             T * current;
 
 
             T * current;
 
@@ -523,7 +523,7 @@ namespace cds { namespace cxx11_atomics {
         static inline T * exchange_ptr( T * volatile * pDest, T * val, memory_order order ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T *) == 8, "Illegal size of operand" );
         static inline T * exchange_ptr( T * volatile * pDest, T * val, memory_order order ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T *) == 8, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             T * current;
             switch(order) {
 
             T * current;
             switch(order) {
@@ -558,13 +558,13 @@ namespace cds { namespace cxx11_atomics {
         template <> struct atomic_pointer_sizeof<void> { enum { value = 1 }; };
 
         // It does not work properly
         template <> struct atomic_pointer_sizeof<void> { enum { value = 1 }; };
 
         // It does not work properly
-        // atomic.fetch_add( ... ) returns NULL, why?..
+        // atomic.fetch_add( ... ) returns nullptr, why?..
 //#       define CDS_ATOMIC_fetch_ptr_add_defined
         template <typename T>
         static inline T * fetch_ptr_add( T * volatile * pDest, ptrdiff_t val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T *) == 8, "Illegal size of operand" );
 //#       define CDS_ATOMIC_fetch_ptr_add_defined
         template <typename T>
         static inline T * fetch_ptr_add( T * volatile * pDest, ptrdiff_t val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T *) == 8, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             T * cur;
             val *= atomic_pointer_sizeof<T>::value;
 
             T * cur;
             val *= atomic_pointer_sizeof<T>::value;
@@ -590,13 +590,13 @@ namespace cds { namespace cxx11_atomics {
         }
 
         // It does not work properly
         }
 
         // It does not work properly
-        // atomic.fetch_sub( ... ) returns NULL, why?..
+        // atomic.fetch_sub( ... ) returns nullptr, why?..
 //#       define CDS_ATOMIC_fetch_ptr_sub_defined
         template <typename T>
         static inline T * fetch_ptr_sub( T * volatile * pDest, ptrdiff_t val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T *) == 8, "Illegal size of operand" );
 //#       define CDS_ATOMIC_fetch_ptr_sub_defined
         template <typename T>
         static inline T * fetch_ptr_sub( T * volatile * pDest, ptrdiff_t val, memory_order order) CDS_NOEXCEPT
         {
             static_assert( sizeof(T *) == 8, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
             T * cur;
             val *= atomic_pointer_sizeof<T>::value;
             switch ( val ) {
             T * cur;
             val *= atomic_pointer_sizeof<T>::value;
             switch ( val ) {
index 801bc796f5581e81982c6bd3670e18410e67d564..f160e9097679006af17d6ef88ef27570ea7b41b2 100644 (file)
@@ -165,7 +165,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             fence_before(order);
             *pDest = src;
 
             fence_before(order);
             *pDest = src;
@@ -181,7 +181,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             fence_before(order);
             T v = *pSrc;
 
             fence_before(order);
             T v = *pSrc;
@@ -193,7 +193,7 @@ namespace cds { namespace cxx11_atomics {
         static inline bool cas32_strong( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 4, "Illegal size of operand" );
         static inline bool cas32_strong( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 4, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             fence_before( mo_success );
             __asm__ __volatile__(
 
             fence_before( mo_success );
             __asm__ __volatile__(
@@ -226,7 +226,7 @@ namespace cds { namespace cxx11_atomics {
         static inline T exchange32( T volatile * pDest, T v, memory_order order ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 4, "Illegal size of operand" );
         static inline T exchange32( T volatile * pDest, T v, memory_order order ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 4, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             // This primitive could be implemented via "swap" instruction but "swap" is deprecated in UltraSparc
 
 
             // This primitive could be implemented via "swap" instruction but "swap" is deprecated in UltraSparc
 
@@ -248,7 +248,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             fence_before(order);
             T v = *pSrc;
 
             fence_before(order);
             T v = *pSrc;
@@ -264,7 +264,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             fence_before(order);
             *pDest = val;
 
             fence_before(order);
             *pDest = val;
@@ -276,7 +276,7 @@ namespace cds { namespace cxx11_atomics {
         static inline bool cas64_strong( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 8, "Illegal size of operand" );
         static inline bool cas64_strong( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 8, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             fence_before( mo_success );
             __asm__ __volatile__(
 
             fence_before( mo_success );
             __asm__ __volatile__(
@@ -310,7 +310,7 @@ namespace cds { namespace cxx11_atomics {
         static inline T exchange64( T volatile * pDest, T v, memory_order order ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 8, "Illegal size of operand" );
         static inline T exchange64( T volatile * pDest, T v, memory_order order ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 8, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             T cur = load64( pDest, memory_order_relaxed );
             do {} while ( !cas64_strong( pDest, cur, v, order, memory_order_relaxed ));
 
             T cur = load64( pDest, memory_order_relaxed );
             do {} while ( !cas64_strong( pDest, cur, v, order, memory_order_relaxed ));
@@ -329,7 +329,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             fence_before( order );
             *pDest = src;
 
             fence_before( order );
             *pDest = src;
@@ -345,7 +345,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order == memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             fence_before( order );
             T v = *pSrc;
 
             fence_before( order );
             T v = *pSrc;
@@ -357,7 +357,7 @@ namespace cds { namespace cxx11_atomics {
         static inline bool cas8_strong( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 1, "Illegal size of operand" );
         static inline bool cas8_strong( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 1, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             union u32 {
                 uint32_t    w;
 
             union u32 {
                 uint32_t    w;
@@ -390,7 +390,7 @@ namespace cds { namespace cxx11_atomics {
         static inline bool cas8_weak( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 1, "Illegal size of operand" );
         static inline bool cas8_weak( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 1, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             union u32 {
                 uint32_t    w;
 
             union u32 {
                 uint32_t    w;
@@ -418,7 +418,7 @@ namespace cds { namespace cxx11_atomics {
         static inline T exchange8( T volatile * pDest, T v, memory_order order ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 1, "Illegal size of operand" );
         static inline T exchange8( T volatile * pDest, T v, memory_order order ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 1, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             T cur = load8( pDest, memory_order_relaxed );
             do {} while ( !cas8_strong( pDest, cur, v, order, memory_order_relaxed ));
 
             T cur = load8( pDest, memory_order_relaxed );
             do {} while ( !cas8_strong( pDest, cur, v, order, memory_order_relaxed ));
@@ -438,7 +438,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             fence_before( order );
             T v = *pSrc;
 
             fence_before( order );
             T v = *pSrc;
@@ -454,7 +454,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             fence_before(order);
             *pDest = src;
 
             fence_before(order);
             *pDest = src;
@@ -465,7 +465,7 @@ namespace cds { namespace cxx11_atomics {
         static inline bool cas16_strong( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 2, "Illegal size of operand" );
         static inline bool cas16_strong( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 2, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             union u32 {
                 uint32_t    w;
 
             union u32 {
                 uint32_t    w;
@@ -498,7 +498,7 @@ namespace cds { namespace cxx11_atomics {
         static inline bool cas16_weak( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 2, "Illegal size of operand" );
         static inline bool cas16_weak( T volatile * pDest, T& expected, T desired, memory_order mo_success, memory_order mo_fail ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 2, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             union u32 {
                 uint32_t    w;
 
             union u32 {
                 uint32_t    w;
@@ -526,7 +526,7 @@ namespace cds { namespace cxx11_atomics {
         static inline T exchange16( T volatile * pDest, T v, memory_order order ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 2, "Illegal size of operand" );
         static inline T exchange16( T volatile * pDest, T v, memory_order order ) CDS_NOEXCEPT
         {
             static_assert( sizeof(T) == 2, "Illegal size of operand" );
-            assert( pDest != NULL );
+            assert( pDest );
 
             T cur = load16( pDest, memory_order_relaxed );
             do {} while ( !cas16_strong( pDest, cur, v, order, memory_order_relaxed ));
 
             T cur = load16( pDest, memory_order_relaxed );
             do {} while ( !cas16_strong( pDest, cur, v, order, memory_order_relaxed ));
@@ -545,7 +545,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             fence_before(order);
             *pDest = src;
 
             fence_before(order);
             *pDest = src;
@@ -561,7 +561,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             fence_before( order );
             T * v = *pSrc;
 
             fence_before( order );
             T * v = *pSrc;
index 152ccc7cb617f76f09ad28db9aaed22edd94f3fb..52fc73983d4267e6e6583b1d179ece94e602e1d1 100644 (file)
@@ -59,7 +59,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
             assert( cds::details::is_aligned( pSrc, 8 ));
 
             T CDS_DATA_ALIGNMENT(8) v;
             assert( cds::details::is_aligned( pSrc, 8 ));
 
             T CDS_DATA_ALIGNMENT(8) v;
@@ -93,7 +93,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
             assert( cds::details::is_aligned( pDest, 8 ));
 
             if ( order != memory_order_seq_cst ) {
             assert( cds::details::is_aligned( pDest, 8 ));
 
             if ( order != memory_order_seq_cst ) {
@@ -132,7 +132,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
@@ -152,7 +152,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             T * v = *pSrc;
             fence_after_load( order );
 
             T * v = *pSrc;
             fence_after_load( order );
index 49b2f2c3f89cf5b391cac50074ed75fe21e51e9b..29d8b8593444eabd6741d916ddbd7969da784dfd 100644 (file)
@@ -242,7 +242,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
@@ -262,7 +262,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order == memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             T v = *pSrc;
             fence_after_load( order );
 
             T v = *pSrc;
             fence_after_load( order );
@@ -315,7 +315,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
             assert( cds::details::is_aligned( pDest, 2 ));
 
             if ( order != memory_order_seq_cst ) {
             assert( cds::details::is_aligned( pDest, 2 ));
 
             if ( order != memory_order_seq_cst ) {
@@ -336,7 +336,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
             assert( cds::details::is_aligned( pSrc, 2 ));
 
             T v = *pSrc;
             assert( cds::details::is_aligned( pSrc, 2 ));
 
             T v = *pSrc;
@@ -365,7 +365,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
             assert( cds::details::is_aligned( pDest, 4 ));
 
             if ( order != memory_order_seq_cst ) {
             assert( cds::details::is_aligned( pDest, 4 ));
 
             if ( order != memory_order_seq_cst ) {
@@ -386,7 +386,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
             assert( cds::details::is_aligned( pSrc, 4 ));
 
             T v = *pSrc;
             assert( cds::details::is_aligned( pSrc, 4 ));
 
             T v = *pSrc;
@@ -458,7 +458,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
             assert( cds::details::is_aligned( pSrc, 8 ));
 
             T v = *pSrc;
             assert( cds::details::is_aligned( pSrc, 8 ));
 
             T v = *pSrc;
@@ -486,7 +486,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
             assert( cds::details::is_aligned( pDest, 8 ));
 
             if ( order != memory_order_seq_cst ) {
             assert( cds::details::is_aligned( pDest, 8 ));
 
             if ( order != memory_order_seq_cst ) {
@@ -528,7 +528,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
@@ -548,7 +548,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             T * v = *pSrc;
             fence_after_load( order );
 
             T * v = *pSrc;
             fence_after_load( order );
index 4670a3b1ec0af0b5dabbe1291336840e3cdf78fd..b11d50f75fadfa2a568dc0aec6a8a7d0a20c57c5 100644 (file)
@@ -220,7 +220,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
@@ -240,7 +240,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order == memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             T v = *pSrc;
             fence_after_load( order );
 
             T v = *pSrc;
             fence_after_load( order );
@@ -276,7 +276,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
             assert( cds::details::is_aligned( pDest, 2 ));
 
             if ( order != memory_order_seq_cst ) {
             assert( cds::details::is_aligned( pDest, 2 ));
 
             if ( order != memory_order_seq_cst ) {
@@ -297,7 +297,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
             assert( cds::details::is_aligned( pSrc, 2 ));
 
             T v = *pSrc;
             assert( cds::details::is_aligned( pSrc, 2 ));
 
             T v = *pSrc;
@@ -344,7 +344,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
             assert( cds::details::is_aligned( pDest, 4 ));
 
             if ( order != memory_order_seq_cst ) {
             assert( cds::details::is_aligned( pDest, 4 ));
 
             if ( order != memory_order_seq_cst ) {
@@ -365,7 +365,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
             assert( cds::details::is_aligned( pSrc, 4 ));
 
             T v( *pSrc );
             assert( cds::details::is_aligned( pSrc, 4 ));
 
             T v( *pSrc );
@@ -437,7 +437,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
             assert( cds::details::is_aligned( pSrc, 8 ));
 
             // Atomically loads 64bit value by SSE intrinsics
             assert( cds::details::is_aligned( pSrc, 8 ));
 
             // Atomically loads 64bit value by SSE intrinsics
@@ -466,7 +466,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
             assert( cds::details::is_aligned( pDest, 8 ));
 
             if ( order != memory_order_seq_cst ) {
             assert( cds::details::is_aligned( pDest, 8 ));
 
             if ( order != memory_order_seq_cst ) {
@@ -501,7 +501,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
                 || order ==  memory_order_release
                 || order == memory_order_seq_cst
                 );
-            assert( pDest != NULL );
+            assert( pDest );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
 
             if ( order != memory_order_seq_cst ) {
                 fence_before( order );
@@ -521,7 +521,7 @@ namespace cds { namespace cxx11_atomics {
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
                 || order ==  memory_order_acquire
                 || order ==  memory_order_seq_cst
                 );
-            assert( pSrc != NULL );
+            assert( pSrc );
 
             T * v = *pSrc;
             fence_after_load( order );
 
             T * v = *pSrc;
             fence_after_load( order );
index b0425e0ac398dc8181a60db8f2cb885e5bc8461f..4bed44527b9296f2d3e73edad2db1911809a33e0 100644 (file)
@@ -381,7 +381,7 @@ namespace cds { namespace container {
 
         /// Clear the queue
         /**
 
         /// Clear the queue
         /**
-            The function repeatedly calls \ref dequeue until it returns NULL.
+            The function repeatedly calls \ref dequeue until it returns \p nullptr.
         */
         void clear()
         {
         */
         void clear()
         {
index d9282266b552d050498d375a9f183fb550a8081e..45c4b9767fa4c2ccaaf27a617ccc230e54e94bd8 100644 (file)
@@ -138,9 +138,9 @@ namespace cds { namespace container {
 
             The <tt>insert(x)</tt> successively "kicks out" conflicting items until every key has a slot.
             To add \p x, the method swaps \p x with \p y, the current occupant of <tt>table[0][h0(x)]</tt>.
 
             The <tt>insert(x)</tt> successively "kicks out" conflicting items until every key has a slot.
             To add \p x, the method swaps \p x with \p y, the current occupant of <tt>table[0][h0(x)]</tt>.
-            If the prior value was \p NULL, it is done. Otherwise, it swaps the newly nest-less value \p y
+            If the prior value was \p nullptr, it is done. Otherwise, it swaps the newly nest-less value \p y
             for the current occupant of <tt>table[1][h1(y)]</tt> in the same way. As before, if the prior value
             for the current occupant of <tt>table[1][h1(y)]</tt> in the same way. As before, if the prior value
-            was \p NULL, it is done. Otherwise, the method continues swapping entries (alternating tables)
+            was \p nullptr, it is done. Otherwise, the method continues swapping entries (alternating tables)
             until it finds an empty slot. We might not find an empty slot, either because the table is full,
             or because the sequence of displacement forms a cycle. We therefore need an upper limit on the
             number of successive displacements we are willing to undertake. When this limit is exceeded,
             until it finds an empty slot. We might not find an empty slot, either because the table is full,
             or because the sequence of displacement forms a cycle. We therefore need an upper limit on the
             number of successive displacements we are willing to undertake. When this limit is exceeded,
index 05606af2671e8c837e116b4dd73744d5f8552134..14f77297d8af79f7a5082b111718ff451167afd7 100644 (file)
@@ -111,9 +111,9 @@ namespace cds { namespace container {
 
             The <tt>insert(x)</tt> successively "kicks out" conflicting items until every key has a slot.
             To add \p x, the method swaps \p x with \p y, the current occupant of <tt>table[0][h0(x)]</tt>.
 
             The <tt>insert(x)</tt> successively "kicks out" conflicting items until every key has a slot.
             To add \p x, the method swaps \p x with \p y, the current occupant of <tt>table[0][h0(x)]</tt>.
-            If the prior value was \p NULL, it is done. Otherwise, it swaps the newly nest-less value \p y
+            If the prior value was \p nullptr, it is done. Otherwise, it swaps the newly nest-less value \p y
             for the current occupant of <tt>table[1][h1(y)]</tt> in the same way. As before, if the prior value
             for the current occupant of <tt>table[1][h1(y)]</tt> in the same way. As before, if the prior value
-            was \p NULL, it is done. Otherwise, the method continues swapping entries (alternating tables)
+            was \p nullptr, it is done. Otherwise, the method continues swapping entries (alternating tables)
             until it finds an empty slot. We might not find an empty slot, either because the table is full,
             or because the sequence of displacement forms a cycle. We therefore need an upper limit on the
             number of successive displacements we are willing to undertake. When this limit is exceeded,
             until it finds an empty slot. We might not find an empty slot, either because the table is full,
             or because the sequence of displacement forms a cycle. We therefore need an upper limit on the
             number of successive displacements we are willing to undertake. When this limit is exceeded,
index 42aa769db63c69aa927bc333041eeab0abafe8b5..1f968d3c7452eec4b13c463f0c074ce11d7a9062 100644 (file)
@@ -633,7 +633,7 @@ namespace cds { namespace container {
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_EllenBinTreeMap_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_EllenBinTreeMap_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
-            If \p key is not found it returns \p NULL.
+            If \p key is not found it returns \p nullptr.
 
             RCU should be locked before call the function.
             Returned pointer is valid while RCU is locked.
 
             RCU should be locked before call the function.
             Returned pointer is valid while RCU is locked.
index e606ec3bc3377bfa8ed942d277473664319d229c..11ea6f5259efb039f86add6db44d4c2f9818002d 100644 (file)
@@ -694,7 +694,7 @@ namespace cds { namespace container {
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_EllenBinTreeSet_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_EllenBinTreeSet_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
-            If \p key is not found it returns \p NULL.
+            If \p key is not found it returns \p nullptr.
 
             RCU should be locked before call the function.
             Returned pointer is valid while RCU is locked.
 
             RCU should be locked before call the function.
             Returned pointer is valid while RCU is locked.
index 97a53e549b41c25b5a5d1b42021d6ffdef413f46..66179fe0d94820c56c7c316fa14b33690fef748e 100644 (file)
@@ -380,7 +380,7 @@ namespace cds { namespace container {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to <tt>NULL</tt>.
+            Internally, <tt>end</tt> returning value equals to \p nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
index 0d7017da9033129ed13dba9645dfaf6cc188b310..d2d36e97410dd2975daa1e950888a3580102a13e 100644 (file)
@@ -307,7 +307,7 @@ namespace cds { namespace container {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to <tt>NULL</tt>.
+            Internally, <tt>end</tt> returning value equals to nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
index 266cb5c1743398363def5465511dfa9b360adf2b..20d2f475f2cb3262f3f352884c97dfb2a5bccda0 100644 (file)
@@ -744,7 +744,7 @@ namespace cds { namespace container {
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_LazyKVList_rcu_get
             The function searches the item with \p key and returns the pointer to item found.
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_LazyKVList_rcu_get
             The function searches the item with \p key and returns the pointer to item found.
-            If \p key is not found it returns \p NULL.
+            If \p key is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p K that can be not the same as \p key_type.
 
 
             Note the compare functor should accept a parameter of type \p K that can be not the same as \p key_type.
 
index 77dfe4167739e1840a9416b9c628c6a2c919b01d..e9bc4dfeeb596fbf9e9733a6a60def1d52dde7a8 100644 (file)
@@ -777,7 +777,7 @@ namespace cds { namespace container {
         /// Finds the key \p val and return the item found
         /** \anchor cds_nonintrusive_LazyList_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
         /// Finds the key \p val and return the item found
         /** \anchor cds_nonintrusive_LazyList_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
-            If \p val is not found it returns \p NULL.
+            If \p val is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
index 7cac646231116b4ed64b349df4ba6d25b00da3de..bef5df181c69274e4126ecfee4c889bf00bc063e 100644 (file)
@@ -473,7 +473,7 @@ namespace cds { namespace container {
 
         /// Clear the deque
         /**
 
         /// Clear the deque
         /**
-            The function repeatedly calls \ref pop_back until it returns \p NULL.
+            The function repeatedly calls \ref pop_back until it returns \p nullptr.
         */
         void clear()
         {
         */
         void clear()
         {
index 9aa13cfc5a1e612e46467ce121146b8a95a9d945..92e31592b89c0983d0b235109527db6ec7cd7815 100644 (file)
@@ -364,7 +364,7 @@ namespace cds { namespace container {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to <tt>NULL</tt>.
+            Internally, <tt>end</tt> returning value equals to \p nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
index 01c2da0750a1756c1bb097a4190bf9ccbc3ae17b..a9575b293f873d9945078357fe7008e6cd8777ad 100644 (file)
@@ -296,7 +296,7 @@ namespace cds { namespace container {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to <tt>NULL</tt>.
+            Internally, <tt>end</tt> returning value equals to \p nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
index 06b69e632f7c03ae03e61588670aa92b409a095d..e606c56872871ec0d95a30ab7cbc8f454154541d 100644 (file)
@@ -352,7 +352,7 @@ namespace cds { namespace container {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to <tt>NULL</tt>.
+            Internally, <tt>end</tt> returning value equals to \p nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
@@ -728,7 +728,7 @@ namespace cds { namespace container {
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_MichaelKVList_rcu_get
             The function searches the item with \p key and returns the pointer to item found.
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_MichaelKVList_rcu_get
             The function searches the item with \p key and returns the pointer to item found.
-            If \p key is not found it returns \p NULL.
+            If \p key is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p K that can be not the same as \p key_type.
 
 
             Note the compare functor should accept a parameter of type \p K that can be not the same as \p key_type.
 
index ccec178ad5d9c6a5ed256c5c255901da32d2d2bc..de7897381c079aefb6fa696c786b461d45ad3f0c 100644 (file)
@@ -278,7 +278,7 @@ namespace cds { namespace container {
             value_ptr operator ->() const
             {
                 typename iterator_base::value_ptr p = iterator_base::operator ->();
             value_ptr operator ->() const
             {
                 typename iterator_base::value_ptr p = iterator_base::operator ->();
-                return p ? &(p->m_Value) : reinterpret_cast<value_ptr>(NULL);
+                return p ? &(p->m_Value) : nullptr;
             }
 
             value_ref operator *() const
             }
 
             value_ref operator *() const
@@ -341,7 +341,7 @@ namespace cds { namespace container {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to <tt>NULL</tt>.
+            Internally, <tt>end</tt> returning value equals to \p nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
@@ -798,7 +798,7 @@ namespace cds { namespace container {
         //@cond
         bool insert_node_at( head_type& refHead, node_type * pNode )
         {
         //@cond
         bool insert_node_at( head_type& refHead, node_type * pNode )
         {
-            assert( pNode != NULL );
+            assert( pNode );
             scoped_node_ptr p(pNode);
             if ( base_class::insert_at( refHead, *pNode )) {
                 p.release();
             scoped_node_ptr p(pNode);
             if ( base_class::insert_at( refHead, *pNode )) {
                 p.release();
index e18a10da66463bd417deae2194999fc5d06c90d1..41a023b069819001cbba1636d0a511d819c176df 100644 (file)
@@ -83,7 +83,7 @@ namespace cds { namespace container {
             node_type * m_pItemFound;
 
             ensure_functor()
             node_type * m_pItemFound;
 
             ensure_functor()
-                : m_pItemFound( NULL )
+                : m_pItemFound( nullptr )
             {}
 
             void operator ()(bool, node_type& item, node_type& )
             {}
 
             void operator ()(bool, node_type& item, node_type& )
@@ -174,7 +174,7 @@ namespace cds { namespace container {
             value_ptr operator ->() const
             {
                 typename iterator_base::value_ptr p = iterator_base::operator ->();
             value_ptr operator ->() const
             {
                 typename iterator_base::value_ptr p = iterator_base::operator ->();
-                return p ? &(p->m_Value) : reinterpret_cast<value_ptr>(NULL);
+                return p ? &(p->m_Value) : nullptr;
             }
 
             value_ref operator *() const
             }
 
             value_ref operator *() const
@@ -233,7 +233,7 @@ namespace cds { namespace container {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to <tt>NULL</tt>.
+            Internally, <tt>end</tt> returning value equals to \p nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
index 9a46b0003c127234742c27dddcf917cd6cffec3b..2ee4d7dc90256aef243243ba47b94841aa32f060 100644 (file)
@@ -290,7 +290,7 @@ namespace cds { namespace container {
             value_ptr operator ->() const
             {
                 typename iterator_base::value_ptr p = iterator_base::operator ->();
             value_ptr operator ->() const
             {
                 typename iterator_base::value_ptr p = iterator_base::operator ->();
-                return p ? &(p->m_Value) : reinterpret_cast<value_ptr>(NULL);
+                return p ? &(p->m_Value) : nullptr;
             }
 
             value_ref operator *() const
             }
 
             value_ref operator *() const
@@ -337,7 +337,7 @@ namespace cds { namespace container {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to <tt>NULL</tt>.
+            Internally, <tt>end</tt> returning value equals to \p nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
@@ -748,7 +748,7 @@ namespace cds { namespace container {
         /// Finds the key \p val and return the item found
         /** \anchor cds_nonintrusive_MichaelList_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
         /// Finds the key \p val and return the item found
         /** \anchor cds_nonintrusive_MichaelList_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
-            If \p val is not found it returns \p NULL.
+            If \p val is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
@@ -825,7 +825,7 @@ namespace cds { namespace container {
         //@cond
         bool insert_node_at( head_type& refHead, node_type * pNode )
         {
         //@cond
         bool insert_node_at( head_type& refHead, node_type * pNode )
         {
-            assert( pNode != NULL );
+            assert( pNode );
             scoped_node_ptr p(pNode);
             if ( base_class::insert_at( refHead, *pNode )) {
                 p.release();
             scoped_node_ptr p(pNode);
             if ( base_class::insert_at( refHead, *pNode )) {
                 p.release();
index 102aaf313cf34cde7b6aba0e74422c6f19d04f9c..762267d31d97b8a1d72c7307ee2649ea6bc3576e 100644 (file)
@@ -89,7 +89,7 @@ namespace cds { namespace container {
         bool operator !=(iterator const& i ) const;
         };
         \endcode
         bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \p cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \p cend member functions points to \p nullptr and should not be dereferenced.
 
         \anchor cds_nonintrusive_MichaelHashMap_how_touse
         <b>How to use</b>
 
         \anchor cds_nonintrusive_MichaelHashMap_how_touse
         <b>How to use</b>
index 9e829e65073cf67fbb2dcc337c78a8ba4cb4f1fc..d3e0510cd6d75b9c0f82e345c08906ed6d8871cd 100644 (file)
@@ -686,7 +686,7 @@ namespace cds { namespace container {
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_MichaelHashMap_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_MichaelHashMap_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
-            If \p key is not found it returns \p NULL.
+            If \p key is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p K that can be not the same as \p key_type.
 
 
             Note the compare functor should accept a parameter of type \p K that can be not the same as \p key_type.
 
index 9bdcfaef940bce7a2383efa138ffb52ed9edb47d..2b1ebbf6c6a2fb34ed6ba43699d7445a404e5c7b 100644 (file)
@@ -110,7 +110,7 @@ namespace cds { namespace container {
         bool operator !=(iterator const& i ) const;
         };
         \endcode
         bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \p cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \p cend member functions points to \p nullptr and should not be dereferenced.
 
         <b>How to use</b>
 
 
         <b>How to use</b>
 
index 67d4effe45c6cf2936bb31bf0ba6abde1943bcf9..152fbf9b977eb6fc50f958fcca45caa75104baa1 100644 (file)
@@ -658,7 +658,7 @@ namespace cds { namespace container {
         /// Finds the key \p val and return the item found
         /** \anchor cds_nonintrusive_MichaelHashSet_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
         /// Finds the key \p val and return the item found
         /** \anchor cds_nonintrusive_MichaelHashSet_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
-            If \p val is not found it returns \p NULL.
+            If \p val is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
index 5f881eacc06f1ae74efc86d69c96926f6605c874..be75ba3e2667f0d2578effcece62ee2c2fef5f24 100644 (file)
@@ -322,7 +322,7 @@ namespace cds { namespace container {
 
         /// Clear the queue
         /**
 
         /// Clear the queue
         /**
-            The function repeatedly calls \ref dequeue until it returns NULL.
+            The function repeatedly calls \ref dequeue until it returns nullptr.
             The disposer defined in template \p Options is called for each item
             that can be safely disposed.
         */
             The disposer defined in template \p Options is called for each item
             that can be safely disposed.
         */
index a6ecd6c259353d9f49cf8b7bc1c63b66391db662..37f605aebffb39faa916224b2572fd862781a899 100644 (file)
@@ -332,7 +332,7 @@ namespace cds { namespace container {
 
         /// Clear the queue
         /**
 
         /// Clear the queue
         /**
-            The function repeatedly calls \ref dequeue until it returns NULL.
+            The function repeatedly calls \ref dequeue until it returns \p nullptr.
         */
         void clear()
         {
         */
         void clear()
         {
index f9faeadeceaaa36bf96ba5063a841be040a82049..931213767d368be83c7c9d5acaec1d572f714529 100644 (file)
@@ -341,7 +341,7 @@ namespace cds { namespace container {
 
         /// Clear the queue
         /**
 
         /// Clear the queue
         /**
-            The function repeatedly calls \ref dequeue until it returns NULL.
+            The function repeatedly calls \ref dequeue until it returns \p nullptr.
         */
         void clear()
         {
         */
         void clear()
         {
index a1c83eda0ef95d240a0f41121e2551128f11eb01..0f9ccea6b7c5b7a59d10a1782afe81a6c606b3bb 100644 (file)
@@ -108,7 +108,7 @@ namespace cds { namespace container {
             bool operator !=(iterator const& i ) const;
         };
         \endcode
             bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \ cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \ cend member functions points to \p nullptr and should not be dereferenced.
 
     */
     template <
 
     */
     template <
index cb402ebe4eb0001462c6cd7e40fbd3526732d541..2ab08886081fc46df169cebcac8b0602f6ec383d 100644 (file)
@@ -323,7 +323,7 @@ namespace cds { namespace container {
 
         /// Gets minimum key from the map
         /**
 
         /// Gets minimum key from the map
         /**
-            If the map is empty the function returns \p NULL
+            If the map is empty the function returns \p nullptr
         */
         value_type * get_min() const
         {
         */
         value_type * get_min() const
         {
@@ -332,7 +332,7 @@ namespace cds { namespace container {
 
         /// Gets maximum key from the map
         /**
 
         /// Gets maximum key from the map
         /**
-            The function returns \p NULL if the map is empty
+            The function returns \p nullptr if the map is empty
         */
         value_type * get_max() const
         {
         */
         value_type * get_max() const
         {
index 68336c77ac9a2accbb2a63912b7ad5c120a569dc..42b6d62f109a882cc8e8c3b1a38f9abb48681a9c 100644 (file)
@@ -97,7 +97,7 @@ namespace cds { namespace container {
             bool operator !=(iterator const& i ) const;
         };
         \endcode
             bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \p cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \p cend member functions points to \p nullptr and should not be dereferenced.
 
     */
     template <
 
     */
     template <
@@ -718,7 +718,7 @@ namespace cds { namespace container {
         /// Finds the key \p key and return the item found
         /** \anchor cds_nonintrusive_SkipListMap_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
         /// Finds the key \p key and return the item found
         /** \anchor cds_nonintrusive_SkipListMap_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
-            If \p key is not found it returns \p NULL.
+            If \p key is not found it returns \p nullptr.
 
             Note the compare functor in \p Traits class' template argument
             should accept a parameter of type \p K that can be not the same as \p key_type.
 
             Note the compare functor in \p Traits class' template argument
             should accept a parameter of type \p K that can be not the same as \p key_type.
index 70abe853698800e34946e28764d1f57a5ea66a71..1a38e989245da3cb1c21fd2fb265030e8394f198 100644 (file)
@@ -105,7 +105,7 @@ namespace cds { namespace container {
             bool operator !=(iterator const& i ) const;
         };
         \endcode
             bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \p cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \p cend member functions points to \p nullptr and should not be dereferenced.
 
     */
     template <
 
     */
     template <
index 4c6695779c245cbcbef7f76e05a72b8651a13b44..17d22fbcb220898d47bbcbe4c1ff870440ddc841 100644 (file)
@@ -357,7 +357,7 @@ namespace cds { namespace container {
 
         /// Gets minimum key from the set
         /**
 
         /// Gets minimum key from the set
         /**
-            If the set is empty the function returns \p NULL
+            If the set is empty the function returns \p nullptr
         */
         value_type * get_min() const
         {
         */
         value_type * get_min() const
         {
@@ -367,7 +367,7 @@ namespace cds { namespace container {
 
         /// Gets maximum key from the set
         /**
 
         /// Gets maximum key from the set
         /**
-            The function returns \p NULL if the set is empty
+            The function returns \p nullptr if the set is empty
         */
         value_type * get_max() const
         {
         */
         value_type * get_max() const
         {
index a00db0de9c4e351ae18a12142c4435602c6e0f90..fa3f22bb1d5ddcfbd9e24efba1f06808dfaf9fc3 100644 (file)
@@ -135,7 +135,7 @@ namespace cds { namespace container {
             bool operator !=(iterator const& i ) const;
         };
         \endcode
             bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \p cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \p cend member functions points to \p nullptr and should not be dereferenced.
     */
     template <
         typename RCU,
     */
     template <
         typename RCU,
@@ -778,7 +778,7 @@ namespace cds { namespace container {
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_SkipListSet_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_SkipListSet_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
-            If \p key is not found it returns \p NULL.
+            If \p key is not found it returns \p nullptr.
 
             Note the compare functor in \p Traits class' template argument
             should accept a parameter of type \p Q that can be not the same as \p value_type.
 
             Note the compare functor in \p Traits class' template argument
             should accept a parameter of type \p Q that can be not the same as \p value_type.
index e754477310e3a7291bf90dbeaec648a3e5b6352e..b42ee5bc6bc5cd14e22e2fd3a9588d5f902376a9 100644 (file)
@@ -66,7 +66,7 @@ namespace cds { namespace container {
             bool operator !=(iterator const& i ) const;
         };
         \endcode
             bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \p cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \p cend member functions points to \p nullptr and should not be dereferenced.
 
         \par Usage
 
 
         \par Usage
 
@@ -644,7 +644,7 @@ namespace cds { namespace container {
         /// Finds \p key and return the item found
         /** \anchor cds_intrusive_SplitListMap_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
         /// Finds \p key and return the item found
         /** \anchor cds_intrusive_SplitListMap_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
-            If \p key is not found it returns \p NULL.
+            If \p key is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p K that can be not the same as \p value_type.
 
 
             Note the compare functor should accept a parameter of type \p K that can be not the same as \p value_type.
 
index 7ca37017068b66aa411aa2167c2895a2157d7537..0cd2506dde328c7aaf1e2a2ac99288429768868c 100644 (file)
@@ -66,7 +66,7 @@ namespace cds { namespace container {
             bool operator !=(iterator const& i ) const;
         };
         \endcode
             bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \p cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \p cend member functions points to \p nullptr and should not be dereferenced.
 
         \par Usage
 
 
         \par Usage
 
@@ -883,7 +883,7 @@ namespace cds { namespace container {
         /// Finds the key \p val and return the item found
         /** \anchor cds_nonintrusive_SplitListSet_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
         /// Finds the key \p val and return the item found
         /** \anchor cds_nonintrusive_SplitListSet_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
-            If \p val is not found it returns \p NULL.
+            If \p val is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
index 0e90505034563c10833cf7392e4112647e944087..64fe4804f250e9b84a6df13a2afa015768c3ddf0 100644 (file)
@@ -328,7 +328,7 @@ namespace cds { namespace container {
 
         /// Clear the queue
         /**
 
         /// Clear the queue
         /**
-            The function repeatedly calls \ref dequeue until it returns NULL.
+            The function repeatedly calls \ref dequeue until it returns \p nullptr.
         */
         void clear()
         {
         */
         void clear()
         {
index 8fed30bd7d5e2aed73e9838e37c1a61e35228f30..6fd1a07bfb8c83edbf5a78bba975cd2aa9e8d9ba 100644 (file)
@@ -222,7 +222,7 @@ namespace cds {
 #ifndef cds_bitop_complement32_DEFINED
         static inline bool complement32( atomic32u_t * pArg, unsigned int nBit )
         {
 #ifndef cds_bitop_complement32_DEFINED
         static inline bool complement32( atomic32u_t * pArg, unsigned int nBit )
         {
-            assert( pArg != NULL );
+            assert( pArg );
             atomic32u_t nVal = *pArg & (1 << nBit);
             *pArg ^= 1 << nBit;
             return nVal != 0;
             atomic32u_t nVal = *pArg & (1 << nBit);
             *pArg ^= 1 << nBit;
             return nVal != 0;
@@ -232,7 +232,7 @@ namespace cds {
 #ifndef cds_bitop_complement64_DEFINED
         static inline bool complement64( atomic64u_t * pArg, unsigned int nBit )
         {
 #ifndef cds_bitop_complement64_DEFINED
         static inline bool complement64( atomic64u_t * pArg, unsigned int nBit )
         {
-            assert( pArg != NULL );
+            assert( pArg );
             atomic64u_t nVal = *pArg & (atomic64u_t(1) << nBit);
             *pArg ^= atomic64u_t(1) << nBit;
             return nVal != 0;
             atomic64u_t nVal = *pArg & (atomic64u_t(1) << nBit);
             *pArg ^= atomic64u_t(1) << nBit;
             return nVal != 0;
index d4882a430a57f97fbf49be6d018f70ae2f9b4f01..3fb1daffa91b0702d47c3045de7bd84c7c5ecd1e 100644 (file)
@@ -68,7 +68,7 @@ namespace cds { namespace details {
 
         func_ref get()
         {
 
         func_ref get()
         {
-            assert( m_func != NULL );
+            assert( m_func );
             return *m_func;
         }
     };
             return *m_func;
         }
     };
@@ -86,7 +86,7 @@ namespace cds { namespace details {
 
         func_ref get()
         {
 
         func_ref get()
         {
-            assert( m_func != NULL );
+            assert( m_func );
             return *m_func;
         }
     };
             return *m_func;
         }
     };
@@ -104,7 +104,7 @@ namespace cds { namespace details {
 
         func_ref get()
         {
 
         func_ref get()
         {
-            assert( m_func != NULL );
+            assert( m_func );
             return *m_func;
         }
     };
             return *m_func;
         }
     };
@@ -122,7 +122,7 @@ namespace cds { namespace details {
 
         func_ref get()
         {
 
         func_ref get()
         {
-            assert( m_func != NULL );
+            assert( m_func );
             return *m_func;
         }
     };
             return *m_func;
         }
     };
@@ -140,7 +140,7 @@ namespace cds { namespace details {
 
         func_ref get()
         {
 
         func_ref get()
         {
-            assert( m_func != NULL );
+            assert( m_func );
             return *m_func;
         }
     };
             return *m_func;
         }
     };
index da19d1e988184b6d4c67bb28628dd5b81ad7b140..91b490c839322698c74a4e5198f87e1e296fbd8f 100644 (file)
@@ -29,10 +29,10 @@ namespace cds { namespace gc {
                 return p1.m_p < p2.m_p;
             }
 
                 return p1.m_p < p2.m_p;
             }
 
-            /// Default ctor initializes pointer to NULL
+            /// Default ctor initializes pointer to \p nullptr
             retired_ptr()
             retired_ptr()
-                : m_p( NULL )
-                , m_funcFree( NULL )
+                : m_p( nullptr )
+                , m_funcFree( nullptr )
             {}
 
             /// Ctor
             {}
 
             /// Ctor
@@ -59,8 +59,8 @@ namespace cds { namespace gc {
             /// Invokes destructor function for the pointer
             void free()
             {
             /// Invokes destructor function for the pointer
             void free()
             {
-                assert( m_funcFree != NULL );
-                assert( m_p != NULL );
+                assert( m_funcFree );
+                assert( m_p );
                 m_funcFree( m_p );
 
                 CDS_STRICT_DO( m_p = nullptr );
                 m_funcFree( m_p );
 
                 CDS_STRICT_DO( m_p = nullptr );
index d59baeed0c866ecf867464aa1402e878b92778d1..b5781039864f7e93c2e1c579abb9ec08d57cf421 100644 (file)
@@ -115,7 +115,7 @@ namespace cds { namespace gc {
             return *value_cast()( m_guard.template get<guarded_type>() );
         }
 
             return *value_cast()( m_guard.template get<guarded_type>() );
         }
 
-        /// Checks if the guarded pointer is \p NULL
+        /// Checks if the guarded pointer is \p nullptr
         bool empty() const CDS_NOEXCEPT
         {
             return m_guard.template get<guarded_type>() == nullptr;
         bool empty() const CDS_NOEXCEPT
         {
             return m_guard.template get<guarded_type>() == nullptr;
index 4b6d0edcf444dbf341a7530d8b39079364f3e28b..6c00f4c542ed7e626de6e05443b03633da0f8672 100644 (file)
@@ -222,6 +222,13 @@ namespace cds { namespace gc {
                 return base_class::operator =(p);
             }
 
                 return base_class::operator =(p);
             }
 
+            //@cond
+            std::nullptr_t assign( std::nullptr_t )
+            {
+                return base_class::operator =(nullptr);
+            }
+            //@endcond
+
             /// Copy from \p src guard to \p this guard
             void copy( Guard const& src )
             {
             /// Copy from \p src guard to \p this guard
             void copy( Guard const& src )
             {
@@ -242,7 +249,7 @@ namespace cds { namespace gc {
             /// Clear value of the guard
             void clear()
             {
             /// Clear value of the guard
             void clear()
             {
-                assign( reinterpret_cast<void *>(NULL) );
+                assign( nullptr );
             }
 
             /// Get the value currently protected
             }
 
             /// Get the value currently protected
index ff5239314e7e416f34e08dc7e06998035b2eb59d..068adecd239e9b627d4686f65b4b3698888b8a89 100644 (file)
@@ -130,7 +130,7 @@ namespace cds { namespace gc {
                     for all x where link[x] of node is reference-counted do
                 retry:
                         node1 := link[x];
                     for all x where link[x] of node is reference-counted do
                 retry:
                         node1 := link[x];
-                        if node1 != NULL and node1.m_bDeleted then
+                        if node1 != nullptr and node1.m_bDeleted then
                             node2 := node1->link[x];
                             pGC->CASRef( this->link[x], node1, node2 );
                             pGC->releaseRef( node2 );
                             node2 := node1->link[x];
                             pGC->CASRef( this->link[x], node1, node2 );
                             pGC->releaseRef( node2 );
@@ -159,11 +159,11 @@ namespace cds { namespace gc {
                 void terminate( ThreadGC * pGC, bool bConcurrent)
                     if !bConcurrent
                         for all this->link where link is reference-counted do
                 void terminate( ThreadGC * pGC, bool bConcurrent)
                     if !bConcurrent
                         for all this->link where link is reference-counted do
-                            link := NULL;
+                            link := nullptr;
                     else
                         for all this->link where link is reference-counted do
                             repeat node1 := link;
                     else
                         for all this->link where link is reference-counted do
                             repeat node1 := link;
-                            until pGC->CASRef(link,node1,NULL);
+                            until pGC->CASRef(link,node1,nullptr);
                 \endcode
             */
             virtual void    terminate( ThreadGC * pGC, bool bConcurrent ) = 0;
                 \endcode
             */
             virtual void    terminate( ThreadGC * pGC, bool bConcurrent ) = 0;
@@ -262,7 +262,7 @@ namespace cds { namespace gc {
 #endif
             };
 
 #endif
             };
 
-            /// "Global GC object is NULL" exception
+            /// "Global GC object is nullptr" exception
             CDS_DECLARE_EXCEPTION( HRCGarbageCollectorEmpty, "Global cds::gc::hrc::GarbageCollector is NULL" );
 
             /// Not enough required Hazard Pointer count
             CDS_DECLARE_EXCEPTION( HRCGarbageCollectorEmpty, "Global cds::gc::hrc::GarbageCollector is NULL" );
 
             /// Not enough required Hazard Pointer count
index 7d9d5f15d3c939e9f0bb67c4b5806ac83892f551..40561fba0f491fd8d7fb9d7b27d9ab0a2e379365 100644 (file)
@@ -56,6 +56,14 @@ namespace cds {
                 return p;
             }
 
                 return p;
             }
 
+            //@cond
+            std::nullptr_t operator=( std::nullptr_t ) CDS_NOEXCEPT
+            {
+                clear();
+                return nullptr;
+            }
+            //@endcond
+
             /// Returns current value of hazard pointer
             /**
                 Loading has acquire semantics
             /// Returns current value of hazard pointer
             /**
                 Loading has acquire semantics
@@ -159,7 +167,7 @@ namespace cds {
                 return m_arr[nIndex];
             }
 
                 return m_arr[nIndex];
             }
 
-            /// Clears (sets to NULL) hazard pointer \p nIndex
+            /// Clears (sets to \p nullptr) hazard pointer \p nIndex
             void clear( size_t nIndex ) CDS_NOEXCEPT
             {
                 assert( nIndex < capacity() );
             void clear( size_t nIndex ) CDS_NOEXCEPT
             {
                 assert( nIndex < capacity() );
index fc3dd20cdf4b4ccc4c9c261aa17885000e05d826..27d1cec76e01e080f34543a8075212132fcb93bb 100644 (file)
@@ -214,7 +214,7 @@ namespace cds {
                 //@cond
                 hplist_node( const GarbageCollector& HzpMgr )
                     : HPRec( HzpMgr ),
                 //@cond
                 hplist_node( const GarbageCollector& HzpMgr )
                     : HPRec( HzpMgr ),
-                    m_pNextNode(NULL),
+                    m_pNextNode( nullptr ),
                     m_idOwner( OS::c_NullThreadId ),
                     m_bFree( true )
                 {}
                     m_idOwner( OS::c_NullThreadId ),
                     m_bFree( true )
                 {}
@@ -310,7 +310,7 @@ namespace cds {
             /// Returns pointer to GarbageCollector instance
             static GarbageCollector&   instance()
             {
             /// Returns pointer to GarbageCollector instance
             static GarbageCollector&   instance()
             {
-                if ( m_pHZPManager == NULL )
+                if ( !m_pHZPManager )
                     throw HZPManagerEmpty();
                 return *m_pHZPManager;
             }
                     throw HZPManagerEmpty();
                 return *m_pHZPManager;
             }
@@ -318,7 +318,7 @@ namespace cds {
             /// Checks if global GC object is constructed and may be used
             static bool isUsed()
             {
             /// Checks if global GC object is constructed and may be used
             static bool isUsed()
             {
-                return m_pHZPManager != NULL;
+                return m_pHZPManager != nullptr;
             }
 
             /// Returns max Hazard Pointer count defined in construction time
             }
 
             /// Returns max Hazard Pointer count defined in construction time
@@ -467,7 +467,7 @@ namespace cds {
         public:
             ThreadGC()
                 : m_HzpManager( GarbageCollector::instance() ),
         public:
             ThreadGC()
                 : m_HzpManager( GarbageCollector::instance() ),
-                m_pHzpRec( NULL )
+                m_pHzpRec( nullptr )
             {}
             ~ThreadGC()
             {
             {}
             ~ThreadGC()
             {
@@ -475,7 +475,7 @@ namespace cds {
             }
 
             /// Checks if thread GC is initialized
             }
 
             /// Checks if thread GC is initialized
-            bool    isInitialized() const   { return m_pHzpRec != NULL ; }
+            bool    isInitialized() const   { return m_pHzpRec != nullptr; }
 
             /// Initialization. Repeat call is available
             void init()
 
             /// Initialization. Repeat call is available
             void init()
@@ -489,7 +489,7 @@ namespace cds {
             {
                 if ( m_pHzpRec ) {
                     details::HPRec * pRec = m_pHzpRec;
             {
                 if ( m_pHzpRec ) {
                     details::HPRec * pRec = m_pHzpRec;
-                    m_pHzpRec = NULL;
+                    m_pHzpRec = nullptr;
                     m_HzpManager.RetireHPRec( pRec );
                 }
             }
                     m_HzpManager.RetireHPRec( pRec );
                 }
             }
@@ -497,14 +497,14 @@ namespace cds {
             /// Initializes HP guard \p guard
             details::HPGuard& allocGuard()
             {
             /// Initializes HP guard \p guard
             details::HPGuard& allocGuard()
             {
-                assert( m_pHzpRec != NULL );
+                assert( m_pHzpRec );
                 return m_pHzpRec->m_hzp.alloc();
             }
 
             /// Frees HP guard \p guard
             void freeGuard( details::HPGuard& guard )
             {
                 return m_pHzpRec->m_hzp.alloc();
             }
 
             /// Frees HP guard \p guard
             void freeGuard( details::HPGuard& guard )
             {
-                assert( m_pHzpRec != NULL );
+                assert( m_pHzpRec );
                 m_pHzpRec->m_hzp.free( guard );
             }
 
                 m_pHzpRec->m_hzp.free( guard );
             }
 
@@ -512,7 +512,7 @@ namespace cds {
             template <size_t Count>
             void allocGuard( details::HPArray<Count>& arr )
             {
             template <size_t Count>
             void allocGuard( details::HPArray<Count>& arr )
             {
-                assert( m_pHzpRec != NULL );
+                assert( m_pHzpRec );
                 m_pHzpRec->m_hzp.alloc( arr );
             }
 
                 m_pHzpRec->m_hzp.alloc( arr );
             }
 
@@ -520,7 +520,7 @@ namespace cds {
             template <size_t Count>
             void freeGuard( details::HPArray<Count>& arr )
             {
             template <size_t Count>
             void freeGuard( details::HPArray<Count>& arr )
             {
-                assert( m_pHzpRec != NULL );
+                assert( m_pHzpRec );
                 m_pHzpRec->m_hzp.free( arr );
             }
 
                 m_pHzpRec->m_hzp.free( arr );
             }
 
@@ -601,6 +601,11 @@ namespace cds {
             }
 
             //@cond
             }
 
             //@cond
+            std::nullptr_t operator =(std::nullptr_t)
+            {
+                return m_hp = nullptr;
+            }
+
             hazard_ptr get() const
             {
                 return m_hp;
             hazard_ptr get() const
             {
                 return m_hp;
index 075deafe3382e271c53bc7cba5e0f9ed37187f01..b1afc4ff916a29ce3ceca291cacde9d8b1a859ad 100644 (file)
@@ -526,6 +526,14 @@ namespace cds { namespace gc {
                     return p;
                 }
 
                     return p;
                 }
 
+                //@cond
+                std::nullptr_t operator=(std::nullptr_t)
+                {
+                    clear();
+                    return nullptr;
+                }
+                //@endcond
+
             public: // for ThreadGC.
                 /*
                     GCC cannot compile code for template versions of ThreasGC::allocGuard/freeGuard,
             public: // for ThreadGC.
                 /*
                     GCC cannot compile code for template versions of ThreasGC::allocGuard/freeGuard,
@@ -587,6 +595,13 @@ namespace cds { namespace gc {
             {
                 return base_class::operator =<T>( p );
             }
             {
                 return base_class::operator =<T>( p );
             }
+
+            //@cond
+            std::nullptr_t operator=(std::nullptr_t)
+            {
+                return base_class::operator =(nullptr);
+            }
+            //@endcond
         };
 
         /// Array of guards
         };
 
         /// Array of guards
@@ -649,7 +664,7 @@ namespace cds { namespace gc {
                 m_arr[nIndex].set( p );
             }
 
                 m_arr[nIndex].set( p );
             }
 
-            /// Clears (sets to NULL) the guard \p nIndex
+            /// Clears (sets to \p nullptr) the guard \p nIndex
             void clear( size_t nIndex )
             {
                 assert( nIndex < capacity() );
             void clear( size_t nIndex )
             {
                 assert( nIndex < capacity() );
index 790d5858c6c15f4e85d34a3402b59caaa7f26dea..175e9064f1f30152cdbcbd7f7ae7e95f59589c45 100644 (file)
@@ -224,6 +224,13 @@ namespace cds { namespace gc {
                 return base_class::operator =(p);
             }
 
                 return base_class::operator =(p);
             }
 
+            //@cond
+            std::nullptr_t assign( std::nullptr_t )
+            {
+                return base_class::operator =(nullptr);
+            }
+            //@endcond
+
             /// Store marked pointer \p p to the guard
             /**
                 The function equals to a simple assignment of <tt>p.ptr()</tt>, no loop is performed.
             /// Store marked pointer \p p to the guard
             /**
                 The function equals to a simple assignment of <tt>p.ptr()</tt>, no loop is performed.
index 3d57b46ed436274182d403918f55694038f5c9ce..ccf896459e4652132f170c3bb5260a1b5715fd36 100644 (file)
@@ -758,7 +758,7 @@ namespace cds { namespace intrusive {
 
         /// Dequeues a value from the queue
         /** @anchor cds_intrusive_BasketQueue_dequeue
 
         /// Dequeues a value from the queue
         /** @anchor cds_intrusive_BasketQueue_dequeue
-            If the queue is empty the function returns \p NULL.
+            If the queue is empty the function returns \p nullptr.
 
             <b>Warning</b>: see MSQueue::deque note about item disposing
         */
 
             <b>Warning</b>: see MSQueue::deque note about item disposing
         */
@@ -797,7 +797,7 @@ namespace cds { namespace intrusive {
 
         /// Clear the queue
         /**
 
         /// Clear the queue
         /**
-            The function repeatedly calls \ref dequeue until it returns \p NULL.
+            The function repeatedly calls \ref dequeue until it returns \p nullptr.
             The disposer defined in template \p Options is called for each item
             that can be safely disposed.
         */
             The disposer defined in template \p Options is called for each item
             that can be safely disposed.
         */
index dd07159d3afe90e6eb3a1c709de0cbd76a3dc1b5..340c4ede4532f05de9d941ebbbb6cd7807e5d8f2 100644 (file)
@@ -1582,9 +1582,9 @@ namespace cds { namespace intrusive {
 
             The <tt>insert(x)</tt> successively "kicks out" conflicting items until every key has a slot.
             To add \p x, the method swaps \p x with \p y, the current occupant of <tt>table[0][h0(x)]</tt>.
 
             The <tt>insert(x)</tt> successively "kicks out" conflicting items until every key has a slot.
             To add \p x, the method swaps \p x with \p y, the current occupant of <tt>table[0][h0(x)]</tt>.
-            If the prior value was \p NULL, it is done. Otherwise, it swaps the newly nest-less value \p y
+            If the prior value was \p nullptr, it is done. Otherwise, it swaps the newly nest-less value \p y
             for the current occupant of <tt>table[1][h1(y)]</tt> in the same way. As before, if the prior value
             for the current occupant of <tt>table[1][h1(y)]</tt> in the same way. As before, if the prior value
-            was \p NULL, it is done. Otherwise, the method continues swapping entries (alternating tables)
+            was \p nullptr, it is done. Otherwise, the method continues swapping entries (alternating tables)
             until it finds an empty slot. We might not find an empty slot, either because the table is full,
             or because the sequence of displacement forms a cycle. We therefore need an upper limit on the
             number of successive displacements we are willing to undertake. When this limit is exceeded,
             until it finds an empty slot. We might not find an empty slot, either because the table is full,
             or because the sequence of displacement forms a cycle. We therefore need an upper limit on the
             number of successive displacements we are willing to undertake. When this limit is exceeded,
@@ -2596,7 +2596,7 @@ namespace cds { namespace intrusive {
             The function searches an item with key equal to \p val in the set,
             unlinks it from the set, and returns a pointer to unlinked item.
 
             The function searches an item with key equal to \p val in the set,
             unlinks it from the set, and returns a pointer to unlinked item.
 
-            If the item with key equal to \p val is not found the function return \p NULL.
+            If the item with key equal to \p val is not found the function return \p nullptr.
 
             Note the hash functor should accept a parameter of type \p Q that can be not the same as \p value_type.
         */
 
             Note the hash functor should accept a parameter of type \p Q that can be not the same as \p value_type.
         */
@@ -2641,7 +2641,7 @@ namespace cds { namespace intrusive {
             \endcode
             The functor may be passed by reference with <tt>boost:ref</tt>
 
             \endcode
             The functor may be passed by reference with <tt>boost:ref</tt>
 
-            If the item with key equal to \p val is not found the function return \p NULL.
+            If the item with key equal to \p val is not found the function return \p nullptr.
 
             Note the hash functor should accept a parameter of type \p Q that can be not the same as \p value_type.
         */
 
             Note the hash functor should accept a parameter of type \p Q that can be not the same as \p value_type.
         */
index 5d9c35b6699f30886cd8b8cc1780bff308452956..3a8170912e7b05cd421488fecefb6e3c110b0b67 100644 (file)
@@ -1258,7 +1258,7 @@ namespace cds { namespace intrusive {
         /// Finds \p key and return the item found
         /** \anchor cds_intrusive_EllenBinTree_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
         /// Finds \p key and return the item found
         /** \anchor cds_intrusive_EllenBinTree_rcu_get
             The function searches the item with key equal to \p key and returns the pointer to item found.
-            If \p key is not found it returns \p NULL.
+            If \p key is not found it returns \p nullptr.
 
             RCU should be locked before call the function.
             Returned pointer is valid while RCU is locked.
 
             RCU should be locked before call the function.
             Returned pointer is valid while RCU is locked.
index c6558cbbdc7096d5c7096a9350ce585b80bfcf0a..f2ee2bb764f1e2bde2246c85e6fc4d942fea26dd 100644 (file)
@@ -171,9 +171,9 @@ namespace cds { namespace intrusive {
             typedef Node node_type;
             //@endcond
 
             typedef Node node_type;
             //@endcond
 
-            /// Checks if the link field of node \p pNode is NULL
+            /// Checks if the link field of node \p pNode is \p nullptr
             /**
             /**
-                An asserting is generated if \p pNode link field is not NULL
+                An asserting is generated if \p pNode link field is not \p nullptr
             */
             static void is_empty( node_type const * pNode )
             {
             */
             static void is_empty( node_type const * pNode )
             {
index da544691462face35ae41cad01d8c2185d927d7e..ca43491ff9b8afd4347426795be00ff6ed084050 100644 (file)
@@ -446,7 +446,7 @@ namespace cds { namespace intrusive {
         /// Finds the key \p val
         /** \anchor cds_intrusive_LazyList_nogc_find_val
             The function searches the item with key equal to \p val
         /// Finds the key \p val
         /** \anchor cds_intrusive_LazyList_nogc_find_val
             The function searches the item with key equal to \p val
-            and returns pointer to value found or \p NULL.
+            and returns pointer to value found or \p nullptr.
         */
         template <typename Q>
         value_type * find( Q const& val )
         */
         template <typename Q>
         value_type * find( Q const& val )
index 32e41b1d79e6664d5686316ed929cc36276ed347..7e15553dba7d1aaf9b8d9d7d14f3d44595ac90b2 100644 (file)
@@ -771,7 +771,7 @@ namespace cds { namespace intrusive {
         /// Finds the key \p val and return the item found
         /** \anchor cds_intrusive_LazyList_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
         /// Finds the key \p val and return the item found
         /** \anchor cds_intrusive_LazyList_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
-            If \p val is not found it returns \p NULL.
+            If \p val is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
index 539d3f44af718c48fe0d151a95f7007b8e713751..d9d2af4af2dead47e94341f6d60b948488120e39 100644 (file)
@@ -915,7 +915,7 @@ namespace cds { namespace intrusive {
 
         /// Pop back
         /**
 
         /// Pop back
         /**
-            Pops rightmost item from the deque. If the deque is empty then returns \p NULL.
+            Pops rightmost item from the deque. If the deque is empty then returns \p nullptr.
 
             For popped object the disposer specified in \p Options template parameters is called.
         */
 
             For popped object the disposer specified in \p Options template parameters is called.
         */
@@ -932,7 +932,7 @@ namespace cds { namespace intrusive {
 
         /// Pop front
         /**
 
         /// Pop front
         /**
-            Pops leftmost item from the deque. If the deque is empty then returns \p NULL.
+            Pops leftmost item from the deque. If the deque is empty then returns \p nullptr.
 
             For popped object the disposer specified in \p Options template parameters is called.
         */
 
             For popped object the disposer specified in \p Options template parameters is called.
         */
@@ -969,7 +969,7 @@ namespace cds { namespace intrusive {
 
         /// Clear the deque
         /**
 
         /// Clear the deque
         /**
-            The function repeatedly calls \ref pop_back until it returns \p NULL.
+            The function repeatedly calls \ref pop_back until it returns \p nullptr.
             The disposer defined in template \p Options is called for each item
             that can be safely disposed.
         */
             The disposer defined in template \p Options is called for each item
             that can be safely disposed.
         */
index 29927ea7399fd58ff877562bd31f6a64e477c66c..39ccaa55b94fc62f00dcb2213abd583ec928e86e 100644 (file)
@@ -123,9 +123,9 @@ namespace cds { namespace intrusive {
             typedef Node node_type;
             //@endcond
 
             typedef Node node_type;
             //@endcond
 
-            /// Checks if the link field of node \p pNode is \p NULL
+            /// Checks if the link field of node \p pNode is \p nullptr
             /**
             /**
-                An asserting is generated if \p pNode link field is not \p NULL
+                An asserting is generated if \p pNode link field is not \p nullptr
             */
             static void is_empty( const node_type * pNode )
             {
             */
             static void is_empty( const node_type * pNode )
             {
index b2aea04f64c151b972d636879eba42b427e7f137..f3a783fb2e8680362f3194de007b327067680c4f 100644 (file)
@@ -26,7 +26,7 @@ namespace cds { namespace intrusive { namespace michael_list {
     protected:
         virtual void cleanUp( cds::gc::hrc::ThreadGC * pGC )
         {
     protected:
         virtual void cleanUp( cds::gc::hrc::ThreadGC * pGC )
         {
-            assert( pGC != NULL );
+            assert( pGC );
             typename gc::GuardArray<2> aGuards( *pGC );
 
             while ( true ) {
             typename gc::GuardArray<2> aGuards( *pGC );
 
             while ( true ) {
index 479690f1c57f115ce211e2fdbee72c090992cd34..4fd358bc559bc9a7dc55f650013f62d1ac83a0d1 100644 (file)
@@ -467,7 +467,7 @@ namespace cds { namespace intrusive {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to <tt>NULL</tt>.
+            Internally, <tt>end</tt> returning value equals to \p nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list <tt>begin() == end()</tt>
 
             The returned value can be used only to control reaching the end of the list.
             For empty list <tt>begin() == end()</tt>
index 7b8b7990a6ce2a066f94a5eb691d176ba9e197cc..67952fba5ff74c9fa42a1fa7c9ce16d1bf6072ea 100644 (file)
@@ -236,7 +236,7 @@ namespace cds { namespace intrusive {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to <tt>NULL</tt>.
+            Internally, <tt>end</tt> returning value equals to \p nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
@@ -410,7 +410,7 @@ namespace cds { namespace intrusive {
         /// Finds the key \p val
         /** \anchor cds_intrusive_MichaelList_nogc_find_val
             The function searches the item with key equal to \p val
         /// Finds the key \p val
         /** \anchor cds_intrusive_MichaelList_nogc_find_val
             The function searches the item with key equal to \p val
-            and returns pointer to value found or \p NULL.
+            and returns pointer to value found or \p nullptr.
         */
         template <typename Q>
         value_type * find( Q const & val )
         */
         template <typename Q>
         value_type * find( Q const & val )
index f54c1f215435c3803d2dfe6c3d31532ae4483331..c19953e4d26aaf31df975d5472fac277229e46ec 100644 (file)
@@ -288,7 +288,7 @@ namespace cds { namespace intrusive {
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
         /// Returns an iterator that addresses the location succeeding the last element in a list
         /**
             Do not use the value returned by <tt>end</tt> function to access any item.
-            Internally, <tt>end</tt> returning value equals to \p NULL.
+            Internally, <tt>end</tt> returning value equals to \p nullptr.
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
 
             The returned value can be used only to control reaching the end of the list.
             For empty list \code begin() == end() \endcode
@@ -678,7 +678,7 @@ namespace cds { namespace intrusive {
         /// Finds the key \p val and return the item found
         /** \anchor cds_intrusive_MichaelList_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
         /// Finds the key \p val and return the item found
         /** \anchor cds_intrusive_MichaelList_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
-            If \p val is not found it returns \p NULL.
+            If \p val is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
index 51efe380e379b8c4e3a06e4d053778822fd57d04..1196c1286d1026132ff305525857fd4a5b83cf90 100644 (file)
@@ -224,7 +224,7 @@ namespace cds { namespace intrusive {
         /// Finds the key \p val
         /** \anchor cds_intrusive_MichaelHashSet_nogc_find_val
             The function searches the item with key equal to \p val
         /// Finds the key \p val
         /** \anchor cds_intrusive_MichaelHashSet_nogc_find_val
             The function searches the item with key equal to \p val
-            and returns pointer to item found, otherwise \p NULL.
+            and returns pointer to item found, otherwise \p nullptr.
 
             Note the hash functor specified for class \p Traits template parameter
             should accept a parameter of type \p Q that can be not the same as \p value_type.
 
             Note the hash functor specified for class \p Traits template parameter
             should accept a parameter of type \p Q that can be not the same as \p value_type.
index 8e1300237d38a765186b83e67858dcef3004e305..d155e93d8213490ae8df1a028b220d148d8ab186 100644 (file)
@@ -583,7 +583,7 @@ namespace cds { namespace intrusive {
         /// Finds the key \p val and return the item found
         /** \anchor cds_intrusive_MichaelHashSet_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
         /// Finds the key \p val and return the item found
         /** \anchor cds_intrusive_MichaelHashSet_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
-            If \p val is not found it returns \p NULL.
+            If \p val is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
index fc52400a32c5b8eb957396fa06425f0707638c3d..67f51d4dcff339be5d092db25c0739d045cb5331 100644 (file)
@@ -356,7 +356,7 @@ namespace cds { namespace intrusive {
 
         /// Dequeues a value from the queue
         /** @anchor cds_intrusive_MSQueue_dequeue
 
         /// Dequeues a value from the queue
         /** @anchor cds_intrusive_MSQueue_dequeue
-            If the queue is empty the function returns \p NULL.
+            If the queue is empty the function returns \p nullptr.
 
             \par Warning
             The queue algorithm has following feature: when \p dequeue is called,
 
             \par Warning
             The queue algorithm has following feature: when \p dequeue is called,
@@ -411,7 +411,7 @@ namespace cds { namespace intrusive {
 
         /// Clear the queue
         /**
 
         /// Clear the queue
         /**
-            The function repeatedly calls \ref dequeue until it returns \p NULL.
+            The function repeatedly calls \ref dequeue until it returns \p nullptr.
             The disposer defined in template \p Options is called for each item
             that can be safely disposed.
         */
             The disposer defined in template \p Options is called for each item
             that can be safely disposed.
         */
index 6dda1f37ff9a3f6a9478da9a4459b34cf94d2d5f..0f2c8c6dc0fe18c7e57d9cd5f53a4da7c0e5818b 100644 (file)
@@ -64,7 +64,7 @@ namespace cds { namespace intrusive {
         }
         static node_type * to_node_ptr( value_type * v )
         {
         }
         static node_type * to_node_ptr( value_type * v )
         {
-            return v ? static_cast<node_type *>( v ) : reinterpret_cast<node_type *>( NULL );
+            return v ? static_cast<node_type *>(v) : nullptr;
         }
         static const node_type * to_node_ptr( const value_type& v )
         {
         }
         static const node_type * to_node_ptr( const value_type& v )
         {
@@ -72,7 +72,7 @@ namespace cds { namespace intrusive {
         }
         static const node_type * to_node_ptr( const value_type * v )
         {
         }
         static const node_type * to_node_ptr( const value_type * v )
         {
-            return v ? static_cast<const node_type *>( v ) : reinterpret_cast<const node_type *>( NULL );
+            return v ? static_cast<const node_type *>(v) : nullptr;
         }
         static value_type * to_value_ptr( node_type&  n )
         {
         }
         static value_type * to_value_ptr( node_type&  n )
         {
@@ -80,7 +80,7 @@ namespace cds { namespace intrusive {
         }
         static value_type * to_value_ptr( node_type *  n )
         {
         }
         static value_type * to_value_ptr( node_type *  n )
         {
-            return n ? static_cast<value_type *>( n ) : reinterpret_cast<value_type *>( NULL );
+            return n ? static_cast<value_type *>(n) : nullptr;
         }
         static const value_type * to_value_ptr( const node_type& n )
         {
         }
         static const value_type * to_value_ptr( const node_type& n )
         {
@@ -88,7 +88,7 @@ namespace cds { namespace intrusive {
         }
         static const value_type * to_value_ptr( const node_type * n )
         {
         }
         static const value_type * to_value_ptr( const node_type * n )
         {
-            return n ? static_cast<const value_type *>( n ) : reinterpret_cast<const value_type *>( NULL );
+            return n ? static_cast<const value_type *>(n) : nullptr;
         }
     };
 
         }
     };
 
@@ -104,7 +104,7 @@ namespace cds { namespace intrusive {
         }
         static node_type * to_node_ptr( value_type * v )
         {
         }
         static node_type * to_node_ptr( value_type * v )
         {
-            return v ? to_node_ptr(*v) : reinterpret_cast<node_type *>( NULL );
+            return v ? to_node_ptr( *v ) : nullptr;
         }
         static const node_type * to_node_ptr( const value_type& v )
         {
         }
         static const node_type * to_node_ptr( const value_type& v )
         {
@@ -112,7 +112,7 @@ namespace cds { namespace intrusive {
         }
         static const node_type * to_node_ptr( const value_type * v )
         {
         }
         static const node_type * to_node_ptr( const value_type * v )
         {
-            return v ? to_node_ptr(*v) : reinterpret_cast<const node_type *>( NULL );
+            return v ? to_node_ptr( *v ) : nullptr;
         }
         static value_type * to_value_ptr( node_type& n )
         {
         }
         static value_type * to_value_ptr( node_type& n )
         {
@@ -120,7 +120,7 @@ namespace cds { namespace intrusive {
         }
         static value_type * to_value_ptr( node_type * n )
         {
         }
         static value_type * to_value_ptr( node_type * n )
         {
-            return n ? to_value_ptr(*n) : reinterpret_cast<value_type *>( NULL );
+            return n ? to_value_ptr( *n ) : nullptr;
         }
         static const value_type * to_value_ptr( const node_type& n )
         {
         }
         static const value_type * to_value_ptr( const node_type& n )
         {
@@ -128,7 +128,7 @@ namespace cds { namespace intrusive {
         }
         static const value_type * to_value_ptr( const node_type * n )
         {
         }
         static const value_type * to_value_ptr( const node_type * n )
         {
-            return n ? to_value_ptr(*n) : reinterpret_cast<const value_type *>( NULL );
+            return n ? to_value_ptr( *n ) : nullptr;
         }
     };
 
         }
     };
 
index 1b072b1b6840d3a445cce4e6ea2ba3692daff4f8..eda9ce2092f43e05c18260131c83cebf0860c320 100644 (file)
@@ -111,9 +111,9 @@ namespace cds { namespace intrusive {
             typedef Node node_type;
             //@endcond
 
             typedef Node node_type;
             //@endcond
 
-            /// Checks if the link fields of node \p pNode is NULL
+            /// Checks if the link fields of node \p pNode is \p nullptr
             /**
             /**
-                An asserting is generated if \p pNode link fields is not NULL
+                An asserting is generated if \p pNode link fields is not \p nullptr
             */
             static void is_empty( const node_type * pNode )
             {
             */
             static void is_empty( const node_type * pNode )
             {
@@ -528,7 +528,7 @@ namespace cds { namespace intrusive {
 
         /// Dequeues a value from the queue
         /** @anchor cds_intrusive_OptimisticQueue_dequeue
 
         /// Dequeues a value from the queue
         /** @anchor cds_intrusive_OptimisticQueue_dequeue
-            If the queue is empty the function returns \a NULL
+            If the queue is empty the function returns \p nullptr
 
             \par Warning
             The queue algorithm has following feature: when \p dequeue is called,
 
             \par Warning
             The queue algorithm has following feature: when \p dequeue is called,
@@ -581,7 +581,7 @@ namespace cds { namespace intrusive {
 
         /// Clear the stack
         /**
 
         /// Clear the stack
         /**
-            The function repeatedly calls \ref dequeue until it returns NULL.
+            The function repeatedly calls \ref dequeue until it returns \p nullptr.
             The disposer defined in template \p Options is called for each item
             that can be safely disposed.
         */
             The disposer defined in template \p Options is called for each item
             that can be safely disposed.
         */
index 5478b797b0b33fc3c6cb80f3e75599bb95971caa..3d7ec4036486b881cae4bb97a919b87611dbe55c 100644 (file)
@@ -81,7 +81,7 @@ namespace cds { namespace intrusive {
             - \ref always_check_link - check in debug and release build (not yet implemented for release mode).
 
             When link checking is on, the container tests that the node's link fields
             - \ref always_check_link - check in debug and release build (not yet implemented for release mode).
 
             When link checking is on, the container tests that the node's link fields
-            must be NULL before inserting the item. If the link is not NULL an assertion is generated
+            must be \p nullptr before inserting the item. If the link is not \p nullptr an assertion is generated
         */
         template <link_check_type Value>
         struct link_checker {
         */
         template <link_check_type Value>
         struct link_checker {
index eea6176502cdb4ec463a4fb20d06a7732b675dc4..324409abb8916eace35d83e1596955bb712f2145 100644 (file)
@@ -160,9 +160,9 @@ namespace cds { namespace intrusive {
             typedef Node node_type;
             //@endcond
 
             typedef Node node_type;
             //@endcond
 
-            /// Checks if the link field of node \p pNode is NULL
+            /// Checks if the link field of node \p pNode is \p nullptr
             /**
             /**
-                An asserting is generated if \p pNode link field is not NULL
+                An asserting is generated if \p pNode link field is not \p nullptr
             */
             static void is_empty( const node_type * pNode )
             {
             */
             static void is_empty( const node_type * pNode )
             {
index 36af85e6cc924dc128c141392d1f7aa576b9d87f..9e048e6e376898630e16045e3e4a3b2b49035dcb 100644 (file)
@@ -40,7 +40,7 @@ namespace cds { namespace intrusive {
         protected:
             atomic_marked_ptr       m_pNext     ;   ///< Next item in bottom-list (list at level 0)
             unsigned int            m_nHeight   ;   ///< Node height (size of m_arrNext array). For node at level 0 the height is 1.
         protected:
             atomic_marked_ptr       m_pNext     ;   ///< Next item in bottom-list (list at level 0)
             unsigned int            m_nHeight   ;   ///< Node height (size of m_arrNext array). For node at level 0 the height is 1.
-            atomic_marked_ptr *     m_arrNext   ;   ///< Array of next items for levels 1 .. m_nHeight - 1. For node at level 0 \p m_arrNext is \p NULL
+            atomic_marked_ptr *     m_arrNext   ;   ///< Array of next items for levels 1 .. m_nHeight - 1. For node at level 0 \p m_arrNext is \p nullptr
 
         public:
             /// Constructs a node of height 1 (a bottom-list node)
 
         public:
             /// Constructs a node of height 1 (a bottom-list node)
index 15973a94e213a1a5aa9ab22b6f054b0651c81507..a283915dadbcf9803f393415711144d5f8cd11df 100644 (file)
@@ -23,7 +23,7 @@ namespace cds { namespace intrusive { namespace skip_list {
     protected:
         atomic_marked_ptr       m_pNext     ;   ///< Next item in bottom-list (list at level 0)
         unsigned int            m_nHeight   ;   ///< Node height (size of m_arrNext array). For node at level 0 the height is 1.
     protected:
         atomic_marked_ptr       m_pNext     ;   ///< Next item in bottom-list (list at level 0)
         unsigned int            m_nHeight   ;   ///< Node height (size of m_arrNext array). For node at level 0 the height is 1.
-        atomic_marked_ptr *     m_arrNext   ;   ///< Array of next items for levels 1 .. m_nHeight - 1. For node at level 0 \p m_arrNext is \p NULL
+        atomic_marked_ptr *     m_arrNext   ;   ///< Array of next items for levels 1 .. m_nHeight - 1. For node at level 0 \p m_arrNext is \p nullptr
 
     public:
         bool                    m_bDel;
 
     public:
         bool                    m_bDel;
@@ -112,7 +112,7 @@ namespace cds { namespace intrusive { namespace skip_list {
     protected:
         virtual void cleanUp( cds::gc::hrc::ThreadGC * pGC )
         {
     protected:
         virtual void cleanUp( cds::gc::hrc::ThreadGC * pGC )
         {
-            assert( pGC != NULL );
+            assert( pGC );
             typename gc::GuardArray<2> aGuards( *pGC );
 
             unsigned int const nHeight = height();
             typename gc::GuardArray<2> aGuards( *pGC );
 
             unsigned int const nHeight = height();
index a2c19d251ddc17c63b90d84d27264d5a97bfa520..b19fb52f8d3feb993816ffa3cc90d9b4874ac579 100644 (file)
@@ -260,7 +260,7 @@ namespace cds { namespace intrusive {
             bool operator !=(iterator const& i ) const;
         };
         \endcode
             bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \p cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \p cend member functions points to \p nullptr and should not be dereferenced.
 
         <b>How to use</b>
 
 
         <b>How to use</b>
 
index 112e1b278d5afc99631b559c2fc4e6bc7855dd20..b5e6c97d00c60270c750e51c4d9bcfe4cb145945 100644 (file)
@@ -28,7 +28,7 @@ namespace cds { namespace intrusive {
         protected:
             atomic_ptr      m_pNext     ;   ///< Next item in bottom-list (list at level 0)
             unsigned int    m_nHeight   ;   ///< Node height (size of m_arrNext array). For node at level 0 the height is 1.
         protected:
             atomic_ptr      m_pNext     ;   ///< Next item in bottom-list (list at level 0)
             unsigned int    m_nHeight   ;   ///< Node height (size of m_arrNext array). For node at level 0 the height is 1.
-            atomic_ptr *    m_arrNext   ;   ///< Array of next items for levels 1 .. m_nHeight - 1. For node at level 0 \p m_arrNext is \p NULL
+            atomic_ptr *    m_arrNext   ;   ///< Array of next items for levels 1 .. m_nHeight - 1. For node at level 0 \p m_arrNext is \p nullptr
 
         public:
             /// Constructs a node of height 1 (a bottom-list node)
 
         public:
             /// Constructs a node of height 1 (a bottom-list node)
@@ -264,7 +264,7 @@ namespace cds { namespace intrusive {
             bool operator !=(iterator const& i ) const;
         };
         \endcode
             bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \p cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \p cend member functions points to \p nullptr and should not be dereferenced.
 
         <b>How to use</b>
 
 
         <b>How to use</b>
 
@@ -944,7 +944,7 @@ namespace cds { namespace intrusive {
 
         /// Gets minimum key from the set
         /**
 
         /// Gets minimum key from the set
         /**
-            If the set is empty the function returns \p NULL
+            If the set is empty the function returns \p nullptr
         */
         value_type * get_min() const
         {
         */
         value_type * get_min() const
         {
@@ -953,7 +953,7 @@ namespace cds { namespace intrusive {
 
         /// Gets maximum key from the set
         /**
 
         /// Gets maximum key from the set
         /**
-            The function returns \p NULL if the set is empty
+            The function returns \p nullptr if the set is empty
         */
         value_type * get_max() const
         {
         */
         value_type * get_max() const
         {
index d6d08839eba87562a57c9c12696c9b93cd031b12..3fb6778cab61e93c365950245876a81f899f54b5 100644 (file)
@@ -42,7 +42,7 @@ namespace cds { namespace intrusive {
 #       endif
         protected:
             unsigned int            m_nHeight   ;   ///< Node height (size of m_arrNext array). For node at level 0 the height is 1.
 #       endif
         protected:
             unsigned int            m_nHeight   ;   ///< Node height (size of m_arrNext array). For node at level 0 the height is 1.
-            atomic_marked_ptr *     m_arrNext   ;   ///< Array of next items for levels 1 .. m_nHeight - 1. For node at level 0 \p m_arrNext is \p NULL
+            atomic_marked_ptr *     m_arrNext   ;   ///< Array of next items for levels 1 .. m_nHeight - 1. For node at level 0 \p m_arrNext is \p nullptr
 
         public:
             /// Constructs a node of height 1 (a bottom-list node)
 
         public:
             /// Constructs a node of height 1 (a bottom-list node)
@@ -423,7 +423,7 @@ namespace cds { namespace intrusive {
             bool operator !=(iterator const& i ) const;
         };
         \endcode
             bool operator !=(iterator const& i ) const;
         };
         \endcode
-        Note, the iterator object returned by \ref end, \p cend member functions points to \p NULL and should not be dereferenced.
+        Note, the iterator object returned by \ref end, \p cend member functions points to \p nullptr and should not be dereferenced.
 
         <b>How to use</b>
 
 
         <b>How to use</b>
 
@@ -674,7 +674,7 @@ namespace cds { namespace intrusive {
 
         static void dispose_node( value_type * pVal )
         {
 
         static void dispose_node( value_type * pVal )
         {
-            assert( pVal != NULL );
+            assert( pVal );
 
             typename node_builder::node_disposer()( node_traits::to_node_ptr(pVal) );
             disposer()( pVal );
 
             typename node_builder::node_disposer()( node_traits::to_node_ptr(pVal) );
             disposer()( pVal );
@@ -2080,7 +2080,7 @@ retry:
         /// Finds the key \p val and return the item found
         /** \anchor cds_intrusive_SkipListSet_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
         /// Finds the key \p val and return the item found
         /** \anchor cds_intrusive_SkipListSet_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
-            If \p val is not found it returns \p NULL.
+            If \p val is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
index 6ed3ffe7977164e0052ab0c0ed812743baa24528..8d6640967aed8e4c58fe883dea1abbcb644972d2 100644 (file)
@@ -327,7 +327,7 @@ namespace cds { namespace intrusive {
         /// Finds the key \p val
         /** \anchor cds_intrusive_SplitListSet_nogc_find_val
             The function searches the item with key equal to \p val
         /// Finds the key \p val
         /** \anchor cds_intrusive_SplitListSet_nogc_find_val
             The function searches the item with key equal to \p val
-            and returns pointer to item found or , and \p NULL otherwise.
+            and returns pointer to item found or , and \p nullptr otherwise.
 
             Note the hash functor specified for class \p Traits template parameter
             should accept a parameter of type \p Q that can be not the same as \p value_type.
 
             Note the hash functor specified for class \p Traits template parameter
             should accept a parameter of type \p Q that can be not the same as \p value_type.
index 7401f18c5fbcc201d2f31c4e0f8d5ca578b2cae9..92be12f74f47eda09c6979915f805f33351f0211 100644 (file)
@@ -851,7 +851,7 @@ namespace cds { namespace intrusive {
         /// Finds the key \p val and return the item found
         /** \anchor cds_intrusive_SplitListSet_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
         /// Finds the key \p val and return the item found
         /** \anchor cds_intrusive_SplitListSet_rcu_get
             The function searches the item with key equal to \p val and returns the pointer to item found.
-            If \p val is not found it returns \p NULL.
+            If \p val is not found it returns \p nullptr.
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
 
             Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type.
 
index 6ad3231ee7b78ffbeec32e471b8de2591afd0e24..54525ec7b688a80366323bfa115df878983cd981 100644 (file)
@@ -606,7 +606,7 @@ namespace cds { namespace intrusive {
             The function searches an item with key equal to \p val in the set,
             unlinks it from the set, and returns a pointer to unlinked item.
 
             The function searches an item with key equal to \p val in the set,
             unlinks it from the set, and returns a pointer to unlinked item.
 
-            If the item with key equal to \p val is not found the function return \p NULL.
+            If the item with key equal to \p val is not found the function return \p nullptr.
 
             Note the hash functor should accept a parameter of type \p Q that can be not the same as \p value_type.
         */
 
             Note the hash functor should accept a parameter of type \p Q that can be not the same as \p value_type.
         */
index 34ea027aeb4a7aca32b8dc7cedbff63e6e8c9df2..dfb549d53cfe8811dc5a045eddc91dd3078d81ce 100644 (file)
@@ -399,10 +399,10 @@ namespace cds { namespace intrusive {
             myData * p;
 
             p = s1.pop()    ;   // pop i1 from s1
             myData * p;
 
             p = s1.pop()    ;   // pop i1 from s1
-            p = s1.pop()    ;   // p == NULL, s1 is empty
+            p = s1.pop()    ;   // p == nullptr, s1 is empty
             p = s2.pop()    ;   // pop i1 from s2
             p = s2.pop()    ;   // pop i2 from s2
             p = s2.pop()    ;   // pop i1 from s2
             p = s2.pop()    ;   // pop i2 from s2
-            p = s2.pop()    ;   // p == NULL, s2 is empty
+            p = s2.pop()    ;   // p == nullptr, s2 is empty
         }
         \endcode
 
         }
         \endcode
 
@@ -598,7 +598,7 @@ namespace cds { namespace intrusive {
 
         /// Pop an item from the stack
         /**
 
         /// Pop an item from the stack
         /**
-            If stack is empty, returns \p NULL.
+            If stack is empty, returns \p nullptr.
             The disposer is <b>not</b> called for popped item.
             See \ref cds_intrusive_item_destroying "Destroying items of intrusive containers".
         */
             The disposer is <b>not</b> called for popped item.
             See \ref cds_intrusive_item_destroying "Destroying items of intrusive containers".
         */
@@ -627,7 +627,7 @@ namespace cds { namespace intrusive {
 
                 m_stat.onPopRace();
                 if ( m_Backoff.backoff( op, m_stat )) {
 
                 m_stat.onPopRace();
                 if ( m_Backoff.backoff( op, m_stat )) {
-                    // may return NULL if stack is empty
+                    // may return nullptr if stack is empty
                     return op.pVal;
                 }
             }
                     return op.pVal;
                 }
             }
index ac240517fc81d35a4b449a1694f6dcd5b436481f..01822729b6a66e1604cf232942cc93fadc057eae 100644 (file)
@@ -241,7 +241,7 @@ namespace cds { namespace intrusive {
 
         /// Dequeues item from the queue
         /** @anchor cds_intrusive_TsigasQueue_dequeue
 
         /// Dequeues item from the queue
         /** @anchor cds_intrusive_TsigasQueue_dequeue
-            If the queue is empty the function returns \a NULL
+            If the queue is empty the function returns \p nullptr
 
             Dequeue does not call value disposer. You can manually dispose returned value if it is needed.
         */
 
             Dequeue does not call value disposer. You can manually dispose returned value if it is needed.
         */
@@ -261,9 +261,9 @@ namespace cds { namespace intrusive {
                     if ( th != m_nHead.load(memory_model::memory_order_relaxed) )
                         goto TryAgain;
 
                     if ( th != m_nHead.load(memory_model::memory_order_relaxed) )
                         goto TryAgain;
 
-                    // two consecutive NULL means queue empty
+                    // two consecutive nullptr means queue empty
                     if ( temp == m_nTail.load(memory_model::memory_order_acquire) )
                     if ( temp == m_nTail.load(memory_model::memory_order_acquire) )
-                        return NULL;
+                        return nullptr;
 
                     temp = ( temp + 1 ) & nModulo;
                     tt = m_buffer[ temp ].load(memory_model::memory_order_relaxed);
 
                     temp = ( temp + 1 ) & nModulo;
                     tt = m_buffer[ temp ].load(memory_model::memory_order_relaxed);
@@ -325,7 +325,7 @@ namespace cds { namespace intrusive {
             while ( is_free( tt ) ) {
                 if ( th != m_nHead.load(memory_model::memory_order_relaxed) )
                     goto TryAgain;
             while ( is_free( tt ) ) {
                 if ( th != m_nHead.load(memory_model::memory_order_relaxed) )
                     goto TryAgain;
-                // two consecutive NULL means queue empty
+                // two consecutive nullptr means queue empty
                 if ( temp == m_nTail.load(memory_model::memory_order_relaxed) )
                     return true;
                 temp = ( temp + 1 ) & nModulo;
                 if ( temp == m_nTail.load(memory_model::memory_order_relaxed) )
                     return true;
                 temp = ( temp + 1 ) & nModulo;
index 1b049bf511162f0d4e1d72a6d5b83ea792bbfba5..6dcd502911ff12a15ab5ae2b585ed65a849197ae 100644 (file)
@@ -98,7 +98,7 @@ namespace cds { namespace intrusive {
 
         /// Dequeues an item from queue
         /**
 
         /// Dequeues an item from queue
         /**
-            If queue is empty, returns \p NULL.
+            If queue is empty, returns \p nullptr.
         */
         value_type * dequeue()
         {
         */
         value_type * dequeue()
         {
index 0829a8fb03c2fe64d6f39491945fc94367055403..7a62c0333ee84bf5b0da9c3fd77c5b210af81573 100644 (file)
@@ -5,7 +5,7 @@
 
 #include <cds/details/allocator.h>
 #include <cds/lock/scoped_lock.h>
 
 #include <cds/details/allocator.h>
 #include <cds/lock/scoped_lock.h>
-#include <cds/int_algo.h>
+#include <cds/algo/int_algo.h>
 
 #include <boost/mpl/if.hpp>
 
 
 #include <boost/mpl/if.hpp>
 
index abd3706da7cb80fbb952ed2fe6d9c880f70acc9d..d6ce92d7628ea31ac2b1feaa99a6c592a5f5e927 100644 (file)
@@ -961,7 +961,7 @@ namespace michael {
         /// Processor heap's \p active field
         /**
             The \p active field in the processor heap structure is primarily a pointer to the descriptor
         /// Processor heap's \p active field
         /**
             The \p active field in the processor heap structure is primarily a pointer to the descriptor
-            of the active superblock owned by the processor heap. If the value of \p active is not \p NULL, it is
+            of the active superblock owned by the processor heap. If the value of \p active is not \p nullptr, it is
             guaranteed that the active superblock has at least one block available for reservation.
             Since the addresses of superblock descriptors can be guaranteed to be aligned to some power
             of 2 (e.g., 64), as an optimization, we can carve a credits subfield to hold the number
             guaranteed that the active superblock has at least one block available for reservation.
             Since the addresses of superblock descriptors can be guaranteed to be aligned to some power
             of 2 (e.g., 64), as an optimization, we can carve a credits subfield to hold the number
@@ -969,7 +969,7 @@ namespace michael {
             of credits is n, then the active superblock contains n+1 blocks available for reservation
             through the \p active field. Note that the number of blocks in a superblock is not limited
             to the maximum reservations that can be held in the credits subfield. In a typical malloc operation
             of credits is n, then the active superblock contains n+1 blocks available for reservation
             through the \p active field. Note that the number of blocks in a superblock is not limited
             to the maximum reservations that can be held in the credits subfield. In a typical malloc operation
-            (i.e., when \p active != \p NULL and \p credits > 0), the thread reads \p active and then
+            (i.e., when \p active != \p nullptr and \p credits > 0), the thread reads \p active and then
             atomically decrements credits while validating that the active superblock is still valid.
         */
         class active_tag {
             atomically decrements credits while validating that the active superblock is still valid.
         */
         class active_tag {
@@ -1102,7 +1102,7 @@ namespace michael {
             CDS_DATA_ALIGNMENT(8) CDS_ATOMIC::atomic<active_tag> active;   ///< pointer to the descriptor of active superblock owned by processor heap
             processor_desc *    pProcDesc   ;   ///< pointer to parent processor descriptor
             const size_class *  pSizeClass  ;   ///< pointer to size class
             CDS_DATA_ALIGNMENT(8) CDS_ATOMIC::atomic<active_tag> active;   ///< pointer to the descriptor of active superblock owned by processor heap
             processor_desc *    pProcDesc   ;   ///< pointer to parent processor descriptor
             const size_class *  pSizeClass  ;   ///< pointer to size class
-            CDS_ATOMIC::atomic<superblock_desc *>   pPartial    ;   ///< pointer to partial filled superblock (may be NULL)
+            CDS_ATOMIC::atomic<superblock_desc *>   pPartial    ;   ///< pointer to partial filled superblock (may be \p nullptr)
             partial_list        partialList ;   ///< list of partial filled superblocks owned by the processor heap
             unsigned int        nPageIdx    ;   ///< page size-class index, \ref c_nPageSelfAllocation - "small page"
 
             partial_list        partialList ;   ///< list of partial filled superblocks owned by the processor heap
             unsigned int        nPageIdx    ;   ///< page size-class index, \ref c_nPageSelfAllocation - "small page"
 
@@ -1138,8 +1138,8 @@ namespace michael {
                     }
                 } while ( !pPartial.compare_exchange_weak( pDesc, nullptr, CDS_ATOMIC::memory_order_release, CDS_ATOMIC::memory_order_relaxed ) );
 
                     }
                 } while ( !pPartial.compare_exchange_weak( pDesc, nullptr, CDS_ATOMIC::memory_order_release, CDS_ATOMIC::memory_order_relaxed ) );
 
-                //assert( pDesc == NULL || free_desc_list<superblock_desc>::node_algorithms::inited( static_cast<sb_free_list_hook *>(pDesc) ));
-                //assert( pDesc == NULL || partial_desc_list<superblock_desc>::node_algorithms::inited( static_cast<sb_partial_list_hook *>(pDesc) ) );
+                //assert( pDesc == nullptr || free_desc_list<superblock_desc>::node_algorithms::inited( static_cast<sb_free_list_hook *>(pDesc) ));
+                //assert( pDesc == nullptr || partial_desc_list<superblock_desc>::node_algorithms::inited( static_cast<sb_partial_list_hook *>(pDesc) ) );
                 return pDesc;
             }
 
                 return pDesc;
             }
 
@@ -1776,13 +1776,13 @@ namespace michael {
         /// Reallocate memory block
         /**
             If \p nNewSize is zero, then the block pointed to by \p pMemory is freed;
         /// Reallocate memory block
         /**
             If \p nNewSize is zero, then the block pointed to by \p pMemory is freed;
-            the return value is \p NULL, and \p pMemory is left pointing at a freed block.
+            the return value is \p nullptr, and \p pMemory is left pointing at a freed block.
 
             If there is not enough available memory to expand the block to the given size,
 
             If there is not enough available memory to expand the block to the given size,
-            the original block is left unchanged, and \p NULL is returned.
+            the original block is left unchanged, and \p nullptr is returned.
 
             Aligned memory block cannot be realloc'ed: if \p pMemory has been allocated by \ref alloc_aligned,
 
             Aligned memory block cannot be realloc'ed: if \p pMemory has been allocated by \ref alloc_aligned,
-            then the return value is \p NULL and the original block is left unchanged.
+            then the return value is \p nullptr and the original block is left unchanged.
         */
         void * realloc(
             void *  pMemory,    ///< Pointer to previously allocated memory block
         */
         void * realloc(
             void *  pMemory,    ///< Pointer to previously allocated memory block
index 6dd8e0b83880e65b3906d26d39b5c2841591b35d..560498d2701536b8983e785053caa9d64c8c3acd 100644 (file)
@@ -12,7 +12,7 @@ namespace cds { namespace opt {
         The cleaner is a functor called when an item is removed from a container.
         Note, the cleaner should not delete (deallocate) the value \p val passed in.
         However, if the \p value_type type is a structure that contains dynamically allocated
         The cleaner is a functor called when an item is removed from a container.
         Note, the cleaner should not delete (deallocate) the value \p val passed in.
         However, if the \p value_type type is a structure that contains dynamically allocated
-        field(s), the cleaning functor may deallocate it and iniitalize to default value (usually, \p NULL).
+        field(s), the cleaning functor may deallocate it and iniitalize to default value (usually, \p nullptr).
 
         The interface for type \p value_type is:
         \code
 
         The interface for type \p value_type is:
         \code
index 06c0e63c300b85f1a6d614c1c3c5bd1eddc85755..ec4ed8fd2ae3ff173e2578251a25af57db42d5d3 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <memory>
 #include <cds/details/is_aligned.h>
 
 #include <memory>
 #include <cds/details/is_aligned.h>
-#include <cds/int_algo.h>
+#include <cds/algo/int_algo.h>
 
 namespace cds {
     /// OS specific wrappers
 
 namespace cds {
     /// OS specific wrappers
index f67bb46116166a8ed77383a946c876702fb275a4..6a7d2c85e46bbdd8ee1283c6bd4d177b61411ff1 100644 (file)
@@ -42,7 +42,7 @@ namespace cds { namespace OS {
                 size_t len = sizeof(nCPU);
 
                 /* get the number of CPUs from the system */
                 size_t len = sizeof(nCPU);
 
                 /* get the number of CPUs from the system */
-                return ::sysctl(mib, 2, &nCPU, &len, NULL, 0) == 0 && nCPU > 0 ? (unsigned int) nCPU : 1;
+                return ::sysctl( mib, 2, &nCPU, &len, nullptr, 0 ) == 0 && nCPU > 0 ? (unsigned int)nCPU : 1;
             }
 
             /// Get current processor number
             }
 
             /// Get current processor number
index b5c532029f69bc6a576e5b3d11201d4caa758c1a..664063f74f2f6433a18a146a6d68a185618e6266 100644 (file)
@@ -22,7 +22,7 @@ namespace cds { namespace OS {
             )
         {
             void * pMem;
             )
         {
             void * pMem;
-            return ::posix_memalign( &pMem, nAlignment, nSize ) == 0 ? pMem : NULL;
+            return ::posix_memalign( &pMem, nAlignment, nSize ) == 0 ? pMem : nullptr;
         }
 
         /// Frees a block of memory that was allocated with aligned_malloc.
         }
 
         /// Frees a block of memory that was allocated with aligned_malloc.
index 76592ca882cf8d9b552c908e6ec5ec6c16684138..45be131ef9ea7f20f0a36ff526d7bbf57b207ae6 100644 (file)
@@ -4,32 +4,29 @@
 #define __CDS_OS_POSIX_THREAD_H
 
 #include <pthread.h>
 #define __CDS_OS_POSIX_THREAD_H
 
 #include <pthread.h>
+#include <signal.h>
 
 namespace cds { namespace OS {
     /// posix-related wrappers
     namespace posix {
 
         /// Posix thread id type
 
 namespace cds { namespace OS {
     /// posix-related wrappers
     namespace posix {
 
         /// Posix thread id type
-        typedef std::thread::native_thread_handle ThreadId;
+        typedef std::thread::native_handle_type ThreadId;
 
         /// Get current thread id
 
         /// Get current thread id
-        static inline ThreadId getCurrentThreadId()    { return pthread_self(); }
+        static inline ThreadId getCurrentThreadId()
+        { 
+            return pthread_self(); 
+        }
 
         /// Checks if thread \p id is alive
         static inline bool isThreadAlive( ThreadId id )
         {
             // if sig is zero, error checking is performed but no signal is actually sent.
             // ESRCH - No thread could be found corresponding to that specified by the given thread ID
 
         /// Checks if thread \p id is alive
         static inline bool isThreadAlive( ThreadId id )
         {
             // if sig is zero, error checking is performed but no signal is actually sent.
             // ESRCH - No thread could be found corresponding to that specified by the given thread ID
-            // Unresolved problem: Linux may crash on dead thread_id.  Workaround unknown (except signal handler...)
+            // Unresolved problem: Linux may crash on dead thread_id. Workaround unknown (except signal handler...)
             return pthread_kill( id, 0 ) != ESRCH;
         }
             return pthread_kill( id, 0 ) != ESRCH;
         }
-
-        /// Default back-off thread strategy (yield)
-        static inline void backoff()    
-        { 
-            std::this_thread::yield(); 
-        }
-
     }    // namespace posix
 
     using posix::ThreadId;
     }    // namespace posix
 
     using posix::ThreadId;
@@ -37,7 +34,6 @@ namespace cds { namespace OS {
 
     using posix::getCurrentThreadId;
     using posix::isThreadAlive;
 
     using posix::getCurrentThreadId;
     using posix::isThreadAlive;
-    using posix::backoff;
 
 }} // namespace cds::OS
 
 
 }} // namespace cds::OS
 
index 316c0860c09f356df2454f489513c6666c7ee138..e78a575fd4940f6d23bc524432ccd522e5a246d6 100644 (file)
 #    include <cds/os/posix/thread.h>
 #endif
 
 #    include <cds/os/posix/thread.h>
 #endif
 
+namespace cds { namespace OS {
+
+    /// Default backoff::yield implementation
+    static inline void    backoff()
+    {
+        std::this_thread::yield();
+    }
+}} // namespace cds::OS
+
 #endif    // #ifndef __CDS_OS_THREAD_H
 #endif    // #ifndef __CDS_OS_THREAD_H
index 31c6048ad62e865e89401166354f43fd9707642f..26491e05edd6c3204372ea39c609448cc4681a8a 100644 (file)
@@ -23,7 +23,7 @@ namespace cds { namespace OS {
         {
             char *ptmp = 0;
             if ( !FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
         {
             char *ptmp = 0;
             if ( !FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
-                NULL,
+                nullptr,
                 nCode,
                 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                 (LPTSTR) &ptmp, 0, 0  )
                 nCode,
                 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                 (LPTSTR) &ptmp, 0, 0  )
index 85877573eb106a9ec42369ebfbee9cd1733bf09a..0098bd8af122afe3c071224a20ac64ad685cef5b 100644 (file)
@@ -22,17 +22,11 @@ namespace cds { namespace OS {
         static inline bool isThreadAlive( ThreadId id )
         {
             HANDLE h = ::OpenThread( SYNCHRONIZE, FALSE, id );
         static inline bool isThreadAlive( ThreadId id )
         {
             HANDLE h = ::OpenThread( SYNCHRONIZE, FALSE, id );
-            if ( h == NULL )
+            if ( h == nullptr )
                 return false;
             ::CloseHandle( h );
             return true;
         }
                 return false;
             ::CloseHandle( h );
             return true;
         }
-
-        /// Default backoff::yield implementation
-        static inline void    backoff()
-        {
-            std::this_thread::yield();
-        }
     }    // namespace Win32
 
     using Win32::ThreadId;
     }    // namespace Win32
 
     using Win32::ThreadId;
@@ -40,7 +34,6 @@ namespace cds { namespace OS {
 
     using Win32::getCurrentThreadId;
     using Win32::isThreadAlive;
 
     using Win32::getCurrentThreadId;
     using Win32::isThreadAlive;
-    using Win32::backoff;
 
 }} // namespace cds::OS
 
 
 }} // namespace cds::OS
 
index be0acb49cfee810186b9db24d4f9f1885cbaa3d2..8c295d85dde0ea606be65c485b88e5238c36dd75 100644 (file)
@@ -147,12 +147,12 @@ namespace cds {
 
             //@cond
             ThreadData()
 
             //@cond
             ThreadData()
-                : m_pGPIRCU( NULL )
-                , m_pGPBRCU( NULL )
-                , m_pGPTRCU( NULL )
+                : m_pGPIRCU( nullptr )
+                , m_pGPBRCU( nullptr )
+                , m_pGPTRCU( nullptr )
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-                , m_pSHBRCU( NULL )
-                , m_pSHTRCU( NULL )
+                , m_pSHBRCU( nullptr )
+                , m_pSHTRCU( nullptr )
 #endif
                 , m_nFakeProcessorNumber( s_nLastUsedProcNo.fetch_add(1, CDS_ATOMIC::memory_order_relaxed) % s_nProcCount )
                 , m_nAttachCount(0)
 #endif
                 , m_nFakeProcessorNumber( s_nLastUsedProcNo.fetch_add(1, CDS_ATOMIC::memory_order_relaxed) % s_nProcCount )
                 , m_nAttachCount(0)
@@ -193,12 +193,12 @@ namespace cds {
                     m_ptbManager = nullptr;
                 }
 
                     m_ptbManager = nullptr;
                 }
 
-                assert( m_pGPIRCU == NULL );
-                assert( m_pGPBRCU == NULL );
-                assert( m_pGPTRCU == NULL );
+                assert( m_pGPIRCU == nullptr );
+                assert( m_pGPBRCU == nullptr );
+                assert( m_pGPTRCU == nullptr );
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
-                assert( m_pSHBRCU == NULL );
-                assert( m_pSHTRCU == NULL );
+                assert( m_pSHBRCU == nullptr );
+                assert( m_pSHTRCU == nullptr );
 #endif
             }
 
 #endif
             }
 
@@ -239,24 +239,24 @@ namespace cds {
 
                     if ( cds::urcu::details::singleton<cds::urcu::general_instant_tag>::isUsed() ) {
                         cds::urcu::details::singleton<cds::urcu::general_instant_tag>::detach_thread( m_pGPIRCU );
 
                     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 = NULL;
+                        m_pGPIRCU = nullptr;
                     }
                     if ( cds::urcu::details::singleton<cds::urcu::general_buffered_tag>::isUsed() ) {
                         cds::urcu::details::singleton<cds::urcu::general_buffered_tag>::detach_thread( m_pGPBRCU );
                     }
                     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 = NULL;
+                        m_pGPBRCU = nullptr;
                     }
                     if ( cds::urcu::details::singleton<cds::urcu::general_threaded_tag>::isUsed() ) {
                         cds::urcu::details::singleton<cds::urcu::general_threaded_tag>::detach_thread( m_pGPTRCU );
                     }
                     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 = NULL;
+                        m_pGPTRCU = nullptr;
                     }
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
                     if ( cds::urcu::details::singleton<cds::urcu::signal_buffered_tag>::isUsed() ) {
                         cds::urcu::details::singleton<cds::urcu::signal_buffered_tag>::detach_thread( m_pSHBRCU );
                     }
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
                     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 = NULL;
+                        m_pSHBRCU = nullptr;
                     }
                     if ( cds::urcu::details::singleton<cds::urcu::signal_threaded_tag>::isUsed() ) {
                         cds::urcu::details::singleton<cds::urcu::signal_threaded_tag>::detach_thread( m_pSHTRCU );
                     }
                     if ( cds::urcu::details::singleton<cds::urcu::signal_threaded_tag>::isUsed() ) {
                         cds::urcu::details::singleton<cds::urcu::signal_threaded_tag>::detach_thread( m_pSHTRCU );
-                        m_pSHTRCU = NULL;
+                        m_pSHTRCU = nullptr;
                     }
 #endif
                     return true;
                     }
 #endif
                     return true;
index 9d34fd11eaf13df7faa5644d43ddc284dd78fd86..c2f05a1a03e419d905bbfe9a82c92d63346dc9cc 100644 (file)
@@ -45,7 +45,7 @@ namespace cds { namespace threading {
             {
                 if ( cxx11_internal::s_pThreadData ) {
                     ThreadData * p = cxx11_internal::s_pThreadData;
             {
                 if ( cxx11_internal::s_pThreadData ) {
                     ThreadData * p = cxx11_internal::s_pThreadData;
-                    cxx11_internal::s_pThreadData = NULL;
+                    cxx11_internal::s_pThreadData = nullptr;
                     p->ThreadData::~ThreadData();
                 }
             }
                     p->ThreadData::~ThreadData();
                 }
             }
@@ -69,7 +69,7 @@ namespace cds { namespace threading {
             /// Checks whether current thread is attached to \p libcds feature or not.
             static bool isThreadAttached()
             {
             /// Checks whether current thread is attached to \p libcds feature or not.
             static bool isThreadAttached()
             {
-                return _threadData() != NULL;
+                return _threadData() != nullptr;
             }
 
             /// This method must be called in beginning of thread execution
             }
 
             /// This method must be called in beginning of thread execution
@@ -103,7 +103,7 @@ namespace cds { namespace threading {
             */
             static gc::HP::thread_gc_impl&   getHZPGC()
             {
             */
             static gc::HP::thread_gc_impl&   getHZPGC()
             {
-                assert( _threadData()->m_hpManager != NULL );
+                assert( _threadData()->m_hpManager != nullptr );
                 return *(_threadData()->m_hpManager);
             }
 
                 return *(_threadData()->m_hpManager);
             }
 
@@ -115,7 +115,7 @@ namespace cds { namespace threading {
             */
             static gc::HRC::thread_gc_impl&   getHRCGC()
             {
             */
             static gc::HRC::thread_gc_impl&   getHRCGC()
             {
-                assert( _threadData()->m_hrcManager != NULL );
+                assert( _threadData()->m_hrcManager != nullptr );
                 return *(_threadData()->m_hrcManager);
             }
 
                 return *(_threadData()->m_hrcManager);
             }
 
@@ -127,7 +127,7 @@ namespace cds { namespace threading {
             */
             static gc::PTB::thread_gc_impl&   getPTBGC()
             {
             */
             static gc::PTB::thread_gc_impl&   getPTBGC()
             {
-                assert( _threadData()->m_ptbManager != NULL );
+                assert( _threadData()->m_ptbManager != nullptr );
                 return *(_threadData()->m_ptbManager);
             }
 
                 return *(_threadData()->m_ptbManager);
             }
 
index 4baacf09cd9b97bf5f3530a91d371185c9919817..dbf1588f6b276cc96a77d8ed958eece3da60ce1c 100644 (file)
@@ -45,7 +45,7 @@ namespace cds { namespace threading {
             {
                 if ( gcc_internal::s_pThreadData ) {
                     ThreadData * p = gcc_internal::s_pThreadData;
             {
                 if ( gcc_internal::s_pThreadData ) {
                     ThreadData * p = gcc_internal::s_pThreadData;
-                    gcc_internal::s_pThreadData = NULL;
+                    gcc_internal::s_pThreadData = nullptr;
                     p->ThreadData::~ThreadData();
                 }
             }
                     p->ThreadData::~ThreadData();
                 }
             }
@@ -69,7 +69,7 @@ namespace cds { namespace threading {
             /// Checks whether current thread is attached to \p libcds feature or not.
             static bool isThreadAttached()
             {
             /// Checks whether current thread is attached to \p libcds feature or not.
             static bool isThreadAttached()
             {
-                return _threadData() != NULL;
+                return _threadData() != nullptr;
             }
 
             /// This method must be called in beginning of thread execution
             }
 
             /// This method must be called in beginning of thread execution
@@ -103,7 +103,7 @@ namespace cds { namespace threading {
             */
             static gc::HP::thread_gc_impl&   getHZPGC()
             {
             */
             static gc::HP::thread_gc_impl&   getHZPGC()
             {
-                assert( _threadData()->m_hpManager != NULL );
+                assert( _threadData()->m_hpManager );
                 return *(_threadData()->m_hpManager);
             }
 
                 return *(_threadData()->m_hpManager);
             }
 
@@ -115,7 +115,7 @@ namespace cds { namespace threading {
             */
             static gc::HRC::thread_gc_impl&   getHRCGC()
             {
             */
             static gc::HRC::thread_gc_impl&   getHRCGC()
             {
-                assert( _threadData()->m_hrcManager != NULL );
+                assert( _threadData()->m_hrcManager );
                 return *(_threadData()->m_hrcManager);
             }
 
                 return *(_threadData()->m_hrcManager);
             }
 
@@ -127,7 +127,7 @@ namespace cds { namespace threading {
             */
             static gc::PTB::thread_gc_impl&   getPTBGC()
             {
             */
             static gc::PTB::thread_gc_impl&   getPTBGC()
             {
-                assert( _threadData()->m_ptbManager != NULL );
+                assert( _threadData()->m_ptbManager );
                 return *(_threadData()->m_ptbManager);
             }
 
                 return *(_threadData()->m_ptbManager);
             }
 
index f6f5a313908009b5def793bf7d1cf32acd6b5f16..da29e9c16fa9ed7557f927575907912a5dcb00cb 100644 (file)
@@ -44,7 +44,7 @@ namespace cds { namespace threading {
             {
                 if ( msvc_internal::s_pThreadData ) {
                     msvc_internal::s_pThreadData->ThreadData::~ThreadData();
             {
                 if ( msvc_internal::s_pThreadData ) {
                     msvc_internal::s_pThreadData->ThreadData::~ThreadData();
-                    msvc_internal::s_pThreadData = NULL;
+                    msvc_internal::s_pThreadData = nullptr;
                 }
             }
 
                 }
             }
 
@@ -69,7 +69,7 @@ namespace cds { namespace threading {
             static bool isThreadAttached()
             {
                 ThreadData * pData = _threadData();
             static bool isThreadAttached()
             {
                 ThreadData * pData = _threadData();
-                return pData != NULL;
+                return pData != nullptr;
             }
 
             /// This method must be called in beginning of thread execution
             }
 
             /// This method must be called in beginning of thread execution
@@ -103,7 +103,7 @@ namespace cds { namespace threading {
             */
             static gc::HP::thread_gc_impl&   getHZPGC()
             {
             */
             static gc::HP::thread_gc_impl&   getHZPGC()
             {
-                assert( _threadData()->m_hpManager != NULL );
+                assert( _threadData()->m_hpManager );
                 return *(_threadData()->m_hpManager);
             }
 
                 return *(_threadData()->m_hpManager);
             }
 
@@ -115,7 +115,7 @@ namespace cds { namespace threading {
             */
             static gc::HRC::thread_gc_impl&   getHRCGC()
             {
             */
             static gc::HRC::thread_gc_impl&   getHRCGC()
             {
-                assert( _threadData()->m_hrcManager != NULL );
+                assert( _threadData()->m_hrcManager );
                 return *(_threadData()->m_hrcManager);
             }
 
                 return *(_threadData()->m_hrcManager);
             }
 
@@ -127,7 +127,7 @@ namespace cds { namespace threading {
             */
             static gc::PTB::thread_gc_impl&   getPTBGC()
             {
             */
             static gc::PTB::thread_gc_impl&   getPTBGC()
             {
-                assert( _threadData()->m_ptbManager != NULL );
+                assert( _threadData()->m_ptbManager );
                 return *(_threadData()->m_ptbManager);
             }
 
                 return *(_threadData()->m_ptbManager);
             }
 
index 3ed88ccdabbb75b7687cfb2620304409c685abee..fbc970590c15d55947788baa3e98ddf06de47d6b 100644 (file)
@@ -79,7 +79,7 @@ namespace cds { namespace threading {
                 static void free()
                 {
                     ThreadData * p = get();
                 static void free()
                 {
                     ThreadData * p = get();
-                    pthread_setspecific( m_key, NULL );
+                    pthread_setspecific( m_key, nullptr );
                     if ( p )
                         delete p;
                 }
                     if ( p )
                         delete p;
                 }
@@ -106,12 +106,12 @@ namespace cds { namespace threading {
                     case do_checkData:
                         return Holder::get();
                     case do_attachThread:
                     case do_checkData:
                         return Holder::get();
                     case do_attachThread:
-                        if ( Holder::get() == NULL )
+                        if ( Holder::get() == nullptr )
                             Holder::alloc();
                         return Holder::get();
                     case do_detachThread:
                         Holder::free();
                             Holder::alloc();
                         return Holder::get();
                     case do_detachThread:
                         Holder::free();
-                        return NULL;
+                        return nullptr;
                     case init_holder:
                     case fini_holder:
                         break;
                     case init_holder:
                     case fini_holder:
                         break;
@@ -119,7 +119,7 @@ namespace cds { namespace threading {
                         assert( false ) ;   // anything forgotten?..
                 }
                 assert(false)   ;   // how did we get here?
                         assert( false ) ;   // anything forgotten?..
                 }
                 assert(false)   ;   // how did we get here?
-                return NULL;
+                return nullptr;
             }
             //@endcond
 
             }
             //@endcond
 
@@ -145,12 +145,12 @@ namespace cds { namespace threading {
             /// Checks whether current thread is attached to \p libcds feature or not.
             static bool isThreadAttached()
             {
             /// Checks whether current thread is attached to \p libcds feature or not.
             static bool isThreadAttached()
             {
-                return _threadData( do_checkData ) != NULL;
+                return _threadData( do_checkData ) != nullptr;
             }
 
             /// This method must be called in beginning of thread execution
             /**
             }
 
             /// This method must be called in beginning of thread execution
             /**
-                If TLS pointer to manager's data is NULL, pthread_exception is thrown
+                If TLS pointer to manager's data is \p nullptr, pthread_exception is thrown
                 with code = -1.
                 If an error occurs in call of pthread API function, pthread_exception is thrown
                 with pthread error code.
                 with code = -1.
                 If an error occurs in call of pthread API function, pthread_exception is thrown
                 with pthread error code.
@@ -158,7 +158,7 @@ namespace cds { namespace threading {
             static void attachThread()
             {
                 ThreadData * pData = _threadData( do_attachThread );
             static void attachThread()
             {
                 ThreadData * pData = _threadData( do_attachThread );
-                assert( pData != NULL );
+                assert( pData );
 
                 if ( pData ) {
                     pData->init();
 
                 if ( pData ) {
                     pData->init();
@@ -169,7 +169,7 @@ namespace cds { namespace threading {
 
             /// This method must be called in end of thread execution
             /**
 
             /// This method must be called in end of thread execution
             /**
-                If TLS pointer to manager's data is NULL, pthread_exception is thrown
+                If TLS pointer to manager's data is \p nullptr, pthread_exception is thrown
                 with code = -1.
                 If an error occurs in call of pthread API function, pthread_exception is thrown
                 with pthread error code.
                 with code = -1.
                 If an error occurs in call of pthread API function, pthread_exception is thrown
                 with pthread error code.
@@ -177,7 +177,7 @@ namespace cds { namespace threading {
             static void detachThread()
             {
                 ThreadData * pData = _threadData( do_getData );
             static void detachThread()
             {
                 ThreadData * pData = _threadData( do_getData );
-                assert( pData != NULL );
+                assert( pData );
 
                 if ( pData ) {
                     if ( pData->fini() )
 
                 if ( pData ) {
                     if ( pData->fini() )
index 18fd32b78686e050eea8b49b0e5e02572af506c8..f6bb3efb1ef4ff052bdd84231c5407297005a6d9 100644 (file)
@@ -75,7 +75,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 == NULL && (nErr = ::GetLastError()) != ERROR_SUCCESS )
+                    if ( pData == nullptr && (nErr = ::GetLastError()) != ERROR_SUCCESS )
                         throw api_exception( nErr, "TlsGetValue" );
                     return reinterpret_cast<ThreadData *>( pData );
                 }
                         throw api_exception( nErr, "TlsGetValue" );
                     return reinterpret_cast<ThreadData *>( pData );
                 }
@@ -89,7 +89,7 @@ namespace cds { namespace threading {
                 static void free()
                 {
                     ThreadData * p = get();
                 static void free()
                 {
                     ThreadData * p = get();
-                    ::TlsSetValue( m_key, NULL );
+                    ::TlsSetValue( m_key, nullptr );
                     if ( p )
                         delete p;
                 }
                     if ( p )
                         delete p;
                 }
@@ -104,7 +104,7 @@ namespace cds { namespace threading {
 #           ifdef _DEBUG
                         {
                             ThreadData * p = Holder::get();
 #           ifdef _DEBUG
                         {
                             ThreadData * p = Holder::get();
-                            assert( p != NULL );
+                            assert( p );
                             return p;
                         }
 #           else
                             return p;
                         }
 #           else
@@ -113,16 +113,16 @@ namespace cds { namespace threading {
                     case do_checkData:
                         return Holder::get();
                     case do_attachThread:
                     case do_checkData:
                         return Holder::get();
                     case do_attachThread:
-                        if ( Holder::get() == NULL )
+                        if ( Holder::get() == nullptr )
                             Holder::alloc();
                         return Holder::get();
                     case do_detachThread:
                         Holder::free();
                             Holder::alloc();
                         return Holder::get();
                     case do_detachThread:
                         Holder::free();
-                        return NULL;
+                        return nullptr;
                     default:
                         assert( false ) ;   // anything forgotten?..
                 }
                     default:
                         assert( false ) ;   // anything forgotten?..
                 }
-                return NULL;
+                return nullptr;
             }
             //@endcond
 
             }
             //@endcond
 
@@ -148,12 +148,12 @@ namespace cds { namespace threading {
             /// Checks whether current thread is attached to \p libcds feature or not.
             static bool isThreadAttached()
             {
             /// Checks whether current thread is attached to \p libcds feature or not.
             static bool isThreadAttached()
             {
-                return _threadData( do_checkData ) != NULL;
+                return _threadData( do_checkData ) != nullptr;
             }
 
             /// This method must be called in beginning of thread execution
             /**
             }
 
             /// This method must be called in beginning of thread execution
             /**
-                If TLS pointer to manager's data is NULL, api_exception is thrown
+                If TLS pointer to manager's data is \p nullptr, api_exception is thrown
                 with code = -1.
                 If an error occurs in call of Win TLS API function, api_exception is thrown
                 with Windows error code.
                 with code = -1.
                 If an error occurs in call of Win TLS API function, api_exception is thrown
                 with Windows error code.
@@ -161,7 +161,7 @@ namespace cds { namespace threading {
             static void attachThread()
             {
                 ThreadData * pData = _threadData( do_attachThread );
             static void attachThread()
             {
                 ThreadData * pData = _threadData( do_attachThread );
-                assert( pData != NULL );
+                assert( pData );
 
                 if ( pData ) {
                     pData->init();
 
                 if ( pData ) {
                     pData->init();
@@ -172,7 +172,7 @@ namespace cds { namespace threading {
 
             /// This method must be called in end of thread execution
             /**
 
             /// This method must be called in end of thread execution
             /**
-                If TLS pointer to manager's data is NULL, api_exception is thrown
+                If TLS pointer to manager's data is \p nullptr, api_exception is thrown
                 with code = -1.
                 If an error occurs in call of Win TLS API function, api_exception is thrown
                 with Windows error code.
                 with code = -1.
                 If an error occurs in call of Win TLS API function, api_exception is thrown
                 with Windows error code.
@@ -180,7 +180,7 @@ namespace cds { namespace threading {
             static void detachThread()
             {
                 ThreadData * pData = _threadData( do_getData );
             static void detachThread()
             {
                 ThreadData * pData = _threadData( do_getData );
-                assert( pData != NULL );
+                assert( pData );
 
                 if ( pData ) {
                     if ( pData->fini() )
 
                 if ( pData ) {
                     if ( pData->fini() )
index 620654a760332ef31b29038816da39b263436ebd..bbc1c47a3d62c4e508dd2951a5ca1492b04eb724 100644 (file)
@@ -78,13 +78,13 @@ namespace cds { namespace threading {
     inline cds::urcu::details::thread_data<cds::urcu::signal_buffered_tag> * getRCU<cds::urcu::signal_buffered_tag>()
     {
         ThreadData * p = Manager::thread_data();
     inline cds::urcu::details::thread_data<cds::urcu::signal_buffered_tag> * getRCU<cds::urcu::signal_buffered_tag>()
     {
         ThreadData * p = Manager::thread_data();
-        return p ? p->m_pSHBRCU : NULL;
+        return p ? p->m_pSHBRCU : nullptr;
     }
     template<>
     inline cds::urcu::details::thread_data<cds::urcu::signal_threaded_tag> * getRCU<cds::urcu::signal_threaded_tag>()
     {
         ThreadData * p = Manager::thread_data();
     }
     template<>
     inline cds::urcu::details::thread_data<cds::urcu::signal_threaded_tag> * getRCU<cds::urcu::signal_threaded_tag>()
     {
         ThreadData * p = Manager::thread_data();
-        return p ? p->m_pSHTRCU : NULL;
+        return p ? p->m_pSHTRCU : nullptr;
     }
 #endif
 
     }
 #endif
 
index f04cf8164c7846880bfe4f6cdb21d93e071afc4e..f764e727b38951781f52b3a2326dc8114d2904a7 100644 (file)
@@ -120,7 +120,7 @@ namespace cds { namespace urcu { namespace details {
 
         static bool isUsed()
         {
 
         static bool isUsed()
         {
-            return rcu_instance::s_pRCU != NULL;
+            return rcu_instance::s_pRCU != nullptr;
         }
 
     public:
         }
 
     public:
index 25e5642e0ba37bbaa207dc73ed1ab0309ffd402a..6ef1fada12e9f6de3a1ca98dc27f038090db074d 100644 (file)
@@ -3,6 +3,7 @@
 #ifndef _CDS_URCU_DETAILS_SH_H
 #define _CDS_URCU_DETAILS_SH_H
 
 #ifndef _CDS_URCU_DETAILS_SH_H
 #define _CDS_URCU_DETAILS_SH_H
 
+#include <memory.h> //memset
 #include <cds/urcu/details/sh_decl.h>
 
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
 #include <cds/urcu/details/sh_decl.h>
 
 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
@@ -86,7 +87,7 @@ namespace cds { namespace urcu { namespace details {
         sigaction( m_nSigNo, &sigact, nullptr );
 
         sigaddset( &sigact.sa_mask, m_nSigNo );
         sigaction( m_nSigNo, &sigact, nullptr );
 
         sigaddset( &sigact.sa_mask, m_nSigNo );
-        pthread_sigmask( SIG_UNBLOCK, &sigact.sa_mask, NULL );
+        pthread_sigmask( SIG_UNBLOCK, &sigact.sa_mask, nullptr );
     }
 
     template <typename RCUtag>
     }
 
     template <typename RCUtag>
index 1386e6061aea904e11b1d389e7e4a918b16072b0..9fc21c7a6ecbc4b60d82baaf88c592a3d367a31f 100644 (file)
@@ -128,7 +128,7 @@ namespace cds { namespace urcu { namespace details {
 
         static bool isUsed()
         {
 
         static bool isUsed()
         {
-            return rcu_instance::s_pRCU != NULL;
+            return rcu_instance::s_pRCU != nullptr;
         }
 
         int signal_no() const
         }
 
         int signal_no() const
index 963ec15231f2318f7aeb13767c578980029ef313..5d65455bdd9eda67683cd2fd85286b4b654df68d 100644 (file)
@@ -91,7 +91,7 @@ namespace cds { namespace urcu {
             release();
         }
 
             release();
         }
 
-        /// Checks if the pointer is \p NULL
+        /// Checks if the pointer is \p nullptr
         bool empty() const CDS_NOEXCEPT
         {
             return m_pNode == nullptr;
         bool empty() const CDS_NOEXCEPT
         {
             return m_pNode == nullptr;
@@ -170,7 +170,7 @@ namespace cds { namespace urcu {
             release();
         }
 
             release();
         }
 
-        /// Checks if the pointer is \p NULL
+        /// Checks if the pointer is \p nullptr
         bool empty() const CDS_NOEXCEPT
         {
             return m_pNode == nullptr;
         bool empty() const CDS_NOEXCEPT
         {
             return m_pNode == nullptr;
index 74b6c0e41215f1a318e51d614bd78ae1489f1592..cbe75f79d17eadb9d9181545c79f1051e64cb8bd 100644 (file)
     <ClInclude Include="..\..\..\cds\algo\elimination_opt.h" />\r
     <ClInclude Include="..\..\..\cds\algo\elimination_tls.h" />\r
     <ClInclude Include="..\..\..\cds\algo\flat_combining.h" />\r
     <ClInclude Include="..\..\..\cds\algo\elimination_opt.h" />\r
     <ClInclude Include="..\..\..\cds\algo\elimination_tls.h" />\r
     <ClInclude Include="..\..\..\cds\algo\flat_combining.h" />\r
+    <ClInclude Include="..\..\..\cds\algo\int_algo.h" />\r
     <ClInclude Include="..\..\..\cds\compiler\clang\cxx11_atomic_prepatches.h" />\r
     <ClInclude Include="..\..\..\cds\compiler\clang\defs.h" />\r
     <ClInclude Include="..\..\..\cds\compiler\cxx11_atomic.h" />\r
     <ClInclude Include="..\..\..\cds\compiler\clang\cxx11_atomic_prepatches.h" />\r
     <ClInclude Include="..\..\..\cds\compiler\clang\defs.h" />\r
     <ClInclude Include="..\..\..\cds\compiler\cxx11_atomic.h" />\r
     <ClInclude Include="..\..\..\cds\intrusive\striped_set\boost_unordered_set.h" />\r
     <ClInclude Include="..\..\..\cds\intrusive\striped_set\resizing_policy.h" />\r
     <ClInclude Include="..\..\..\cds\intrusive\striped_set\striping_policy.h" />\r
     <ClInclude Include="..\..\..\cds\intrusive\striped_set\boost_unordered_set.h" />\r
     <ClInclude Include="..\..\..\cds\intrusive\striped_set\resizing_policy.h" />\r
     <ClInclude Include="..\..\..\cds\intrusive\striped_set\striping_policy.h" />\r
+    <ClInclude Include="..\..\..\cds\lock\array.h" />\r
+    <ClInclude Include="..\..\..\cds\lock\scoped_lock.h" />\r
     <ClInclude Include="..\..\..\cds\memory\mapper.h" />\r
     <ClInclude Include="..\..\..\cds\memory\pool_allocator.h" />\r
     <ClInclude Include="..\..\..\cds\memory\vyukov_queue_pool.h" />\r
     <ClInclude Include="..\..\..\cds\memory\mapper.h" />\r
     <ClInclude Include="..\..\..\cds\memory\pool_allocator.h" />\r
     <ClInclude Include="..\..\..\cds\memory\vyukov_queue_pool.h" />\r
index b91956f0a9ee47a0165f18ec29b5cdaf784d62e9..bcc6dba91d1bd8c4a3680714a536cbc173ad8cb2 100644 (file)
     <ClInclude Include="..\..\..\cds\algo\flat_combining.h">\r
       <Filter>Header Files\cds\algo</Filter>\r
     </ClInclude>\r
     <ClInclude Include="..\..\..\cds\algo\flat_combining.h">\r
       <Filter>Header Files\cds\algo</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\..\cds\algo\int_algo.h">\r
+      <Filter>Header Files\cds\algo</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\cds\lock\array.h">\r
+      <Filter>Header Files\cds\lock</Filter>\r
+    </ClInclude>\r
+    <ClInclude Include="..\..\..\cds\lock\scoped_lock.h">\r
+      <Filter>Header Files\cds\lock</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
 </Project>
\ No newline at end of file
   </ItemGroup>\r
 </Project>
\ No newline at end of file
index 1fc9b85cedcdf0aa93fc3bb47415862ba0fba03b..14ce22e4569133dd924b5be51bb0f06193afcce2 100644 (file)
@@ -14,7 +14,7 @@
 #endif
 
 static cds::OS::ThreadId    s_MainThreadId = 0;
 #endif
 
 static cds::OS::ThreadId    s_MainThreadId = 0;
-static HINSTANCE            s_DllInstance = NULL;
+static HINSTANCE            s_DllInstance = nullptr;
 
 #if _WIN32_WINNT < 0x0601
 // For Windows below Windows 7
 
 #if _WIN32_WINNT < 0x0601
 // For Windows below Windows 7
@@ -28,7 +28,7 @@ static unsigned int     s_nProcessorGroupCount = 1;
 // Array of processor - cell relationship
 // Array size is s_nProcessorCount
 // s_arrProcessorCellRelationship[i] is the cell (the processor group) number for i-th processor
 // Array of processor - cell relationship
 // Array size is s_nProcessorCount
 // s_arrProcessorCellRelationship[i] is the cell (the processor group) number for i-th processor
-// static unsigned int *   s_arrProcessorCellRelationship = NULL;
+// static unsigned int *   s_arrProcessorCellRelationship = nullptr;
 
 static void discover_topology()
 {
 
 static void discover_topology()
 {
@@ -38,8 +38,8 @@ static void discover_topology()
 
     LPFN_GLPI glpi;
     bool bDone = false;
 
     LPFN_GLPI glpi;
     bool bDone = false;
-    PSYSTEM_LOGICAL_PROCESSOR_INFORMATION buffer = NULL;
-    PSYSTEM_LOGICAL_PROCESSOR_INFORMATION ptr = NULL;
+    PSYSTEM_LOGICAL_PROCESSOR_INFORMATION buffer = nullptr;
+    PSYSTEM_LOGICAL_PROCESSOR_INFORMATION ptr = nullptr;
     DWORD returnLength = 0;
     DWORD logicalProcessorCount = 0;
     DWORD numaNodeCount = 0;
     DWORD returnLength = 0;
     DWORD logicalProcessorCount = 0;
     DWORD numaNodeCount = 0;
@@ -51,7 +51,7 @@ static void discover_topology()
     s_nProcessorGroupCount = 1;
 
     glpi = (LPFN_GLPI) GetProcAddress( GetModuleHandle("kernel32"), "GetLogicalProcessorInformation" );
     s_nProcessorGroupCount = 1;
 
     glpi = (LPFN_GLPI) GetProcAddress( GetModuleHandle("kernel32"), "GetLogicalProcessorInformation" );
-    if (NULL == glpi) {
+    if ( glpi == nullptr ) {
         return;
     }
 
         return;
     }
 
@@ -66,7 +66,7 @@ static void discover_topology()
 
                 buffer = reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION>( ::malloc( returnLength ) );
 
 
                 buffer = reinterpret_cast<PSYSTEM_LOGICAL_PROCESSOR_INFORMATION>( ::malloc( returnLength ) );
 
-                if (NULL == buffer) {
+                if ( buffer == nullptr ) {
                     // allocation failed
                     return;
                 }
                     // allocation failed
                     return;
                 }
@@ -167,14 +167,14 @@ namespace cds { namespace OS { namespace Win32 {
     static void prepare_current_processor_call()
     {
         s_fnGetCurrentProcessorNumber = (fnGetCurrentProcessorNumber) GetProcAddress( GetModuleHandle("kernel32"), "GetCurrentProcessorNumber" );
     static void prepare_current_processor_call()
     {
         s_fnGetCurrentProcessorNumber = (fnGetCurrentProcessorNumber) GetProcAddress( GetModuleHandle("kernel32"), "GetCurrentProcessorNumber" );
-        if ( s_fnGetCurrentProcessorNumber == NULL )
+        if ( s_fnGetCurrentProcessorNumber == nullptr )
             s_fnGetCurrentProcessorNumber = (fnGetCurrentProcessorNumber) GetProcAddress( GetModuleHandle("ntdll"), "NtGetCurrentProcessorNumber" );
     }
 
     namespace cds { namespace OS { namespace Win32 {
         unsigned int topology::current_processor()
         {
             s_fnGetCurrentProcessorNumber = (fnGetCurrentProcessorNumber) GetProcAddress( GetModuleHandle("ntdll"), "NtGetCurrentProcessorNumber" );
     }
 
     namespace cds { namespace OS { namespace Win32 {
         unsigned int topology::current_processor()
         {
-            if ( s_fnGetCurrentProcessorNumber != NULL )
+            if ( s_fnGetCurrentProcessorNumber != nullptr )
                 return s_fnGetCurrentProcessorNumber();
             return 0;
         }
                 return s_fnGetCurrentProcessorNumber();
             return 0;
         }
@@ -203,9 +203,9 @@ BOOL WINAPI DllMain(
         case DLL_PROCESS_DETACH:
 /*
 #if _WIN32_WINNT < 0x0601
         case DLL_PROCESS_DETACH:
 /*
 #if _WIN32_WINNT < 0x0601
-            if ( s_arrProcessorCellRelationship != NULL ) {
+            if ( s_arrProcessorCellRelationship != nullptr ) {
                 delete [] s_arrProcessorCellRelationship;
                 delete [] s_arrProcessorCellRelationship;
-                s_arrProcessorCellRelationship = NULL;
+                s_arrProcessorCellRelationship = nullptr;
             }
 #endif
 */
             }
 #endif
 */
index 5c0be168f7884016e0ef3fc3425ed49a9a060177..5f38bafcd3831f93393f4a5334e6bfdc431cfaa8 100644 (file)
@@ -22,7 +22,7 @@ namespace cds { namespace gc {
         /// Max array size of retired pointers
         static const size_t c_nMaxRetireNodeCount = c_nHazardPointerPerThread * c_nMaxThreadCount * 2;
 
         /// Max array size of retired pointers
         static const size_t c_nMaxRetireNodeCount = c_nHazardPointerPerThread * c_nMaxThreadCount * 2;
 
-        GarbageCollector *    GarbageCollector::m_pHZPManager = NULL;
+        GarbageCollector *    GarbageCollector::m_pHZPManager = nullptr;
 
         void CDS_STDCALL GarbageCollector::Construct( size_t nHazardPtrCount, size_t nMaxThreadCount, size_t nMaxRetiredPtrCount, scan_type nScanType )
         {
 
         void CDS_STDCALL GarbageCollector::Construct( size_t nHazardPtrCount, size_t nMaxThreadCount, size_t nMaxRetiredPtrCount, scan_type nScanType )
         {
@@ -38,7 +38,7 @@ namespace cds { namespace gc {
                     m_pHZPManager->detachAllThread();
 
                 delete m_pHZPManager;
                     m_pHZPManager->detachAllThread();
 
                 delete m_pHZPManager;
-                m_pHZPManager = NULL;
+                m_pHZPManager = nullptr;
             }
         }
 
             }
         }
 
@@ -48,7 +48,7 @@ namespace cds { namespace gc {
             size_t nMaxRetiredPtrCount,
             scan_type nScanType
         )
             size_t nMaxRetiredPtrCount,
             scan_type nScanType
         )
-            : m_pListHead(NULL)
+            : m_pListHead( nullptr )
             ,m_bStatEnabled( true )
             ,m_nHazardPointerCount( nHazardPtrCount == 0 ? c_nHazardPointerPerThread : nHazardPtrCount )
             ,m_nMaxThreadCount( nMaxThreadCount == 0 ? c_nMaxThreadCount : nMaxThreadCount )
             ,m_bStatEnabled( true )
             ,m_nHazardPointerCount( nHazardPtrCount == 0 ? c_nHazardPointerPerThread : nHazardPtrCount )
             ,m_nMaxThreadCount( nMaxThreadCount == 0 ? c_nMaxThreadCount : nMaxThreadCount )
@@ -64,7 +64,7 @@ namespace cds { namespace gc {
             hplist_node * pHead = m_pListHead.load( CDS_ATOMIC::memory_order_relaxed );
             m_pListHead.store( nullptr, CDS_ATOMIC::memory_order_relaxed );
 
             hplist_node * pHead = m_pListHead.load( CDS_ATOMIC::memory_order_relaxed );
             m_pListHead.store( nullptr, CDS_ATOMIC::memory_order_relaxed );
 
-            hplist_node * pNext = NULL;
+            hplist_node * pNext = nullptr;
             for ( hplist_node * hprec = pHead; hprec; hprec = pNext ) {
                 assert( hprec->m_idOwner.load( CDS_ATOMIC::memory_order_relaxed ) == nullThreadId
                     || hprec->m_idOwner.load( CDS_ATOMIC::memory_order_relaxed ) == mainThreadId
             for ( hplist_node * hprec = pHead; hprec; hprec = pNext ) {
                 assert( hprec->m_idOwner.load( CDS_ATOMIC::memory_order_relaxed ) == nullThreadId
                     || hprec->m_idOwner.load( CDS_ATOMIC::memory_order_relaxed ) == mainThreadId
@@ -138,7 +138,7 @@ namespace cds { namespace gc {
 
         void GarbageCollector::RetireHPRec( details::HPRec * pRec )
         {
 
         void GarbageCollector::RetireHPRec( details::HPRec * pRec )
         {
-            assert( pRec != NULL );
+            assert( pRec != nullptr );
             CDS_HAZARDPTR_STATISTIC( ++m_Stat.m_RetireHPRec );
 
             pRec->clear();
             CDS_HAZARDPTR_STATISTIC( ++m_Stat.m_RetireHPRec );
 
             pRec->clear();
@@ -149,7 +149,7 @@ namespace cds { namespace gc {
 
         void GarbageCollector::detachAllThread()
         {
 
         void GarbageCollector::detachAllThread()
         {
-            hplist_node * pNext = NULL;
+            hplist_node * pNext = nullptr;
             const cds::OS::ThreadId nullThreadId = cds::OS::c_NullThreadId;
             for ( hplist_node * hprec = m_pListHead.load(CDS_ATOMIC::memory_order_acquire); hprec; hprec = pNext ) {
                 pNext = hprec->m_pNextNode;
             const cds::OS::ThreadId nullThreadId = cds::OS::c_NullThreadId;
             for ( hplist_node * hprec = m_pListHead.load(CDS_ATOMIC::memory_order_acquire); hprec; hprec = pNext ) {
                 pNext = hprec->m_pNextNode;
index 9d53436470efd4029a9ff547dcf84a8eb73cd0ee..7168e6c52d624967c3f09af2c843ea335991f3fc 100644 (file)
@@ -28,20 +28,20 @@ namespace cds {
     CDS_EXPORT_API DWORD cds::threading::wintls::Manager::Holder::m_key = TLS_OUT_OF_INDEXES;
 
     __declspec( thread ) threading::msvc_internal::ThreadDataPlaceholder threading::msvc_internal::s_threadData;
     CDS_EXPORT_API DWORD cds::threading::wintls::Manager::Holder::m_key = TLS_OUT_OF_INDEXES;
 
     __declspec( thread ) threading::msvc_internal::ThreadDataPlaceholder threading::msvc_internal::s_threadData;
-    __declspec( thread ) threading::ThreadData * threading::msvc_internal::s_pThreadData = NULL;
+    __declspec(thread) threading::ThreadData * threading::msvc_internal::s_pThreadData = nullptr;
 
 #else
     pthread_key_t threading::pthread::Manager::Holder::m_key;
 
 #   if CDS_COMPILER == CDS_COMPILER_GCC || CDS_COMPILER == CDS_COMPILER_CLANG
         __thread threading::gcc_internal::ThreadDataPlaceholder CDS_DATA_ALIGNMENT(8) threading::gcc_internal::s_threadData;
 
 #else
     pthread_key_t threading::pthread::Manager::Holder::m_key;
 
 #   if CDS_COMPILER == CDS_COMPILER_GCC || CDS_COMPILER == CDS_COMPILER_CLANG
         __thread threading::gcc_internal::ThreadDataPlaceholder CDS_DATA_ALIGNMENT(8) threading::gcc_internal::s_threadData;
-        __thread threading::ThreadData * threading::gcc_internal::s_pThreadData = NULL;
+        __thread threading::ThreadData * threading::gcc_internal::s_pThreadData = nullptr;
 #   endif
 #endif
 
 #ifdef CDS_CXX11_THREAD_LOCAL_SUPPORT
     thread_local threading::cxx11_internal::ThreadDataPlaceholder CDS_DATA_ALIGNMENT(8) threading::cxx11_internal::s_threadData;
 #   endif
 #endif
 
 #ifdef CDS_CXX11_THREAD_LOCAL_SUPPORT
     thread_local threading::cxx11_internal::ThreadDataPlaceholder CDS_DATA_ALIGNMENT(8) threading::cxx11_internal::s_threadData;
-    thread_local threading::ThreadData * threading::cxx11_internal::s_pThreadData = NULL;
+    thread_local threading::ThreadData * threading::cxx11_internal::s_pThreadData = nullptr;
 #endif
 
     namespace details {
 #endif
 
     namespace details {
index 9a11b0bf8d68fe854948e4ff9edc8cf3ad419cc2..bce912568210fb38d5084383040afb9d3bc52d14 100644 (file)
@@ -133,7 +133,7 @@ namespace cds { namespace gc { namespace ptb {
         };
     }
 
         };
     }
 
-    GarbageCollector * GarbageCollector::m_pManager = NULL;
+    GarbageCollector * GarbageCollector::m_pManager = nullptr;
 
     void CDS_STDCALL GarbageCollector::Construct(
         size_t nLiberateThreshold
 
     void CDS_STDCALL GarbageCollector::Construct(
         size_t nLiberateThreshold
@@ -149,7 +149,7 @@ namespace cds { namespace gc { namespace ptb {
     {
         if ( m_pManager ) {
             delete m_pManager;
     {
         if ( m_pManager ) {
             delete m_pManager;
-            m_pManager = NULL;
+            m_pManager = nullptr;
         }
     }
 
         }
     }
 
index 68a951a13dd0ef143518690280d80984a93e185e..cc73f979663f5c2e78f7313ef9877f730394a0de 100644 (file)
@@ -10,7 +10,7 @@
 namespace cds { namespace OS { CDS_CXX11_INLINE_NAMESPACE namespace Hpux {
 
     size_t topology::s_nProcMapSize = 0;
 namespace cds { namespace OS { CDS_CXX11_INLINE_NAMESPACE namespace Hpux {
 
     size_t topology::s_nProcMapSize = 0;
-    topology::processor_map * topology::s_procMap = NULL;
+    topology::processor_map * topology::s_procMap = nullptr;
 
     void topology::make_processor_map()
     {
 
     void topology::make_processor_map()
     {
@@ -60,17 +60,17 @@ namespace cds { namespace OS { CDS_CXX11_INLINE_NAMESPACE namespace Hpux {
 
     void topology::init()
     {
 
     void topology::init()
     {
-        assert( s_procMap == NULL );
+        assert( s_procMap == nullptr );
         make_processor_map();
     }
 
     void topology::fini()
     {
         make_processor_map();
     }
 
     void topology::fini()
     {
-        assert( s_procMap != NULL );
+        assert( s_procMap );
         if ( s_procMap ) {
             ::free( s_procMap );
 
         if ( s_procMap ) {
             ::free( s_procMap );
 
-            s_procMap = NULL;
+            s_procMap = nullptr;
         }
     }
 
         }
     }
 
index 689dbbfdd72ef36c7b7a1eb2ad60edd77411d9d7..76334b67f318b5103211eed3aad52e81d6f437a7 100644 (file)
@@ -14,7 +14,7 @@ namespace cds { namespace OS { CDS_CXX11_INLINE_NAMESPACE namespace OS_X {
     void topology::init()
     {
         size_t len = sizeof( s_nProcessorCount );
     void topology::init()
     {
         size_t len = sizeof( s_nProcessorCount );
-        if ( sysctlbyname("hw.logicalcpu", &s_nProcessorCount, &len, NULL, 0 ) != 0 )
+        if ( sysctlbyname("hw.logicalcpu", &s_nProcessorCount, &len, nullptr, 0 ) != 0 )
             s_nProcessorCount = 1;
     }
 
             s_nProcessorCount = 1;
     }
 
index 89517eab80c0240665406a3ccb824fde1f977798..0a2666e0f7e251872c147a701d35df40b2a69eb1 100644 (file)
@@ -140,7 +140,7 @@ namespace CppUnitMini
 
     static TestCase * current_test()
     {
 
     static TestCase * current_test()
     {
-        assert( m_pCurTestCase != NULL );
+        assert( m_pCurTestCase );
         return m_pCurTestCase;
     }
 
         return m_pCurTestCase;
     }
 
index b22cf0c15ac9c1c36ef03b984206c3b111a77d1b..6a563520f8b996f72bfed9eb27597781e13e3f10 100644 (file)
@@ -110,7 +110,7 @@ namespace CppUnitMini
   std::string TestCase::m_strTestDataDir(".");
   Config TestCase::m_Cfg;
 
   std::string TestCase::m_strTestDataDir(".");
   Config TestCase::m_Cfg;
 
-  TestCase * TestCase::m_pCurTestCase = NULL;
+  TestCase * TestCase::m_pCurTestCase = nullptr;
 
   TestCase *TestCase::m_root = 0;
   Reporter *TestCase::m_reporter = 0;
 
   TestCase *TestCase::m_root = 0;
   Reporter *TestCase::m_reporter = 0;
@@ -172,7 +172,7 @@ namespace CppUnitMini
 
       char buf[ 4096 ];
 
 
       char buf[ 4096 ];
 
-      TestCfg * pMap = NULL;
+      TestCfg * pMap = nullptr;
       while ( !s.eof() ) {
           s.getline( buf, sizeof(buf)/sizeof(buf[0]) );
           char * pszStr = buf;
       while ( !s.eof() ) {
           s.getline( buf, sizeof(buf)/sizeof(buf[0]) );
           char * pszStr = buf;
index 535463fec69537a07924e7261109d873a571da0c..4c066b90952290adcc531aa4614d7bb8649a206c 100644 (file)
@@ -38,7 +38,7 @@ namespace CppUnitMini {
 
         TestThread( TestThread& src )
             : m_Pool( src.m_Pool )
 
         TestThread( TestThread& src )
             : m_Pool( src.m_Pool )
-            , m_pThread( NULL )
+            , m_pThread( nullptr )
             , m_bTimeElapsed( false )
             , m_nDuration( 0 )
             , m_nThreadNo( 0 )
             , m_bTimeElapsed( false )
             , m_nDuration( 0 )
             , m_nThreadNo( 0 )
@@ -77,7 +77,7 @@ namespace CppUnitMini {
     public:
         TestThread( ThreadPool& pool )
             : m_Pool( pool )
     public:
         TestThread( ThreadPool& pool )
             : m_Pool( pool )
-            , m_pThread( NULL )
+            , m_pThread( nullptr )
             , m_nDuration( 0 )
             , m_nThreadNo( 0 )
         {}
             , m_nDuration( 0 )
             , m_nThreadNo( 0 )
         {}
@@ -103,8 +103,8 @@ namespace CppUnitMini {
     public:
         ThreadPool( TestCase& tc )
             : m_Test( tc )
     public:
         ThreadPool( TestCase& tc )
             : m_Test( tc )
-            , m_pBarrierStart( NULL )
-            , m_pBarrierDone( NULL )
+            , m_pBarrierStart( nullptr )
+            , m_pBarrierDone( nullptr )
         {}
         ~ThreadPool();
 
         {}
         ~ThreadPool();
 
index 8f887d943b5d841d2bfb9627b87b416a3817238b..016b48468230bfb946fedb9dd957654f0ee9e4fb 100644 (file)
@@ -76,7 +76,7 @@ namespace deque {
             value_type * pv;
             pv = q.pop_back();
             Deque::gc::scan();
             value_type * pv;
             pv = q.pop_back();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 2 ));
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 2 ));
@@ -86,7 +86,7 @@ namespace deque {
 
             pv = q.pop_back();
             Deque::gc::scan();
 
             pv = q.pop_back();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 1 ));
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 1 ));
@@ -96,7 +96,7 @@ namespace deque {
 
             pv = q.pop_back();
             Deque::gc::scan();
 
             pv = q.pop_back();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
@@ -106,7 +106,7 @@ namespace deque {
 
             pv = q.pop_back();
             Deque::gc::scan();
 
             pv = q.pop_back();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv == NULL );
+            CPPUNIT_ASSERT( pv == nullptr );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( v1.nDisposeCount == 1 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( v1.nDisposeCount == 1 );
@@ -131,7 +131,7 @@ namespace deque {
 
             pv = q.pop_front();
             Deque::gc::scan();
 
             pv = q.pop_front();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 2 ));
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 2 ));
@@ -141,7 +141,7 @@ namespace deque {
 
             pv = q.pop_front();
             Deque::gc::scan();
 
             pv = q.pop_front();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 1 ));
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 1 ));
@@ -151,7 +151,7 @@ namespace deque {
 
             pv = q.pop_front();
             Deque::gc::scan();
 
             pv = q.pop_front();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
@@ -161,7 +161,7 @@ namespace deque {
 
             pv = q.pop_front();
             Deque::gc::scan();
 
             pv = q.pop_front();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv == NULL );
+            CPPUNIT_ASSERT( pv == nullptr );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( v1.nDisposeCount == 2 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( v1.nDisposeCount == 2 );
@@ -186,7 +186,7 @@ namespace deque {
 
             pv = q.pop_back();
             Deque::gc::scan();
 
             pv = q.pop_back();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 2 ));
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 2 ));
@@ -196,7 +196,7 @@ namespace deque {
 
             pv = q.pop_back();
             Deque::gc::scan();
 
             pv = q.pop_back();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 1 ));
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 1 ));
@@ -206,7 +206,7 @@ namespace deque {
 
             pv = q.pop_back();
             Deque::gc::scan();
 
             pv = q.pop_back();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
@@ -216,7 +216,7 @@ namespace deque {
 
             pv = q.pop_back();
             Deque::gc::scan();
 
             pv = q.pop_back();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv == NULL );
+            CPPUNIT_ASSERT( pv == nullptr );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( v1.nDisposeCount == 3 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( v1.nDisposeCount == 3 );
@@ -241,7 +241,7 @@ namespace deque {
 
             pv = q.pop_front();
             Deque::gc::scan();
 
             pv = q.pop_front();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 2 ));
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 2 ));
@@ -251,7 +251,7 @@ namespace deque {
 
             pv = q.pop_front();
             Deque::gc::scan();
 
             pv = q.pop_front();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 1 ));
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 1 ));
@@ -261,7 +261,7 @@ namespace deque {
 
             pv = q.pop_front();
             Deque::gc::scan();
 
             pv = q.pop_front();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
@@ -271,7 +271,7 @@ namespace deque {
 
             pv = q.pop_front();
             Deque::gc::scan();
 
             pv = q.pop_front();
             Deque::gc::scan();
-            CPPUNIT_ASSERT( pv == NULL );
+            CPPUNIT_ASSERT( pv == nullptr );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( v1.nDisposeCount == 4 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_ASSERT( check_ic( q.size(), 0 ));
             CPPUNIT_ASSERT( v1.nDisposeCount == 4 );
index 95cb980bf6417d23654d1962fb4af8c08e87bced..e48d3127206eea6083a4734196e69c51b3723239 100644 (file)
@@ -284,7 +284,7 @@ namespace map {
                     {
                         rcu_lock l;
                         pVal = m.get( nKey );
                     {
                         rcu_lock l;
                         pVal = m.get( nKey );
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->first == nKey );
                         CPPUNIT_CHECK( pVal->second.m_val == nKey );
 
                         CPPUNIT_CHECK( pVal->first == nKey );
                         CPPUNIT_CHECK( pVal->second.m_val == nKey );
 
@@ -296,13 +296,13 @@ namespace map {
                     ep.release();
                     {
                         rcu_lock l;
                     ep.release();
                     {
                         rcu_lock l;
-                        CPPUNIT_CHECK( m.get( nKey ) == NULL );
+                        CPPUNIT_CHECK( m.get( nKey ) == nullptr );
                         CPPUNIT_CHECK( !m.extract( ep, nKey ));
                         CPPUNIT_CHECK( ep.empty() );
 
                         nKey = arr[i+1];
                         pVal = m.get_with( other_item(nKey), other_less() );
                         CPPUNIT_CHECK( !m.extract( ep, nKey ));
                         CPPUNIT_CHECK( ep.empty() );
 
                         nKey = arr[i+1];
                         pVal = m.get_with( other_item(nKey), other_less() );
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->first == nKey );
                         CPPUNIT_CHECK( pVal->second.m_val == nKey );
 
                         CPPUNIT_CHECK( pVal->first == nKey );
                         CPPUNIT_CHECK( pVal->second.m_val == nKey );
 
@@ -314,7 +314,7 @@ namespace map {
                     ep.release();
                     {
                         rcu_lock l;
                     ep.release();
                     {
                         rcu_lock l;
-                        CPPUNIT_CHECK( m.get_with( other_item(nKey), other_less() ) == NULL );
+                        CPPUNIT_CHECK( m.get_with( other_item(nKey), other_less() ) == nullptr );
                         CPPUNIT_CHECK( !m.extract_with( ep, other_item(nKey), other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !m.extract_with( ep, other_item(nKey), other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -323,7 +323,7 @@ namespace map {
                 CPPUNIT_CHECK( check_size( m, 0 ));
                 {
                     rcu_lock l;
                 CPPUNIT_CHECK( check_size( m, 0 ));
                 {
                     rcu_lock l;
-                    CPPUNIT_CHECK( m.get( int(nLimit / 2) ) == NULL );
+                    CPPUNIT_CHECK( m.get( int(nLimit / 2) ) == nullptr );
                     CPPUNIT_CHECK( !m.extract( ep, int(nLimit / 2) ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !m.extract( ep, int(nLimit / 2) ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
index 7314395bd4a53f2ccb469e6df2a84307cea7da86..52cc8f4767df39534bfdb606b63156a7465b2807 100644 (file)
@@ -218,7 +218,7 @@ namespace map {
                 CPPUNIT_ASSERT( m.empty());
             }
 
                 CPPUNIT_ASSERT( m.empty());
             }
 
-            CPPUNIT_MSG( PrintStat()(m, NULL) );
+            CPPUNIT_MSG( PrintStat()(m, nullptr) );
         }
 
         template <class Map, typename PrintStat >
         }
 
         template <class Map, typename PrintStat >
@@ -334,15 +334,15 @@ namespace map {
                 CPPUNIT_ASSERT( m.insert( i, i * 2 ) != m.end() );
 
                 typename Map::value_type * pVal = m.get_min();
                 CPPUNIT_ASSERT( m.insert( i, i * 2 ) != m.end() );
 
                 typename Map::value_type * pVal = m.get_min();
-                CPPUNIT_ASSERT( pVal != NULL );
+                CPPUNIT_ASSERT( pVal != nullptr );
                 CPPUNIT_CHECK( pVal->first == i );
                 CPPUNIT_CHECK( pVal->second.m_val == i * 2 );
             }
             m.clear();
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
                 CPPUNIT_CHECK( pVal->first == i );
                 CPPUNIT_CHECK( pVal->second.m_val == i * 2 );
             }
             m.clear();
             CPPUNIT_ASSERT( m.empty() );
             CPPUNIT_ASSERT( check_size( m, 0 ));
-            CPPUNIT_CHECK( m.get_min() == NULL );
-            CPPUNIT_CHECK( m.get_max() == NULL );
+            CPPUNIT_CHECK( m.get_min() == nullptr );
+            CPPUNIT_CHECK( m.get_max() == nullptr );
 
             // iterator test
 
 
             // iterator test
 
@@ -350,7 +350,7 @@ namespace map {
                 CPPUNIT_ASSERT( m.insert( i, i * 2 ) != m.end() );
 
                 typename Map::value_type * pVal = m.get_max();
                 CPPUNIT_ASSERT( m.insert( i, i * 2 ) != m.end() );
 
                 typename Map::value_type * pVal = m.get_max();
-                CPPUNIT_ASSERT( pVal != NULL );
+                CPPUNIT_ASSERT( pVal != nullptr );
                 CPPUNIT_CHECK( pVal->first == i );
                 CPPUNIT_CHECK( pVal->second.m_val == i * 2 );
             }
                 CPPUNIT_CHECK( pVal->first == i );
                 CPPUNIT_CHECK( pVal->second.m_val == i * 2 );
             }
index f55c6efc4541ebebfebccc3cf9f612d3c7484f27..f4cd7b51eaa3004a1f320f6f1d2bd5ff001d27f0 100644 (file)
@@ -169,7 +169,7 @@ namespace map {
                     {
                         rcu_lock l;
                         value_type * pVal = m.get( nKey );
                     {
                         rcu_lock l;
                         value_type * pVal = m.get( nKey );
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->first == nKey );
                         CPPUNIT_CHECK( pVal->second.m_val == nKey * 2 );
                     }
                         CPPUNIT_CHECK( pVal->first == nKey );
                         CPPUNIT_CHECK( pVal->second.m_val == nKey * 2 );
                     }
@@ -182,7 +182,7 @@ namespace map {
 
                     {
                         rcu_lock l;
 
                     {
                         rcu_lock l;
-                        CPPUNIT_CHECK( m.get( nKey ) ==  NULL );
+                        CPPUNIT_CHECK( m.get( nKey ) ==  nullptr );
                     }
                     CPPUNIT_CHECK( !m.extract(ep, nKey) );
                 }
                     }
                     CPPUNIT_CHECK( !m.extract(ep, nKey) );
                 }
@@ -197,7 +197,7 @@ namespace map {
                     {
                         rcu_lock l;
                         value_type * pVal = m.get_with( wrapped_item(nKey), wrapped_less() );
                     {
                         rcu_lock l;
                         value_type * pVal = m.get_with( wrapped_item(nKey), wrapped_less() );
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->first == nKey );
                         CPPUNIT_CHECK( pVal->second.m_val == nKey * 2 );
                     }
                         CPPUNIT_CHECK( pVal->first == nKey );
                         CPPUNIT_CHECK( pVal->second.m_val == nKey * 2 );
                     }
@@ -210,7 +210,7 @@ namespace map {
 
                     {
                         rcu_lock l;
 
                     {
                         rcu_lock l;
-                        CPPUNIT_CHECK( m.get_with( wrapped_item(nKey), wrapped_less() ) ==  NULL );
+                        CPPUNIT_CHECK( m.get_with( wrapped_item(nKey), wrapped_less() ) ==  nullptr );
                     }
                     CPPUNIT_CHECK( !m.extract_with(ep, wrapped_item(nKey), wrapped_less()) );
                 }
                     }
                     CPPUNIT_CHECK( !m.extract_with(ep, wrapped_item(nKey), wrapped_less()) );
                 }
@@ -243,7 +243,7 @@ namespace map {
                 CPPUNIT_CHECK( !m.extract_max(ep) );
             }
 
                 CPPUNIT_CHECK( !m.extract_max(ep) );
             }
 
-            CPPUNIT_MSG( PrintStat()(m, NULL) );
+            CPPUNIT_MSG( PrintStat()(m, nullptr) );
         }
 
     public:
         }
 
     public:
index 463ba44802a47ca65b1cd581a811f1489f9467c0..6eee19c2dbda4086e37241d4217c9db76d437bf9 100644 (file)
@@ -29,8 +29,8 @@ namespace misc {
                 size_t nCurIdx = 0;
                 while ( nTotalAllocated < s_nAllocPerPass ) {
                     size_t nSize = m_arrSize[nCurIdx] + 4;
                 size_t nCurIdx = 0;
                 while ( nTotalAllocated < s_nAllocPerPass ) {
                     size_t nSize = m_arrSize[nCurIdx] + 4;
-                    char * p = a.allocate( nSize, NULL );
-                    CPPUNIT_ASSERT( p != NULL );
+                    char * p = a.allocate( nSize, nullptr );
+                    CPPUNIT_ASSERT( p != nullptr );
                     memset( p, 0x96, nSize );
                     nTotalAllocated += nSize;
                     a.deallocate( p, 1 );
                     memset( p, 0x96, nSize );
                     nTotalAllocated += nSize;
                     a.deallocate( p, 1 );
@@ -67,14 +67,14 @@ namespace misc {
 
             for ( size_t nPass = 0; nPass < s_nPassCount; ++nPass ) {
                 unsigned long long nTotalAllocated = 0;
 
             for ( size_t nPass = 0; nPass < s_nPassCount; ++nPass ) {
                 unsigned long long nTotalAllocated = 0;
-                char * pHead = a.allocate( sizeof(void *), NULL );
-                CPPUNIT_ASSERT( pHead != NULL );
+                char * pHead = a.allocate( sizeof(void *), nullptr );
+                CPPUNIT_ASSERT( pHead != nullptr );
                 char * pCur = pHead;
                 size_t nCurIdx = 0;
                 while ( nTotalAllocated < s_nAllocPerPass ) {
                     size_t nSize = m_arrSize[nCurIdx] + sizeof(void *);
                 char * pCur = pHead;
                 size_t nCurIdx = 0;
                 while ( nTotalAllocated < s_nAllocPerPass ) {
                     size_t nSize = m_arrSize[nCurIdx] + sizeof(void *);
-                    char * p = a.allocate( nSize, NULL );
-                    CPPUNIT_ASSERT( p != NULL );
+                    char * p = a.allocate( nSize, nullptr );
+                    CPPUNIT_ASSERT( p != nullptr );
                     memset( p, 0x96, nSize );
                     *((char **) pCur) = p;
                     pCur = p;
                     memset( p, 0x96, nSize );
                     *((char **) pCur) = p;
                     pCur = p;
@@ -82,10 +82,10 @@ namespace misc {
                     if ( ++nCurIdx > s_nArrSizeSize )
                         nCurIdx = 0;
                 }
                     if ( ++nCurIdx > s_nArrSizeSize )
                         nCurIdx = 0;
                 }
-                *((char **) pCur) = NULL;
+                *((char **) pCur) = nullptr;
 
                 pCur = pHead;
 
                 pCur = pHead;
-                while ( pCur != NULL ) {
+                while ( pCur != nullptr ) {
                     char * pNext = *((char **) pCur);
                     a.deallocate( pCur, 0 );
                     pCur = pNext;
                     char * pNext = *((char **) pCur);
                     a.deallocate( pCur, 0 );
                     pCur = pNext;
index a016f644e64e04c5906470b588bdb9d044827535..7d845e1ea4db0a50f185df26ce8526a03075d584 100644 (file)
@@ -548,7 +548,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
@@ -560,7 +560,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get( a[i]) == NULL );
+                        CPPUNIT_CHECK( l.get( a[i] ) == nullptr );
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ) );
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ) );
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -569,7 +569,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get( a[0] ) == NULL );
+                    CPPUNIT_CHECK( l.get( a[0] ) == nullptr );
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
@@ -586,7 +586,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
@@ -598,7 +598,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get_with( itm, other_less()) == NULL );
+                        CPPUNIT_CHECK( l.get_with( itm, other_less() ) == nullptr );
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -607,7 +607,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get_with( other_item(0), other_less() ) == NULL );
+                    CPPUNIT_CHECK( l.get_with( other_item( 0 ), other_less() ) == nullptr );
                     CPPUNIT_CHECK( !l.extract_with( ep, other_item(0), other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract_with( ep, other_item(0), other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
@@ -635,8 +635,8 @@ namespace ordlist {
                     CPPUNIT_ASSERT( l.find( v1.key(), find_functor() ));
                     CPPUNIT_ASSERT( v1.s.nFindCall == 1 );
 
                     CPPUNIT_ASSERT( l.find( v1.key(), find_functor() ));
                     CPPUNIT_ASSERT( v1.s.nFindCall == 1 );
 
-                    CPPUNIT_ASSERT( l.find_with( v2.key(), less<value_type>() ) == NULL );
-                    CPPUNIT_ASSERT( l.find( v3.key() ) == NULL );
+                    CPPUNIT_ASSERT( l.find_with( v2.key(), less<value_type>() ) == nullptr );
+                    CPPUNIT_ASSERT( l.find( v3.key() ) == nullptr );
                     CPPUNIT_ASSERT( !l.empty() );
 
                     //CPPUNIT_ASSERT( !l.insert( v1 ))    ;   // assertion "is_empty" is raised
                     CPPUNIT_ASSERT( !l.empty() );
 
                     //CPPUNIT_ASSERT( !l.insert( v1 ))    ;   // assertion "is_empty" is raised
index ed76a10db99c2cd16fb52fa9c301a8b8333482bd..b3a42da9fc6207023cd7eff5d8a883c832bf0f1c 100644 (file)
@@ -223,7 +223,7 @@ namespace ordlist {
                 CPPUNIT_ASSERT( !l.find_with( v3.key(), less<value_type>() ));
                 CPPUNIT_ASSERT( !l.empty() );
 
                 CPPUNIT_ASSERT( !l.find_with( v3.key(), less<value_type>() ));
                 CPPUNIT_ASSERT( !l.empty() );
 
-                CPPUNIT_ASSERT( !l.insert( v1 ))    ;   // assertion "is_empty" is not raised since pNext is NULL
+                CPPUNIT_ASSERT( !l.insert( v1 ))    ;   // assertion "is_empty" is not raised since pNext is nullptr
 
                 {
                     value_type v( v1 );
 
                 {
                     value_type v( v1 );
@@ -566,7 +566,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
@@ -578,7 +578,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get( a[i]) == NULL );
+                        CPPUNIT_CHECK( l.get( a[i] ) == nullptr );
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -587,7 +587,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get( a[0] ) == NULL );
+                    CPPUNIT_CHECK( l.get( a[0] ) == nullptr );
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
                     CPPUNIT_CHECK( ep.empty() );
                 }
@@ -604,7 +604,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
@@ -616,7 +616,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get_with( itm, other_less()) == NULL );
+                        CPPUNIT_CHECK( l.get_with( itm, other_less() ) == nullptr );
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -625,7 +625,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get_with( other_item(0), other_less() ) == NULL );
+                    CPPUNIT_CHECK( l.get_with( other_item( 0 ), other_less() ) == nullptr );
                     CPPUNIT_CHECK( !l.extract_with( ep, other_item(0), other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract_with( ep, other_item(0), other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
@@ -653,11 +653,11 @@ namespace ordlist {
                     CPPUNIT_ASSERT( l.find( v1.key(), find_functor() ));
                     CPPUNIT_ASSERT( v1.s.nFindCall == 1 );
 
                     CPPUNIT_ASSERT( l.find( v1.key(), find_functor() ));
                     CPPUNIT_ASSERT( v1.s.nFindCall == 1 );
 
-                    CPPUNIT_ASSERT( l.find_with( v2.key(), less<value_type>() ) == NULL );
+                    CPPUNIT_ASSERT( l.find_with( v2.key(), less<value_type>() ) == nullptr );
                     CPPUNIT_ASSERT( !l.find_with( v3.key(), less<value_type>(), find_functor() ));
                     CPPUNIT_ASSERT( !l.empty() );
 
                     CPPUNIT_ASSERT( !l.find_with( v3.key(), less<value_type>(), find_functor() ));
                     CPPUNIT_ASSERT( !l.empty() );
 
-                    CPPUNIT_ASSERT( !l.insert( v1 ))    ;   // assertion "is_empty" is not raised since pNext is NULL
+                    CPPUNIT_ASSERT( !l.insert( v1 ))    ;   // assertion "is_empty" is not raised since pNext is nullptr
 
                     {
                         value_type v( v1 );
 
                     {
                         value_type v( v1 );
index db8607e4cb3273037828c6b20068d6529a463c95..dfa95896b94ca44ff91e1754bc80faed245fdf39 100644 (file)
@@ -536,7 +536,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
@@ -548,7 +548,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get( a[i]) == NULL );
+                        CPPUNIT_CHECK( l.get( a[i] ) == nullptr );
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -557,7 +557,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get( a[0] ) == NULL );
+                    CPPUNIT_CHECK( l.get( a[0] ) == nullptr );
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
                     CPPUNIT_CHECK( ep.empty() );
                 }
@@ -572,7 +572,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
@@ -584,7 +584,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get_with( itm, other_less()) == NULL );
+                        CPPUNIT_CHECK( l.get_with( itm, other_less() ) == nullptr );
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -593,7 +593,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get_with( other_item(0), other_less() ) == NULL );
+                    CPPUNIT_CHECK( l.get_with( other_item( 0 ), other_less() ) == nullptr );
                     CPPUNIT_CHECK( !l.extract_with( ep, other_item(0), other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract_with( ep, other_item(0), other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
index a542d80261396d50d16ec68fc122de8b2d51a7d8..5d9fdaa0f2811f8c9d5fde26319157a628c8c02d 100644 (file)
@@ -363,7 +363,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->first == a[i] );
                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->first == a[i] );
                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
 
@@ -375,7 +375,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get( a[i]) == NULL );
+                        CPPUNIT_CHECK( l.get( a[i] ) == nullptr );
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -384,7 +384,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get( a[0] ) == NULL );
+                    CPPUNIT_CHECK( l.get( a[0] ) == nullptr );
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
                     CPPUNIT_CHECK( ep.empty() );
                 }
@@ -399,7 +399,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->first == a[i] );
                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->first == a[i] );
                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
 
@@ -411,7 +411,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get_with( itm, other_less()) == NULL );
+                        CPPUNIT_CHECK( l.get_with( itm, other_less()) == nullptr );
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -420,7 +420,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get_with( 3.14f, other_less() ) == NULL );
+                    CPPUNIT_CHECK( l.get_with( 3.14f, other_less() ) == nullptr );
                     CPPUNIT_CHECK( !l.extract_with( ep, 3.14f, other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract_with( ep, 3.14f, other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
index 34e14f1055717bc2d3dcacdc2a3f1049b83e6324..d77b7219bed87042af901ad6cb6c2ebd4c82da39 100644 (file)
@@ -536,7 +536,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
@@ -548,7 +548,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get( a[i]) == NULL );
+                        CPPUNIT_CHECK( l.get( a[i] ) == nullptr );
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -557,7 +557,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get( a[0] ) == NULL );
+                    CPPUNIT_CHECK( l.get( a[0] ) == nullptr );
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
                     CPPUNIT_CHECK( ep.empty() );
                 }
@@ -572,7 +572,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->nKey == a[i] );
                         CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
 
@@ -584,7 +584,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get_with( itm, other_less()) == NULL );
+                        CPPUNIT_CHECK( l.get_with( itm, other_less() ) == nullptr );
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -593,7 +593,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get_with( other_item(0), other_less() ) == NULL );
+                    CPPUNIT_CHECK( l.get_with( other_item( 0 ), other_less() ) == nullptr );
                     CPPUNIT_CHECK( !l.extract_with( ep, other_item(0), other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract_with( ep, other_item(0), other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
index 09253fb7a0e713168a1b6a68212a1c73ab02b270..8f701c795b02cff22987078e7cd60b51716effea 100644 (file)
@@ -373,7 +373,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get( a[i] );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->first == a[i] );
                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->first == a[i] );
                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
 
@@ -385,7 +385,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get( a[i]) == NULL );
+                        CPPUNIT_CHECK( l.get( a[i] ) == nullptr );
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract( ep, a[i] ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -394,7 +394,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get( a[0] ) == NULL );
+                    CPPUNIT_CHECK( l.get( a[0] ) == nullptr );
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
                     CPPUNIT_CHECK( ep.empty() );
                 }
@@ -409,7 +409,7 @@ namespace ordlist {
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
                     {
                         rcu_lock lock;
                         value_type * pGet = l.get_with( itm, other_less() );
-                        CPPUNIT_ASSERT( pGet != NULL );
+                        CPPUNIT_ASSERT( pGet != nullptr );
                         CPPUNIT_CHECK( pGet->first == a[i] );
                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
 
                         CPPUNIT_CHECK( pGet->first == a[i] );
                         CPPUNIT_CHECK( pGet->second.m_val == a[i] * 2 );
 
@@ -421,7 +421,7 @@ namespace ordlist {
                     ep.release();
                     {
                         rcu_lock lock;
                     ep.release();
                     {
                         rcu_lock lock;
-                        CPPUNIT_CHECK( l.get_with( itm, other_less()) == NULL );
+                        CPPUNIT_CHECK( l.get_with( itm, other_less() ) == nullptr );
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -430,7 +430,7 @@ namespace ordlist {
 
                 {
                     rcu_lock lock;
 
                 {
                     rcu_lock lock;
-                    CPPUNIT_CHECK( l.get_with( 3.14f, other_less() ) == NULL );
+                    CPPUNIT_CHECK( l.get_with( 3.14f, other_less() ) == nullptr );
                     CPPUNIT_CHECK( !l.extract_with( ep, 3.14f, other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !l.extract_with( ep, 3.14f, other_less() ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
index 57f9e03de085c758cabd1ef3d309187ddeceeeb5..70b86eb2bef33f6a80759830aa853315222967e0 100644 (file)
@@ -111,7 +111,7 @@ namespace priority_queue {
             // Pop test
             key_type nPrev = c_nMinValue + key_type(pq.capacity()) - 1;
             key_type * p = pq.pop();
             // Pop test
             key_type nPrev = c_nMinValue + key_type(pq.capacity()) - 1;
             key_type * p = pq.pop();
-            CPPUNIT_ASSERT( p != NULL );
+            CPPUNIT_ASSERT( p != nullptr );
             CPPUNIT_CHECK_EX( *p == nPrev, "Expected=" << nPrev << ", current=" << *p );
 
             CPPUNIT_ASSERT( pq.size() == pq.capacity() - 1 );
             CPPUNIT_CHECK_EX( *p == nPrev, "Expected=" << nPrev << ", current=" << *p );
 
             CPPUNIT_ASSERT( pq.size() == pq.capacity() - 1 );
@@ -121,7 +121,7 @@ namespace priority_queue {
             nSize = pq.size();
             while ( pq.size() > 1 ) {
                 p = pq.pop();
             nSize = pq.size();
             while ( pq.size() > 1 ) {
                 p = pq.pop();
-                CPPUNIT_ASSERT( p != NULL );
+                CPPUNIT_ASSERT( p != nullptr );
                 CPPUNIT_CHECK_EX( *p == nPrev - 1, "Expected=" << nPrev - 1 << ", current=" << *p );
                 nPrev = *p;
                 --nSize;
                 CPPUNIT_CHECK_EX( *p == nPrev - 1, "Expected=" << nPrev - 1 << ", current=" << *p );
                 nPrev = *p;
                 --nSize;
@@ -133,7 +133,7 @@ namespace priority_queue {
             CPPUNIT_ASSERT( pq.size() == 1 );
 
             p = pq.pop();
             CPPUNIT_ASSERT( pq.size() == 1 );
 
             p = pq.pop();
-            CPPUNIT_ASSERT( p != NULL );
+            CPPUNIT_ASSERT( p != nullptr );
             CPPUNIT_CHECK_EX( *p == c_nMinValue, "Expected=" << c_nMinValue << ", current=" << *p );
 
             CPPUNIT_ASSERT( !pq.full() );
             CPPUNIT_CHECK_EX( *p == c_nMinValue, "Expected=" << c_nMinValue << ", current=" << *p );
 
             CPPUNIT_ASSERT( !pq.full() );
index 0769363c798a1f2167109a1b39f70ebed66d0df0..54d67d7ff2955e5562cc5223eaf89320ab253b41 100644 (file)
@@ -69,7 +69,7 @@ namespace queue {
 
             value_type * pv;
             pv = q.pop();
 
             value_type * pv;
             pv = q.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
@@ -77,7 +77,7 @@ namespace queue {
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.pop();
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
@@ -85,7 +85,7 @@ namespace queue {
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.dequeue();
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.dequeue();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
@@ -93,7 +93,7 @@ namespace queue {
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.dequeue();
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.dequeue();
-            CPPUNIT_ASSERT( pv == NULL );
+            CPPUNIT_ASSERT( pv == nullptr );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
             CPPUNIT_CHECK( v2.nDisposeCount == 0 );
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
             CPPUNIT_CHECK( v2.nDisposeCount == 0 );
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
index e040c7d297d40f5d78a3b8faf1e19fa6a64bacab..2bac05fa7b82104fe586bac67e398849fd2ad7c5 100644 (file)
@@ -49,7 +49,7 @@ namespace queue {
                 value_type * pv;
                 pv = q.pop();
                 Queue::gc::scan();
                 value_type * pv;
                 pv = q.pop();
                 Queue::gc::scan();
-                CPPUNIT_ASSERT( pv != NULL );
+                CPPUNIT_ASSERT( pv != nullptr );
                 CPPUNIT_ASSERT( pv->nVal == 1 );
                 CPPUNIT_ASSERT( !q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 0 );
                 CPPUNIT_ASSERT( pv->nVal == 1 );
                 CPPUNIT_ASSERT( !q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 0 );
@@ -58,7 +58,7 @@ namespace queue {
 
                 pv = q.pop();
                 Queue::gc::scan();
 
                 pv = q.pop();
                 Queue::gc::scan();
-                CPPUNIT_ASSERT( pv != NULL );
+                CPPUNIT_ASSERT( pv != nullptr );
                 CPPUNIT_ASSERT( pv->nVal == 2 );
                 CPPUNIT_ASSERT( !q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 1 );
                 CPPUNIT_ASSERT( pv->nVal == 2 );
                 CPPUNIT_ASSERT( !q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 1 );
@@ -67,7 +67,7 @@ namespace queue {
 
                 pv = q.pop();
                 Queue::gc::scan();
 
                 pv = q.pop();
                 Queue::gc::scan();
-                CPPUNIT_ASSERT( pv != NULL );
+                CPPUNIT_ASSERT( pv != nullptr );
                 CPPUNIT_ASSERT( pv->nVal == 3 );
                 CPPUNIT_ASSERT( q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 1 );
                 CPPUNIT_ASSERT( pv->nVal == 3 );
                 CPPUNIT_ASSERT( q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 1 );
@@ -75,7 +75,7 @@ namespace queue {
                 CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
                 pv = q.pop();
                 CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
                 pv = q.pop();
-                CPPUNIT_ASSERT( pv == NULL );
+                CPPUNIT_ASSERT( pv == nullptr );
                 CPPUNIT_CHECK( v1.nDisposeCount == 1 );
                 CPPUNIT_CHECK( v2.nDisposeCount == 1 );
                 CPPUNIT_CHECK( v3.nDisposeCount == 0 );
                 CPPUNIT_CHECK( v1.nDisposeCount == 1 );
                 CPPUNIT_CHECK( v2.nDisposeCount == 1 );
                 CPPUNIT_CHECK( v3.nDisposeCount == 0 );
@@ -119,7 +119,7 @@ namespace queue {
                 value_type * pv;
                 pv = q.pop();
                 Queue::gc::scan();
                 value_type * pv;
                 pv = q.pop();
                 Queue::gc::scan();
-                CPPUNIT_ASSERT( pv != NULL );
+                CPPUNIT_ASSERT( pv != nullptr );
                 CPPUNIT_ASSERT( pv->nVal == 1 );
                 CPPUNIT_ASSERT( !q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 0 );
                 CPPUNIT_ASSERT( pv->nVal == 1 );
                 CPPUNIT_ASSERT( !q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 0 );
@@ -129,7 +129,7 @@ namespace queue {
 
                 pv = q.pop();
                 Queue::gc::scan();
 
                 pv = q.pop();
                 Queue::gc::scan();
-                CPPUNIT_ASSERT( pv != NULL );
+                CPPUNIT_ASSERT( pv != nullptr );
                 CPPUNIT_ASSERT( pv->nVal == 2 );
                 CPPUNIT_ASSERT( !q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 0 );
                 CPPUNIT_ASSERT( pv->nVal == 2 );
                 CPPUNIT_ASSERT( !q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 0 );
@@ -139,7 +139,7 @@ namespace queue {
 
                 pv = q.pop();
                 Queue::gc::scan();
 
                 pv = q.pop();
                 Queue::gc::scan();
-                CPPUNIT_ASSERT( pv != NULL );
+                CPPUNIT_ASSERT( pv != nullptr );
                 CPPUNIT_ASSERT( pv->nVal == 3 );
                 CPPUNIT_ASSERT( !q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 0 );
                 CPPUNIT_ASSERT( pv->nVal == 3 );
                 CPPUNIT_ASSERT( !q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 0 );
@@ -149,7 +149,7 @@ namespace queue {
 
                 pv = q.pop();
                 Queue::gc::scan();
 
                 pv = q.pop();
                 Queue::gc::scan();
-                CPPUNIT_ASSERT( pv != NULL );
+                CPPUNIT_ASSERT( pv != nullptr );
                 CPPUNIT_ASSERT( pv->nVal == 4 );
                 CPPUNIT_ASSERT( q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 1 );
                 CPPUNIT_ASSERT( pv->nVal == 4 );
                 CPPUNIT_ASSERT( q.empty() );
                 CPPUNIT_CHECK( v1.nDisposeCount == 1 );
@@ -159,7 +159,7 @@ namespace queue {
 
                 pv = q.pop();
                 Queue::gc::scan();
 
                 pv = q.pop();
                 Queue::gc::scan();
-                CPPUNIT_CHECK( pv == NULL );
+                CPPUNIT_CHECK( pv == nullptr );
                 CPPUNIT_CHECK( v1.nDisposeCount == 1 );
                 CPPUNIT_CHECK( v2.nDisposeCount == 1 );
                 CPPUNIT_CHECK( v3.nDisposeCount == 1 );
                 CPPUNIT_CHECK( v1.nDisposeCount == 1 );
                 CPPUNIT_CHECK( v2.nDisposeCount == 1 );
                 CPPUNIT_CHECK( v3.nDisposeCount == 1 );
@@ -198,7 +198,7 @@ namespace queue {
 
             value_type * pv;
             pv = q.pop();
 
             value_type * pv;
             pv = q.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
@@ -206,7 +206,7 @@ namespace queue {
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.pop();
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
@@ -214,7 +214,7 @@ namespace queue {
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.pop();
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( q.empty() );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
@@ -222,7 +222,7 @@ namespace queue {
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.pop();
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
 
             pv = q.pop();
-            CPPUNIT_ASSERT( pv == NULL );
+            CPPUNIT_ASSERT( pv == nullptr );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
             CPPUNIT_CHECK( v2.nDisposeCount == 0 );
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
             CPPUNIT_CHECK( v1.nDisposeCount == 0 );
             CPPUNIT_CHECK( v2.nDisposeCount == 0 );
             CPPUNIT_CHECK( v3.nDisposeCount == 0 );
index 53d3e5fec0d57eff8f82b6e392c3843949df1ba3..2881b5211091aa2590e9120679d0b7c6b602563f 100644 (file)
@@ -93,7 +93,7 @@ namespace queue {
                     else
                         pVal = q.dequeue();
 
                     else
                         pVal = q.dequeue();
 
-                    CPPUNIT_ASSERT( pVal != NULL );
+                    CPPUNIT_ASSERT( pVal != nullptr );
 
                     int nSegment = int( nCount / q.quasi_factor() );
                     int nMin = nSegment * int(q.quasi_factor());
 
                     int nSegment = int( nCount / q.quasi_factor() );
                     int nMin = nSegment * int(q.quasi_factor());
@@ -108,7 +108,7 @@ namespace queue {
                 CPPUNIT_CHECK( misc::check_size( q, 0 ));
 
                 // pop from empty queue
                 CPPUNIT_CHECK( misc::check_size( q, 0 ));
 
                 // pop from empty queue
-                CPPUNIT_ASSERT( q.pop() == NULL );
+                CPPUNIT_ASSERT( q.pop() == nullptr );
                 CPPUNIT_CHECK( q.empty() );
                 CPPUNIT_CHECK( misc::check_size( q, 0 ));
 
                 CPPUNIT_CHECK( q.empty() );
                 CPPUNIT_CHECK( misc::check_size( q, 0 ));
 
index ba105d36cf6142c57998e69a5fccf28fff835c06..1738ae2100ca041dc7955828b5c303419e4a7007 100644 (file)
@@ -393,11 +393,11 @@ namespace set {
 
             CPPUNIT_ASSERT( s.unlink( e1 ) );
             CPPUNIT_ASSERT( s.erase_with( k2, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type() ) == &e2 );
 
             CPPUNIT_ASSERT( s.unlink( e1 ) );
             CPPUNIT_ASSERT( s.erase_with( k2, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type() ) == &e2 );
-            CPPUNIT_ASSERT( s.erase( e2 ) == NULL );
+            CPPUNIT_ASSERT( s.erase( e2 ) == nullptr );
             CPPUNIT_ASSERT( e3.nEraseCount == 0 );
             CPPUNIT_ASSERT( s.erase_with( k3, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type(), erase_functor()) == &e3 );
             CPPUNIT_ASSERT( e3.nEraseCount == 1 );
             CPPUNIT_ASSERT( e3.nEraseCount == 0 );
             CPPUNIT_ASSERT( s.erase_with( k3, typename std::conditional<Set::c_isSorted, less2, equal_to2>::type(), erase_functor()) == &e3 );
             CPPUNIT_ASSERT( e3.nEraseCount == 1 );
-            CPPUNIT_ASSERT( s.erase( k3, erase_functor()) == NULL );
+            CPPUNIT_ASSERT( s.erase( k3, erase_functor() ) == nullptr );
             CPPUNIT_ASSERT( e3.nEraseCount == 1 );
 
             CPPUNIT_ASSERT( s.insert( e3 ) );
             CPPUNIT_ASSERT( e3.nEraseCount == 1 );
 
             CPPUNIT_ASSERT( s.insert( e3 ) );
index 12ca4ea853b497498d6aa5132fa8f7c0d3d47da6..33f36a224b94608e99145afe5f315c3f88f94a07 100644 (file)
@@ -610,13 +610,13 @@ namespace set {
                     CPPUNIT_ASSERT( check_size( s, 0 ));
 
                     // insert/find test
                     CPPUNIT_ASSERT( check_size( s, 0 ));
 
                     // insert/find test
-                    CPPUNIT_ASSERT( s.find( v1.key() ) == NULL );
+                    CPPUNIT_ASSERT( s.find( v1.key() ) == nullptr );
                     CPPUNIT_ASSERT( s.insert( v1 ));
                     CPPUNIT_ASSERT( s.find_with( v1.key(), less<value_type>() ) == &v1 );
                     CPPUNIT_ASSERT( check_size( s, 1 ));
                     CPPUNIT_ASSERT( !s.empty() );
 
                     CPPUNIT_ASSERT( s.insert( v1 ));
                     CPPUNIT_ASSERT( s.find_with( v1.key(), less<value_type>() ) == &v1 );
                     CPPUNIT_ASSERT( check_size( s, 1 ));
                     CPPUNIT_ASSERT( !s.empty() );
 
-                    CPPUNIT_ASSERT( s.find( v2.key() ) == NULL );
+                    CPPUNIT_ASSERT( s.find( v2.key() ) == nullptr );
                     CPPUNIT_ASSERT( s.insert( v2 ));
                     CPPUNIT_ASSERT( v2.nFindCount == 0 );
                     CPPUNIT_ASSERT( s.find( key = v2.key(), find_functor() ));
                     CPPUNIT_ASSERT( s.insert( v2 ));
                     CPPUNIT_ASSERT( v2.nFindCount == 0 );
                     CPPUNIT_ASSERT( s.find( key = v2.key(), find_functor() ));
@@ -627,7 +627,7 @@ namespace set {
 
                     {
                         find_functor    ff;
 
                     {
                         find_functor    ff;
-                        CPPUNIT_ASSERT( s.find( v3 ) == NULL );
+                        CPPUNIT_ASSERT( s.find( v3 ) == nullptr );
                         CPPUNIT_ASSERT( s.insert( v3 ));
                         CPPUNIT_ASSERT( v3.nFindCount == 0 );
                         CPPUNIT_ASSERT( s.find_with( v3, less<value_type>(), cds::ref(ff) ));
                         CPPUNIT_ASSERT( s.insert( v3 ));
                         CPPUNIT_ASSERT( v3.nFindCount == 0 );
                         CPPUNIT_ASSERT( s.find_with( v3, less<value_type>(), cds::ref(ff) ));
@@ -1002,7 +1002,7 @@ namespace set {
                     {
                         rcu_lock l;
                         pVal = s.get( nKey );
                     {
                         rcu_lock l;
                         pVal = s.get( nKey );
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey * 2 );
 
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey * 2 );
 
@@ -1014,13 +1014,13 @@ namespace set {
                     ep.release();
                     {
                         rcu_lock l;
                     ep.release();
                     {
                         rcu_lock l;
-                        CPPUNIT_CHECK( s.get( nKey ) == NULL );
+                        CPPUNIT_CHECK( s.get( nKey ) == nullptr );
                         CPPUNIT_CHECK( !s.extract( ep, nKey ));
                         CPPUNIT_CHECK( ep.empty() );
 
                         nKey = arr[i+1];
                         pVal = s.get_with( nKey, less<value_type>() );
                         CPPUNIT_CHECK( !s.extract( ep, nKey ));
                         CPPUNIT_CHECK( ep.empty() );
 
                         nKey = arr[i+1];
                         pVal = s.get_with( nKey, less<value_type>() );
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey * 2 );
 
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey * 2 );
 
@@ -1032,7 +1032,7 @@ namespace set {
                     ep.release();
                     {
                         rcu_lock l;
                     ep.release();
                     {
                         rcu_lock l;
-                        CPPUNIT_CHECK( s.get_with( nKey, less<value_type>() ) == NULL );
+                        CPPUNIT_CHECK( s.get_with( nKey, less<value_type>() ) == nullptr );
                         CPPUNIT_CHECK( !s.extract_with( ep, nKey, less<value_type>() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !s.extract_with( ep, nKey, less<value_type>() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -1041,7 +1041,7 @@ namespace set {
                 CPPUNIT_CHECK( check_size( s, 0 ));
                 {
                     rcu_lock l;
                 CPPUNIT_CHECK( check_size( s, 0 ));
                 {
                     rcu_lock l;
-                    CPPUNIT_CHECK( s.get( 100 ) == NULL );
+                    CPPUNIT_CHECK( s.get( 100 ) == nullptr );
                     CPPUNIT_CHECK( !s.extract( ep, 100 ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !s.extract( ep, 100 ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
index 0b43a74191af5cb7c8e57d547588713900934ed3..b7be051008b405c48de2f8b03fe24d0d33dd581f 100644 (file)
@@ -310,7 +310,7 @@ namespace set {
                 Set::gc::force_dispose();
             }
 
                 Set::gc::force_dispose();
             }
 
-            CPPUNIT_MSG( PrintStat()( s, NULL ));
+            CPPUNIT_MSG( PrintStat()(s, nullptr) );
         }
 
         template <typename Set>
         }
 
         template <typename Set>
@@ -350,13 +350,13 @@ namespace set {
             CPPUNIT_ASSERT( check_size( s, 0 ));
 
             // insert/find test
             CPPUNIT_ASSERT( check_size( s, 0 ));
 
             // insert/find test
-            CPPUNIT_ASSERT( s.find( v1.key() ) == NULL );
+            CPPUNIT_ASSERT( s.find( v1.key() ) == nullptr );
             CPPUNIT_ASSERT( s.insert( v1 ));
             CPPUNIT_ASSERT( s.find( v1.key() ) == &v1 );
             CPPUNIT_ASSERT( check_size( s, 1 ));
             CPPUNIT_ASSERT( !s.empty() );
 
             CPPUNIT_ASSERT( s.insert( v1 ));
             CPPUNIT_ASSERT( s.find( v1.key() ) == &v1 );
             CPPUNIT_ASSERT( check_size( s, 1 ));
             CPPUNIT_ASSERT( !s.empty() );
 
-            CPPUNIT_ASSERT( s.find_with( v2.key(), less() ) == NULL );
+            CPPUNIT_ASSERT( s.find_with( v2.key(), less() ) == nullptr );
             CPPUNIT_ASSERT( s.insert( v2 ));
             CPPUNIT_ASSERT( v2.nFindCount == 0 );
             CPPUNIT_ASSERT( s.find_with( key = v2.key(), less(), find_functor() ));
             CPPUNIT_ASSERT( s.insert( v2 ));
             CPPUNIT_ASSERT( v2.nFindCount == 0 );
             CPPUNIT_ASSERT( s.find_with( key = v2.key(), less(), find_functor() ));
@@ -367,7 +367,7 @@ namespace set {
 
             {
                 find_functor    ff;
 
             {
                 find_functor    ff;
-                CPPUNIT_ASSERT( s.find( v3 ) == NULL );
+                CPPUNIT_ASSERT( s.find( v3 ) == nullptr );
                 CPPUNIT_ASSERT( s.insert( v3 ));
                 CPPUNIT_ASSERT( v3.nFindCount == 0 );
                 CPPUNIT_ASSERT( s.find( v3, cds::ref(ff) ));
                 CPPUNIT_ASSERT( s.insert( v3 ));
                 CPPUNIT_ASSERT( v3.nFindCount == 0 );
                 CPPUNIT_ASSERT( s.find( v3, cds::ref(ff) ));
@@ -442,8 +442,8 @@ namespace set {
             //CPPUNIT_MSG( PrintStat()(s, "Ensure test") );
 
             // get_min test
             //CPPUNIT_MSG( PrintStat()(s, "Ensure test") );
 
             // get_min test
-            CPPUNIT_CHECK( s.get_min() == NULL );
-            CPPUNIT_CHECK( s.get_max() == NULL );
+            CPPUNIT_CHECK( s.get_min() == nullptr );
+            CPPUNIT_CHECK( s.get_max() == nullptr );
 
             {
                 value_type  v[1000];
 
             {
                 value_type  v[1000];
@@ -453,7 +453,7 @@ namespace set {
 
                     CPPUNIT_ASSERT( s.insert( v[i] ));
                     value_type * pVal = s.get_min();
 
                     CPPUNIT_ASSERT( s.insert( v[i] ));
                     value_type * pVal = s.get_min();
-                    CPPUNIT_ASSERT( pVal != NULL );
+                    CPPUNIT_ASSERT( pVal != nullptr );
                     CPPUNIT_CHECK( pVal->nKey == i );
                     CPPUNIT_CHECK( pVal->nVal == i * 2 );
                 }
                     CPPUNIT_CHECK( pVal->nKey == i );
                     CPPUNIT_CHECK( pVal->nVal == i * 2 );
                 }
@@ -475,7 +475,7 @@ namespace set {
                     CPPUNIT_ASSERT( s.insert( v[i] ));
 
                     value_type * pVal = s.get_max();
                     CPPUNIT_ASSERT( s.insert( v[i] ));
 
                     value_type * pVal = s.get_max();
-                    CPPUNIT_ASSERT( pVal != NULL );
+                    CPPUNIT_ASSERT( pVal != nullptr );
                     CPPUNIT_CHECK( pVal->nKey == i );
                     CPPUNIT_CHECK( pVal->nVal == i * 2 );
                 }
                     CPPUNIT_CHECK( pVal->nKey == i );
                     CPPUNIT_CHECK( pVal->nVal == i * 2 );
                 }
@@ -507,7 +507,7 @@ namespace set {
             CPPUNIT_ASSERT( s.begin() == s.end() );
             CPPUNIT_ASSERT( s.cbegin() == s.cend() );
 
             CPPUNIT_ASSERT( s.begin() == s.end() );
             CPPUNIT_ASSERT( s.cbegin() == s.cend() );
 
-            CPPUNIT_MSG( PrintStat()(s, NULL) );
+            CPPUNIT_MSG( PrintStat()(s, nullptr) );
         }
 
     public:
         }
 
     public:
index bc65e86c5157118147ce48448f9e5b9582a36064..973cea299298a0311c3775d8a5e9d947bf418645 100644 (file)
@@ -262,7 +262,7 @@ namespace set {
                         {
                             rcu_lock l;
                             pVal = s.get( i );
                         {
                             rcu_lock l;
                             pVal = s.get( i );
-                            CPPUNIT_ASSERT( pVal != NULL );
+                            CPPUNIT_ASSERT( pVal != nullptr );
                             CPPUNIT_CHECK( pVal->nKey == i );
                             CPPUNIT_CHECK( pVal->nVal == i * 2 );
                             pVal->nVal *= 2;
                             CPPUNIT_CHECK( pVal->nKey == i );
                             CPPUNIT_CHECK( pVal->nVal == i * 2 );
                             pVal->nVal *= 2;
@@ -276,7 +276,7 @@ namespace set {
 
                         {
                             rcu_lock l;
 
                         {
                             rcu_lock l;
-                            CPPUNIT_CHECK( s.get( i ) == NULL );
+                            CPPUNIT_CHECK( s.get( i ) == nullptr );
                         }
                         CPPUNIT_CHECK( !s.extract( ep, i ) );
                         CPPUNIT_ASSERT( ep.empty() );
                         }
                         CPPUNIT_CHECK( !s.extract( ep, i ) );
                         CPPUNIT_ASSERT( ep.empty() );
@@ -292,7 +292,7 @@ namespace set {
                         {
                             rcu_lock l;
                             value_type * pVal = s.get_with( other_key(i), other_key_less<typename Set::value_type>() );
                         {
                             rcu_lock l;
                             value_type * pVal = s.get_with( other_key(i), other_key_less<typename Set::value_type>() );
-                            CPPUNIT_ASSERT( pVal != NULL );
+                            CPPUNIT_ASSERT( pVal != nullptr );
                             CPPUNIT_CHECK( pVal->nKey == i );
                             CPPUNIT_CHECK( pVal->nVal == i * 2 );
                             pVal->nVal *= 2;
                             CPPUNIT_CHECK( pVal->nKey == i );
                             CPPUNIT_CHECK( pVal->nVal == i * 2 );
                             pVal->nVal *= 2;
@@ -306,7 +306,7 @@ namespace set {
 
                         {
                             rcu_lock l;
 
                         {
                             rcu_lock l;
-                            CPPUNIT_CHECK( s.get_with( other_key(i), other_key_less<typename Set::value_type>() ) == NULL );
+                            CPPUNIT_CHECK( s.get_with( other_key( i ), other_key_less<typename Set::value_type>() ) == nullptr );
                         }
                         CPPUNIT_CHECK( !s.extract_with( ep, other_key(i), other_key_less<typename Set::value_type>() ));
                     }
                         }
                         CPPUNIT_CHECK( !s.extract_with( ep, other_key(i), other_key_less<typename Set::value_type>() ));
                     }
@@ -361,7 +361,7 @@ namespace set {
                 CPPUNIT_CHECK( !s.extract_max(ep) );
             }
 
                 CPPUNIT_CHECK( !s.extract_max(ep) );
             }
 
-            CPPUNIT_MSG( PrintStat()(s, NULL) );
+            CPPUNIT_MSG( PrintStat()(s, nullptr) );
         }
 
         template <typename Set>
         }
 
         template <typename Set>
index b6e36e79558bf09ed6479786038778268a1e49d0..42abe4fa767b182c02ddd8120612da4866913bb5 100644 (file)
@@ -369,11 +369,11 @@ namespace set {
 
             CPPUNIT_ASSERT( s.unlink( e1 ) );
             CPPUNIT_ASSERT( s.erase_with( k2, less2() ) == &e2 );
 
             CPPUNIT_ASSERT( s.unlink( e1 ) );
             CPPUNIT_ASSERT( s.erase_with( k2, less2() ) == &e2 );
-            CPPUNIT_ASSERT( s.erase( e2 ) == NULL );
+            CPPUNIT_ASSERT( s.erase( e2 ) == nullptr );
             CPPUNIT_ASSERT( e3.nEraseCount == 0 );
             CPPUNIT_ASSERT( s.erase_with( k3, less2(), erase_functor()) == &e3 );
             CPPUNIT_ASSERT( e3.nEraseCount == 1 );
             CPPUNIT_ASSERT( e3.nEraseCount == 0 );
             CPPUNIT_ASSERT( s.erase_with( k3, less2(), erase_functor()) == &e3 );
             CPPUNIT_ASSERT( e3.nEraseCount == 1 );
-            CPPUNIT_ASSERT( s.erase( k3, erase_functor()) == NULL );
+            CPPUNIT_ASSERT( s.erase( k3, erase_functor() ) == nullptr );
             CPPUNIT_ASSERT( e3.nEraseCount == 1 );
 
             CPPUNIT_ASSERT( s.insert( e3 ) );
             CPPUNIT_ASSERT( e3.nEraseCount == 1 );
 
             CPPUNIT_ASSERT( s.insert( e3 ) );
index b449613edd40c3d0df2fd5792c574c0579b9e349..fc1e2ed2cc9688a4ae911658aa831e06d4a1c2bd 100644 (file)
@@ -436,7 +436,7 @@ namespace set {
                     {
                         rcu_lock l;
                         pVal = s.get( nKey );
                     {
                         rcu_lock l;
                         pVal = s.get( nKey );
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey );
 
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey );
 
@@ -448,13 +448,13 @@ namespace set {
                     ep.release();
                     {
                         rcu_lock l;
                     ep.release();
                     {
                         rcu_lock l;
-                        CPPUNIT_CHECK( s.get( nKey ) == NULL );
+                        CPPUNIT_CHECK( s.get( nKey ) == nullptr );
                         CPPUNIT_CHECK( !s.extract( ep, nKey ));
                         CPPUNIT_CHECK( ep.empty() );
 
                         nKey = arr[i+1];
                         pVal = s.get_with( other_item(nKey), other_less() );
                         CPPUNIT_CHECK( !s.extract( ep, nKey ));
                         CPPUNIT_CHECK( ep.empty() );
 
                         nKey = arr[i+1];
                         pVal = s.get_with( other_item(nKey), other_less() );
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey );
 
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey );
 
@@ -466,7 +466,7 @@ namespace set {
                     ep.release();
                     {
                         rcu_lock l;
                     ep.release();
                     {
                         rcu_lock l;
-                        CPPUNIT_CHECK( s.get_with( other_item(nKey), other_less() ) == NULL );
+                        CPPUNIT_CHECK( s.get_with( other_item( nKey ), other_less() ) == nullptr );
                         CPPUNIT_CHECK( !s.extract_with( ep, other_item(nKey), other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
                         CPPUNIT_CHECK( !s.extract_with( ep, other_item(nKey), other_less() ));
                         CPPUNIT_CHECK( ep.empty() );
                     }
@@ -475,7 +475,7 @@ namespace set {
                 CPPUNIT_CHECK( check_size( s, 0 ));
                 {
                     rcu_lock l;
                 CPPUNIT_CHECK( check_size( s, 0 ));
                 {
                     rcu_lock l;
-                    CPPUNIT_CHECK( s.get( int(nLimit / 2) ) == NULL );
+                    CPPUNIT_CHECK( s.get( int( nLimit / 2 ) ) == nullptr );
                     CPPUNIT_CHECK( !s.extract( ep, int(nLimit / 2) ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
                     CPPUNIT_CHECK( !s.extract( ep, int(nLimit / 2) ));
                     CPPUNIT_CHECK( ep.empty() );
                 }
index fb0694358f8c618fed9fb048bee19e66f1d3a698..706e3c8d86c3c720d5943b8a8338e98ae4a03ca6 100644 (file)
@@ -245,7 +245,7 @@ namespace set {
                 CPPUNIT_ASSERT( gp.empty() );
             }
 
                 CPPUNIT_ASSERT( gp.empty() );
             }
 
-            CPPUNIT_MSG( PrintStat()(s, NULL) );
+            CPPUNIT_MSG( PrintStat()(s, nullptr) );
         }
 
         template <class Set, typename PrintStat >
         }
 
         template <class Set, typename PrintStat >
@@ -372,7 +372,7 @@ namespace set {
                 CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() );
 
                 typename Set::value_type * pVal = s.get_min();
                 CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() );
 
                 typename Set::value_type * pVal = s.get_min();
-                CPPUNIT_ASSERT( pVal != NULL );
+                CPPUNIT_ASSERT( pVal != nullptr );
                 CPPUNIT_CHECK( pVal->nKey == i );
                 CPPUNIT_CHECK( pVal->nVal ==  i * 2 );
             }
                 CPPUNIT_CHECK( pVal->nKey == i );
                 CPPUNIT_CHECK( pVal->nVal ==  i * 2 );
             }
@@ -381,15 +381,15 @@ namespace set {
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
 
             CPPUNIT_ASSERT( s.empty() );
             CPPUNIT_ASSERT( check_size( s, 0 ));
 
-            CPPUNIT_CHECK( s.get_min() == NULL );
-            CPPUNIT_CHECK( s.get_max() == NULL );
+            CPPUNIT_CHECK( s.get_min() == nullptr );
+            CPPUNIT_CHECK( s.get_max() == nullptr );
 
             // iterator test
             for ( int i = 0; i < 500; ++i ) {
                 CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() );
 
                 typename Set::value_type * pVal = s.get_max();
 
             // iterator test
             for ( int i = 0; i < 500; ++i ) {
                 CPPUNIT_ASSERT( s.insert( std::make_pair( i, i * 2) ) != s.end() );
 
                 typename Set::value_type * pVal = s.get_max();
-                CPPUNIT_ASSERT( pVal != NULL );
+                CPPUNIT_ASSERT( pVal != nullptr );
                 CPPUNIT_CHECK( pVal->nKey == i );
                 CPPUNIT_CHECK( pVal->nVal == i * 2 );
             }
                 CPPUNIT_CHECK( pVal->nKey == i );
                 CPPUNIT_CHECK( pVal->nVal == i * 2 );
             }
index f210d8b26e1ba06ab55b8051d8ae255452f987c5..ff99ebdbfee4af9717db278475da856165e4fd0f 100644 (file)
@@ -163,7 +163,7 @@ namespace set {
                     {
                         rcu_lock l;
                         pVal = s.get( nKey );
                     {
                         rcu_lock l;
                         pVal = s.get( nKey );
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey * 2 );
                     }
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey * 2 );
                     }
@@ -176,7 +176,7 @@ namespace set {
 
                     {
                         rcu_lock l;
 
                     {
                         rcu_lock l;
-                        CPPUNIT_CHECK( s.get( nKey ) == NULL );
+                        CPPUNIT_CHECK( s.get( nKey ) == nullptr );
                     }
                     CPPUNIT_CHECK( !s.extract( ep, nKey ));
                 }
                     }
                     CPPUNIT_CHECK( !s.extract( ep, nKey ));
                 }
@@ -191,7 +191,7 @@ namespace set {
                     {
                         rcu_lock l;
                         pVal = s.get_with( wrapped_item(nKey), wrapped_less() );
                     {
                         rcu_lock l;
                         pVal = s.get_with( wrapped_item(nKey), wrapped_less() );
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey );
                     }
                         CPPUNIT_CHECK( pVal->nKey == nKey );
                         CPPUNIT_CHECK( pVal->nVal == nKey );
                     }
@@ -204,7 +204,7 @@ namespace set {
 
                     {
                         rcu_lock l;
 
                     {
                         rcu_lock l;
-                        CPPUNIT_CHECK( s.get_with( wrapped_item(nKey), wrapped_less() ) == NULL );
+                        CPPUNIT_CHECK( s.get_with( wrapped_item( nKey ), wrapped_less() ) == nullptr );
                     }
                     CPPUNIT_CHECK( !s.extract_with( ep, wrapped_item(nKey), wrapped_less() ));
                 }
                     }
                     CPPUNIT_CHECK( !s.extract_with( ep, wrapped_item(nKey), wrapped_less() ));
                 }
@@ -241,7 +241,7 @@ namespace set {
                 CPPUNIT_CHECK( !s.extract_max(ep) );
             }
 
                 CPPUNIT_CHECK( !s.extract_max(ep) );
             }
 
-            CPPUNIT_MSG( PrintStat()(s, NULL) );
+            CPPUNIT_MSG( PrintStat()(s, nullptr) );
         }
 
     public:
         }
 
     public:
index ebc2d248eb896048cd0e925ab9456b8d1818c716..c7bc6cd85436dfce451202c9efc5c06d888de555 100644 (file)
@@ -69,19 +69,19 @@ namespace stack {
 
             value_type * pv;
             pv = stack.pop();
 
             value_type * pv;
             pv = stack.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( !stack.empty() );
             pv = stack.pop();
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( !stack.empty() );
             pv = stack.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !stack.empty() );
             pv = stack.pop();
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !stack.empty() );
             pv = stack.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( stack.empty() );
             pv = stack.pop();
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( stack.empty() );
             pv = stack.pop();
-            CPPUNIT_ASSERT( pv == NULL );
+            CPPUNIT_ASSERT( pv == nullptr );
 
             CPPUNIT_ASSERT( v1.nDisposeCount == 0 );
             CPPUNIT_ASSERT( v2.nDisposeCount == 0 );
 
             CPPUNIT_ASSERT( v1.nDisposeCount == 0 );
             CPPUNIT_ASSERT( v2.nDisposeCount == 0 );
index 6749e3f1966953204f27b0b17b473aeb85262123..41077a084b29a7f8d81f92f4fbb778e068c10f92 100644 (file)
@@ -77,19 +77,19 @@ namespace stack {
 
             value_type * pv;
             pv = stack.pop();
 
             value_type * pv;
             pv = stack.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( !stack.empty() );
             pv = stack.pop();
             CPPUNIT_ASSERT( pv->nVal == 3 );
             CPPUNIT_ASSERT( !stack.empty() );
             pv = stack.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !stack.empty() );
             pv = stack.pop();
             CPPUNIT_ASSERT( pv->nVal == 2 );
             CPPUNIT_ASSERT( !stack.empty() );
             pv = stack.pop();
-            CPPUNIT_ASSERT( pv != NULL );
+            CPPUNIT_ASSERT( pv != nullptr );
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( stack.empty() );
             pv = stack.pop();
             CPPUNIT_ASSERT( pv->nVal == 1 );
             CPPUNIT_ASSERT( stack.empty() );
             pv = stack.pop();
-            CPPUNIT_ASSERT( pv == NULL );
+            CPPUNIT_ASSERT( pv == nullptr );
 
             CPPUNIT_ASSERT( v1.nDisposeCount == 0 );
             CPPUNIT_ASSERT( v2.nDisposeCount == 0 );
 
             CPPUNIT_ASSERT( v1.nDisposeCount == 0 );
             CPPUNIT_ASSERT( v2.nDisposeCount == 0 );
index c122746dcaf50e7077155577c98233e58d13ea9c..da48bcd5e143c2360c01c1defeef18e9b8b23238 100644 (file)
@@ -511,7 +511,7 @@ namespace tree {
                     {
                         typename map_type::rcu_lock l;
                         typename map_type::value_type * pVal = m.get(nKey);
                     {
                         typename map_type::rcu_lock l;
                         typename map_type::value_type * pVal = m.get(nKey);
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->first == nKey);
                     }
                     CPPUNIT_ASSERT( m.extract( ep, nKey ));
                         CPPUNIT_CHECK( pVal->first == nKey);
                     }
                     CPPUNIT_ASSERT( m.extract( ep, nKey ));
@@ -535,7 +535,7 @@ namespace tree {
                     {
                         typename map_type::rcu_lock l;
                         typename map_type::value_type * pVal = m.get_with(wrapped_int(nKey), wrapped_less());
                     {
                         typename map_type::rcu_lock l;
                         typename map_type::value_type * pVal = m.get_with(wrapped_int(nKey), wrapped_less());
-                        CPPUNIT_ASSERT( pVal != NULL );
+                        CPPUNIT_ASSERT( pVal != nullptr );
                         CPPUNIT_CHECK( pVal->first == nKey);
                     }
                     CPPUNIT_ASSERT( m.extract_with( ep, wrapped_int(nKey), wrapped_less() ));
                         CPPUNIT_CHECK( pVal->first == nKey);
                     }
                     CPPUNIT_ASSERT( m.extract_with( ep, wrapped_int(nKey), wrapped_less() ));
index 08e4f9298e8fa156d264ca91ffb566a1591bb8ae..b8726e9db9c7f9f7083bdfcf6cfe5f0c281a0213 100644 (file)
@@ -609,7 +609,7 @@ namespace tree {
                     {
                         typename set_type::rcu_lock l;
                         value_type * p = s.get( nKey );
                     {
                         typename set_type::rcu_lock l;
                         value_type * p = s.get( nKey );
-                        CPPUNIT_ASSERT( p != NULL );
+                        CPPUNIT_ASSERT( p != nullptr );
                         CPPUNIT_CHECK( p->nKey == nKey );
                     }
                     CPPUNIT_ASSERT( s.extract( ep, nKey ));
                         CPPUNIT_CHECK( p->nKey == nKey );
                     }
                     CPPUNIT_ASSERT( s.extract( ep, nKey ));
@@ -619,7 +619,7 @@ namespace tree {
 
                     {
                         typename set_type::rcu_lock l;
 
                     {
                         typename set_type::rcu_lock l;
-                        CPPUNIT_CHECK( s.get( nKey ) == NULL );
+                        CPPUNIT_CHECK( s.get( nKey ) == nullptr );
                     }
                     CPPUNIT_CHECK( !s.extract( ep, nKey ));
                 }
                     }
                     CPPUNIT_CHECK( !s.extract( ep, nKey ));
                 }
@@ -632,7 +632,7 @@ namespace tree {
                     {
                         typename set_type::rcu_lock l;
                         value_type * p = s.get_with( wrapped_int(nKey), wrapped_less() );
                     {
                         typename set_type::rcu_lock l;
                         value_type * p = s.get_with( wrapped_int(nKey), wrapped_less() );
-                        CPPUNIT_ASSERT( p != NULL );
+                        CPPUNIT_ASSERT( p != nullptr );
                         CPPUNIT_CHECK( p->nKey == nKey );
                     }
                     CPPUNIT_ASSERT( s.extract_with( ep, wrapped_int(nKey), wrapped_less() ));
                         CPPUNIT_CHECK( p->nKey == nKey );
                     }
                     CPPUNIT_ASSERT( s.extract_with( ep, wrapped_int(nKey), wrapped_less() ));
@@ -642,7 +642,7 @@ namespace tree {
 
                     {
                         typename set_type::rcu_lock l;
 
                     {
                         typename set_type::rcu_lock l;
-                        CPPUNIT_CHECK( s.get_with( wrapped_int(nKey), wrapped_less() ) == NULL );
+                        CPPUNIT_CHECK( s.get_with( wrapped_int( nKey ), wrapped_less() ) == nullptr );
                     }
                     CPPUNIT_CHECK( !s.extract_with( ep, wrapped_int(nKey), wrapped_less() ));
                 }
                     }
                     CPPUNIT_CHECK( !s.extract_with( ep, wrapped_int(nKey), wrapped_less() ));
                 }
index 741be4fb999dcac12ffc356647026a7dc08d6c52..67e56f9b2064228cee2aae85e56d30fdc36b63a6 100644 (file)
@@ -842,7 +842,7 @@ namespace tree {
                 {
                     typename tree_type::rcu_lock l;
                     pVal = t.get( v1.nKey );
                 {
                     typename tree_type::rcu_lock l;
                     pVal = t.get( v1.nKey );
-                    CPPUNIT_ASSERT( pVal != NULL );
+                    CPPUNIT_ASSERT( pVal != nullptr );
                     CPPUNIT_CHECK( pVal == &v1 );
                 }
                 CPPUNIT_ASSERT( t.extract( ep, v1.nKey ));
                     CPPUNIT_CHECK( pVal == &v1 );
                 }
                 CPPUNIT_ASSERT( t.extract( ep, v1.nKey ));
@@ -850,7 +850,7 @@ namespace tree {
                 CPPUNIT_CHECK( ep->nKey == v1.nKey );
                 {
                     typename tree_type::rcu_lock l;
                 CPPUNIT_CHECK( ep->nKey == v1.nKey );
                 {
                     typename tree_type::rcu_lock l;
-                    CPPUNIT_CHECK( t.get( v1.nKey ) == NULL );
+                    CPPUNIT_CHECK( t.get( v1.nKey ) == nullptr );
                 }
                 ep.release();
                 CPPUNIT_ASSERT( !t.extract( ep, v1.nKey ));
                 }
                 ep.release();
                 CPPUNIT_ASSERT( !t.extract( ep, v1.nKey ));
@@ -859,7 +859,7 @@ namespace tree {
                 CPPUNIT_CHECK( ep->nKey == v5.nKey );
                 {
                     typename tree_type::rcu_lock l;
                 CPPUNIT_CHECK( ep->nKey == v5.nKey );
                 {
                     typename tree_type::rcu_lock l;
-                    CPPUNIT_CHECK( t.get( v5.nKey ) == NULL );
+                    CPPUNIT_CHECK( t.get( v5.nKey ) == nullptr );
                 }
                 ep.release();
                 CPPUNIT_ASSERT( !t.extract( ep, v5.nKey ));
                 }
                 ep.release();
                 CPPUNIT_ASSERT( !t.extract( ep, v5.nKey ));
@@ -868,14 +868,14 @@ namespace tree {
                 CPPUNIT_CHECK( ep->nKey == v3.nKey );
                 {
                     typename tree_type::rcu_lock l;
                 CPPUNIT_CHECK( ep->nKey == v3.nKey );
                 {
                     typename tree_type::rcu_lock l;
-                    CPPUNIT_CHECK( t.get( v3.nKey ) == NULL );
+                    CPPUNIT_CHECK( t.get( v3.nKey ) == nullptr );
                 }
                 ep.release();
 
                 {
                     typename tree_type::rcu_lock l;
                     pVal = t.get_with( wrapped_int(v2.nKey), wrapped_less<value_type>() );
                 }
                 ep.release();
 
                 {
                     typename tree_type::rcu_lock l;
                     pVal = t.get_with( wrapped_int(v2.nKey), wrapped_less<value_type>() );
-                    CPPUNIT_ASSERT( pVal != NULL );
+                    CPPUNIT_ASSERT( pVal != nullptr );
                     CPPUNIT_CHECK( pVal == &v2 );
                 }
                 CPPUNIT_ASSERT( t.extract_with( ep, wrapped_int(v2.nKey), wrapped_less<value_type>() ));
                     CPPUNIT_CHECK( pVal == &v2 );
                 }
                 CPPUNIT_ASSERT( t.extract_with( ep, wrapped_int(v2.nKey), wrapped_less<value_type>() ));
@@ -883,7 +883,7 @@ namespace tree {
                 CPPUNIT_CHECK( ep->nKey == v2.nKey );
                 {
                     typename tree_type::rcu_lock l;
                 CPPUNIT_CHECK( ep->nKey == v2.nKey );
                 {
                     typename tree_type::rcu_lock l;
-                    CPPUNIT_CHECK( t.get_with( wrapped_int(v2.nKey), wrapped_less<value_type>() ) == NULL );
+                    CPPUNIT_CHECK( t.get_with( wrapped_int( v2.nKey ), wrapped_less<value_type>() ) == nullptr );
                 }
                 ep.release();
                 CPPUNIT_CHECK( !t.extract_with( ep, wrapped_int(v2.nKey), wrapped_less<value_type>() ));
                 }
                 ep.release();
                 CPPUNIT_CHECK( !t.extract_with( ep, wrapped_int(v2.nKey), wrapped_less<value_type>() ));
@@ -901,11 +901,11 @@ namespace tree {
 
                 {
                     typename tree_type::rcu_lock l;
 
                 {
                     typename tree_type::rcu_lock l;
-                    CPPUNIT_CHECK( t.get( v1.nKey ) == NULL );
-                    CPPUNIT_CHECK( t.get( v2.nKey ) == NULL );
-                    CPPUNIT_CHECK( t.get( v3.nKey ) == NULL );
-                    CPPUNIT_CHECK( t.get( v4.nKey ) == NULL );
-                    CPPUNIT_CHECK( t.get( v5.nKey ) == NULL );
+                    CPPUNIT_CHECK( t.get( v1.nKey ) == nullptr );
+                    CPPUNIT_CHECK( t.get( v2.nKey ) == nullptr );
+                    CPPUNIT_CHECK( t.get( v3.nKey ) == nullptr );
+                    CPPUNIT_CHECK( t.get( v4.nKey ) == nullptr );
+                    CPPUNIT_CHECK( t.get( v5.nKey ) == nullptr );
                 }
 
                 CPPUNIT_CHECK( !t.extract(ep, v1.nKey));
                 }
 
                 CPPUNIT_CHECK( !t.extract(ep, v1.nKey));
index c931a5b15d19559c133e82024bb49345f55c550a..df2f807c1cb44af7083258ef08c6a25993f0c26d 100644 (file)
@@ -76,8 +76,8 @@ namespace memory {
                 for ( size_t nPass = 0; nPass < s_nPassPerThread; ++nPass ) {
                     value_type ** pCell = m_arr;
                     for ( size_t i = 0; i < s_nBlockCount; ++i, ++pCell ) {
                 for ( size_t nPass = 0; nPass < s_nPassPerThread; ++nPass ) {
                     value_type ** pCell = m_arr;
                     for ( size_t i = 0; i < s_nBlockCount; ++i, ++pCell ) {
-                        *pCell = m_Alloc.allocate( nSize, NULL );
-                        CPPUNIT_ASSERT( *pCell != NULL );
+                        *pCell = m_Alloc.allocate( nSize, nullptr );
+                        CPPUNIT_ASSERT( *pCell != nullptr );
 
                         if ( nSize < 32 )
                             memset( *pCell, 0, nSize );
 
                         if ( nSize < 32 )
                             memset( *pCell, 0, nSize );
index f09de31cee17c61bc6517c2bc37a2f366c5cf72d..92388f54e460c6efc3a60aa0b1a27937da4987fa 100644 (file)
@@ -80,7 +80,7 @@ namespace memory {
                 for ( size_t nPass = 0; nPass < s_nPassPerThread; ++nPass ) {
                     size_t nItem = m_rndGen( size_t(1), s_nBlocksPerThread ) - 1;
                     m_Alloc.deallocate( reinterpret_cast<value_type *>(m_arr[nItem]), 1 );
                 for ( size_t nPass = 0; nPass < s_nPassPerThread; ++nPass ) {
                     size_t nItem = m_rndGen( size_t(1), s_nBlocksPerThread ) - 1;
                     m_Alloc.deallocate( reinterpret_cast<value_type *>(m_arr[nItem]), 1 );
-                    m_arr[nItem] = reinterpret_cast<char *>( m_Alloc.allocate( m_rndGen(s_nMinBlockSize, s_nMaxBlockSize), NULL ));
+                    m_arr[nItem] = reinterpret_cast<char *>(m_Alloc.allocate( m_rndGen( s_nMinBlockSize, s_nMaxBlockSize ), nullptr ));
                     CPPUNIT_ASSERT( (reinterpret_cast<cds::uptr_atomic_t>(m_arr[nItem]) & (ALLOC::alignment - 1)) == 0 );
                 }
             }
                     CPPUNIT_ASSERT( (reinterpret_cast<cds::uptr_atomic_t>(m_arr[nItem]) & (ALLOC::alignment - 1)) == 0 );
                 }
             }
@@ -105,7 +105,7 @@ namespace memory {
                     = m_aThreadData[nThread]
                     = new char *[ s_nBlocksPerThread ];
                     for ( size_t i = 0; i < s_nBlocksPerThread; ++i ) {
                     = m_aThreadData[nThread]
                     = new char *[ s_nBlocksPerThread ];
                     for ( size_t i = 0; i < s_nBlocksPerThread; ++i ) {
-                        thData[i] = reinterpret_cast<char *>( alloc.allocate( rndGen(s_nMinBlockSize, s_nMaxBlockSize), NULL ));
+                        thData[i] = reinterpret_cast<char *>(alloc.allocate( rndGen( s_nMinBlockSize, s_nMaxBlockSize ), nullptr ));
                         CPPUNIT_ASSERT( (reinterpret_cast<cds::uptr_atomic_t>(thData[i]) & (ALLOC::alignment - 1)) == 0 );
                     }
             }
                         CPPUNIT_ASSERT( (reinterpret_cast<cds::uptr_atomic_t>(thData[i]) & (ALLOC::alignment - 1)) == 0 );
                     }
             }
index a09d5a918337089412ec25c15fa647cafab6b6dd..bf05807b2f8865b0abc1e1c859f84eb8f44b5359 100644 (file)
@@ -57,8 +57,8 @@ namespace memory {
             virtual void test()
             {
                 for ( size_t i = 0; i < s_nPassPerThread; ++i ) {
             virtual void test()
             {
                 for ( size_t i = 0; i < s_nPassPerThread; ++i ) {
-                    typename ALLOC::value_type * p = m_Alloc.allocate( m_nSize / sizeof(typename ALLOC::value_type), NULL );
-                    CPPUNIT_ASSERT( p != NULL );
+                    typename ALLOC::value_type * p = m_Alloc.allocate( m_nSize / sizeof( typename ALLOC::value_type ), nullptr );
+                    CPPUNIT_ASSERT( p != nullptr );
                     if ( m_nSize < 32 )
                         memset( p, 0, m_nSize );
                     else {
                     if ( m_nSize < 32 )
                         memset( p, 0, m_nSize );
                     else {
index dca2b1002c456b6eb06db954e2f12d5f9aaefbf8..05034f8e9c94b050db6f815fb357794f3ede7f0d 100644 (file)
@@ -27,7 +27,7 @@ namespace memory {
 
         Item()
             : m_access( false )
 
         Item()
             : m_access( false )
-            , m_pszBlock( NULL )
+            , m_pszBlock( nullptr )
         {}
 
         Item& operator =(Item const& i)
         {}
 
         Item& operator =(Item const& i)
@@ -85,11 +85,11 @@ namespace memory {
                     if ( item.m_access.tryLock() ) {
                         if ( item.m_pszBlock ) {
                             m_Alloc.deallocate( item.m_pszBlock, 1 );
                     if ( item.m_access.tryLock() ) {
                         if ( item.m_pszBlock ) {
                             m_Alloc.deallocate( item.m_pszBlock, 1 );
-                            item.m_pszBlock = NULL;
+                            item.m_pszBlock = nullptr;
                         }
                         else {
                             size_t nSize;
                         }
                         else {
                             size_t nSize;
-                            item.m_pszBlock = m_Alloc.allocate( nSize = m_rndGen(s_nMinBlockSize, s_nMaxBlockSize ), NULL );
+                            item.m_pszBlock = m_Alloc.allocate( nSize = m_rndGen( s_nMinBlockSize, s_nMaxBlockSize ), nullptr );
 
                             if ( nSize < 32 )
                                 memset( item.m_pszBlock, 0, nSize );
 
                             if ( nSize < 32 )
                                 memset( item.m_pszBlock, 0, nSize );
@@ -124,7 +124,7 @@ namespace memory {
             for ( size_t i = 0; i < m_Data.size(); ++i ) {
                 if ( m_Data[i].m_pszBlock ) {
                     alloc.deallocate( m_Data[i].m_pszBlock, 1 );
             for ( size_t i = 0; i < m_Data.size(); ++i ) {
                 if ( m_Data[i].m_pszBlock ) {
                     alloc.deallocate( m_Data[i].m_pszBlock, 1 );
-                    m_Data[i].m_pszBlock = NULL;
+                    m_Data[i].m_pszBlock = nullptr;
                 }
             }
         }
                 }
             }
         }
index d88f60c3b253f4a44254e520875de9c9dc2b1b94..ccb37f23835d5f406087eafdb8ba7e76a742e527 100644 (file)
@@ -83,7 +83,7 @@ namespace ellen_bintree_pool {
             typedef internal_node_allocator< Other, Alloc > other;
         };
 
             typedef internal_node_allocator< Other, Alloc > other;
         };
 
-        T * allocate( size_t n, void const * pHint = NULL )
+        T * allocate( size_t n, void const * pHint = nullptr )
         {
             internal_node_counter::onAlloc();
             return base_class::allocate( n, pHint );
         {
             internal_node_counter::onAlloc();
             return base_class::allocate( n, pHint );
index d9f15118fc07eb98fbd824eb66a7dfb1c7f82fb7..197c67cc9511a07469b53217a912d209ba6a35dc 100644 (file)
@@ -27,7 +27,7 @@ namespace lock {
             HANDLE  m_hMutex;
         public:
 
             HANDLE  m_hMutex;
         public:
 
-            Mutex()     { m_hMutex = ::CreateMutex( NULL, false, NULL ) ; }
+            Mutex()     { m_hMutex = ::CreateMutex( nullptr, false, nullptr ); }
             ~Mutex()    { ::CloseHandle( m_hMutex ) ; }
 
             void lock()     { ::WaitForSingleObject( m_hMutex, INFINITE ); }
             ~Mutex()    { ::CloseHandle( m_hMutex ) ; }
 
             void lock()     { ::WaitForSingleObject( m_hMutex, INFINITE ); }
index a03a94de767b89f19a57c08c91f99683f6d7a4ad..0a4168f186825645b6ddc3c0aafbf6e5918332f5 100644 (file)
@@ -28,7 +28,7 @@ namespace memory {
         typedef typename std_allocator::value_type      value_type;
 
         // Allocation function
         typedef typename std_allocator::value_type      value_type;
 
         // Allocation function
-        pointer allocate( size_type _Count, const void* _Hint = NULL )
+        pointer allocate( size_type _Count, const void* _Hint = nullptr )
         {
             return reinterpret_cast<pointer>( s_MichaelHeap.alloc( sizeof(T) * _Count ));
         }
         {
             return reinterpret_cast<pointer>( s_MichaelHeap.alloc( sizeof(T) * _Count ));
         }
index 8f3c8f6e61b8157b32fdd3f4b1b1833fdf3d1f77..01cf3936192b313bbca844d8312d78a1b4720627 100644 (file)
@@ -248,7 +248,7 @@ namespace queue {
                 }
                 else {
                     Writer * pWriter = dynamic_cast<Writer *>( *it );
                 }
                 else {
                     Writer * pWriter = dynamic_cast<Writer *>( *it );
-                    CPPUNIT_ASSERT( pWriter != NULL );
+                    CPPUNIT_ASSERT( pWriter != nullptr );
                     fTimeWriter += pWriter->m_fTime;
                     nPushFailed += pWriter->m_nPushFailed;
                     if ( !boost::is_base_of<cds::bounded_container, Queue>::value ) {
                     fTimeWriter += pWriter->m_fTime;
                     nPushFailed += pWriter->m_nPushFailed;
                     if ( !boost::is_base_of<cds::bounded_container, Queue>::value ) {
index 23e9f08b93991c06f2cd7adf28a0f5064fff7f17..7e9f65ac2dae97a24f3b7074325d6d73f6f2efe4 100644 (file)
@@ -120,7 +120,7 @@ namespace queue {
             {
                 lock_guard l( m_Lock );
                 if ( m_List.empty() )
             {
                 lock_guard l( m_Lock );
                 if ( m_List.empty() )
-                    return cds::nullptr;
+                    return nullptr;
                 value_type& v = m_List.front();
                 m_List.pop_front();
                 return &v;
                 value_type& v = m_List.front();
                 m_List.pop_front();
                 return &v;
index 2b9511fb5a022753d5074ff7d8cb8c68947ee024..ea36000a9e4ca3d2d73b6464cce0843618bc69b0 100644 (file)
@@ -222,7 +222,7 @@ namespace queue {
                 }
                 else {
                     Writer * pWriter = dynamic_cast<Writer *>( *it );
                 }
                 else {
                     Writer * pWriter = dynamic_cast<Writer *>( *it );
-                    CPPUNIT_ASSERT( pWriter != NULL );
+                    CPPUNIT_ASSERT( pWriter != nullptr );
                     fTimeWriter += pWriter->m_fTime;
                     nPushFailed += pWriter->m_nPushFailed;
                     if ( !boost::is_base_of<cds::bounded_container, Queue>::value ) {
                     fTimeWriter += pWriter->m_fTime;
                     nPushFailed += pWriter->m_nPushFailed;
                     if ( !boost::is_base_of<cds::bounded_container, Queue>::value ) {
index 05f3bffa2fe6eae49d32b9f0d0daea76416c810b..88a1899925575860eb2b9ec1a862d58ba73859c1 100644 (file)
@@ -160,7 +160,7 @@ namespace set2 {
             size_t nFindFailed = 0;
             for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) {
                 work_thread * pThread = static_cast<work_thread *>( *it );
             size_t nFindFailed = 0;
             for ( CppUnitMini::ThreadPool::iterator it = pool.begin(); it != pool.end(); ++it ) {
                 work_thread * pThread = static_cast<work_thread *>( *it );
-                assert( pThread != NULL );
+                assert( pThread != nullptr );
                 nInsertSuccess += pThread->m_nInsertSuccess;
                 nInsertFailed += pThread->m_nInsertFailed;
                 nDeleteSuccess += pThread->m_nDeleteSuccess;
                 nInsertSuccess += pThread->m_nInsertSuccess;
                 nInsertFailed += pThread->m_nInsertFailed;
                 nDeleteSuccess += pThread->m_nDeleteSuccess;
index 14e40f64c14d4a5eec799b8981d6baa96ce9e3eb..008c9d120391099c99794bbc2ad6abd6679e0492 100644 (file)
@@ -88,7 +88,7 @@ namespace istack {
                     m_Impl.pop();
                     return v;
                 }
                     m_Impl.pop();
                     return v;
                 }
-                return NULL;
+                return nullptr;
             }
 
             bool empty() const
             }
 
             bool empty() const