From 7ba8162b40a3001be933cdd81c80e2b5d38353cc Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 14 Nov 2026 15:15:38 -0300
Subject: indexlib: Use nullptr for scoped pointer defaults
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Use the C++ null pointer constant for the default owned pointer in scoped_ptr construction and reset.

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 indexlib/boost-compat/scoped_ptr.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indexlib/boost-compat/scoped_ptr.h b/indexlib/boost-compat/scoped_ptr.h
index 41d4f9b8e..241377ece 100644
--- a/indexlib/boost-compat/scoped_ptr.h
+++ b/indexlib/boost-compat/scoped_ptr.h
@@ -42,7 +42,7 @@ public:
 
     typedef T element_type;
 
-    explicit scoped_ptr(T * p = 0): ptr(p) // never throws
+    explicit scoped_ptr(T * p = nullptr): ptr(p) // never throws
     {
     }
 
@@ -51,7 +51,7 @@ public:
         boost::checked_delete(ptr);
     }
 
-    void reset(T * p = 0) // never throws
+    void reset(T * p = nullptr) // never throws
     {
         assert(p == 0 || p != ptr); // catch self-reset errors
         this_type(p).swap(*this);
-- 
cgit v1.2.3

