Use `nullptr` everywhere in `class ToRelease`
authorAndrey Okoshkin <a.okoshkin@samsung.com>
Wed, 7 Feb 2018 13:29:59 +0000 (16:29 +0300)
committerAndrey Okoshkin <a.okoshkin@samsung.com>
Thu, 8 Feb 2018 07:25:17 +0000 (10:25 +0300)
Do not mix usage of `NULL` and `nullptr`.

src/debug/netcoredbg/torelease.h

index 8a658bf5fcb25d9c6ab386fc54c8e781cdc32b2e..173c4068a19aa7107b47eafdf0b2ab0df24bf6db 100644 (file)
@@ -18,7 +18,7 @@ class ToRelease
 {
 public:
     ToRelease()
-        : m_ptr(NULL)
+        : m_ptr(nullptr)
     {}
 
     ToRelease(T* ptr)
@@ -60,16 +60,15 @@ public:
     T* Detach()
     {
         T* pT = m_ptr;
-        m_ptr = NULL;
+        m_ptr = nullptr;
         return pT;
     }
 
     void Release()
     {
-        if (m_ptr != NULL)
-        {
+        if (m_ptr != nullptr) {
             m_ptr->Release();
-            m_ptr = NULL;
+            m_ptr = nullptr;
         }
     }