Replace NULL with nullptr
[libcds.git] / cds / threading / details / _common.h
index 7c11fc33e6683dd08eceae8fa5d346ca7ddd50d3..8c295d85dde0ea606be65c485b88e5238c36dd75 100644 (file)
@@ -147,12 +147,12 @@ namespace cds {
 
             //@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
-                , 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)
@@ -160,17 +160,17 @@ namespace cds {
                 if (cds::gc::HP::isUsed() )
                     m_hpManager = new (m_hpManagerPlaceholder) cds::gc::HP::thread_gc_impl;
                 else
-                    m_hpManager = null_ptr<cds::gc::HP::thread_gc_impl *>();
+                    m_hpManager = nullptr;
 
                 if ( cds::gc::HRC::isUsed() )
                     m_hrcManager = new (m_hrcManagerPlaceholder) cds::gc::HRC::thread_gc_impl;
                 else
-                    m_hrcManager = null_ptr<cds::gc::HRC::thread_gc_impl *>();
+                    m_hrcManager = nullptr;
 
                 if ( cds::gc::PTB::isUsed() )
                     m_ptbManager = new (m_ptbManagerPlaceholder) cds::gc::PTB::thread_gc_impl;
                 else
-                    m_ptbManager = null_ptr<cds::gc::PTB::thread_gc_impl *>();
+                    m_ptbManager = nullptr;
             }
 
             ~ThreadData()
@@ -178,27 +178,27 @@ namespace cds {
                 if ( m_hpManager ) {
                     typedef cds::gc::HP::thread_gc_impl hp_thread_gc_impl;
                     m_hpManager->~hp_thread_gc_impl();
-                    m_hpManager = null_ptr<cds::gc::HP::thread_gc_impl *>();
+                    m_hpManager = nullptr;
                 }
 
                 if ( m_hrcManager ) {
                     typedef cds::gc::HRC::thread_gc_impl hrc_thread_gc_impl;
                     m_hrcManager->~hrc_thread_gc_impl();
-                    m_hrcManager = null_ptr<cds::gc::HRC::thread_gc_impl *>();
+                    m_hrcManager = nullptr;
                 }
 
                 if ( m_ptbManager ) {
                     typedef cds::gc::PTB::thread_gc_impl ptb_thread_gc_impl;
                     m_ptbManager->~ptb_thread_gc_impl();
-                    m_ptbManager = null_ptr<cds::gc::PTB::thread_gc_impl *>();
+                    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
-                assert( m_pSHBRCU == NULL );
-                assert( m_pSHTRCU == NULL );
+                assert( m_pSHBRCU == nullptr );
+                assert( m_pSHTRCU == nullptr );
 #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 );
-                        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 );
-                        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 );
-                        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 );
-                        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 );
-                        m_pSHTRCU = NULL;
+                        m_pSHTRCU = nullptr;
                     }
 #endif
                     return true;