Browse Source

libobs: Use nullptr instead of NULL

jp9000 10 years ago
parent
commit
001bfb4a6d
1 changed files with 4 additions and 4 deletions
  1. 4 4
      libobs/util/windows/ComPtr.hpp

+ 4 - 4
libobs/util/windows/ComPtr.hpp

@@ -40,17 +40,17 @@ protected:
 	}
 	}
 
 
 public:
 public:
-	inline ComPtr() : ptr(NULL)                    {}
+	inline ComPtr() : ptr(nullptr)                 {}
 	inline ComPtr(T *p) : ptr(p)                   {if (ptr) ptr->AddRef();}
 	inline ComPtr(T *p) : ptr(p)                   {if (ptr) ptr->AddRef();}
 	inline ComPtr(const ComPtr<T> &c) : ptr(c.ptr) {if (ptr) ptr->AddRef();}
 	inline ComPtr(const ComPtr<T> &c) : ptr(c.ptr) {if (ptr) ptr->AddRef();}
-	inline ComPtr(ComPtr<T> &&c) : ptr(c.ptr)      {c.ptr = NULL;}
+	inline ComPtr(ComPtr<T> &&c) : ptr(c.ptr)      {c.ptr = nullptr;}
 	inline ~ComPtr()                               {Kill();}
 	inline ~ComPtr()                               {Kill();}
 
 
 	inline void Clear()
 	inline void Clear()
 	{
 	{
 		if (ptr) {
 		if (ptr) {
 			ptr->Release();
 			ptr->Release();
-			ptr = NULL;
+			ptr = nullptr;
 		}
 		}
 	}
 	}
 
 
@@ -71,7 +71,7 @@ public:
 		if (this != &c) {
 		if (this != &c) {
 			Kill();
 			Kill();
 			ptr = c.ptr;
 			ptr = c.ptr;
-			c.ptr = NULL;
+			c.ptr = nullptr;
 		}
 		}
 
 
 		return *this;
 		return *this;