[Libreoffice-commits] core.git: include/tools

Jochen Nitschke j.nitschke+logerrit at ok.de
Wed Oct 12 06:43:04 UTC 2016


 include/tools/ref.hxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 41683b9a8581445fef09e7a25ad35e58fc5602be
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Tue Oct 11 16:27:38 2016 +0200

    use more 'nullptr' in SvRef templates
    
    Change-Id: Idfe140863b7ec51230110d942c5732e18f411192
    Reviewed-on: https://gerrit.libreoffice.org/29701
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx
index c8db2bd..ff7175b 100644
--- a/include/tools/ref.hxx
+++ b/include/tools/ref.hxx
@@ -67,7 +67,7 @@ public:
 
     SvRef & operator =(SvRef const & rObj)
     {
-        if (rObj.pObj != 0) {
+        if (rObj.pObj != nullptr) {
             rObj.pObj->AddNextRef();
         }
         T * pRefObj = pObj;
@@ -218,13 +218,13 @@ public:
     inline               SvCompatWeakRef( T* pObj )
                          {  if( pObj ) _xHdl = pObj->GetHdl(); }
     inline SvCompatWeakRef& operator = ( T * pObj )
-                         {  _xHdl = pObj ? pObj->GetHdl() : 0; return *this; }
+                         {  _xHdl = pObj ? pObj->GetHdl() : nullptr; return *this; }
     inline bool          Is() const
                          { return _xHdl.Is() && _xHdl->GetObj(); }
     inline T*            operator -> () const
-                         { return _xHdl.Is() ? _xHdl->GetObj() : 0; }
+                         { return _xHdl.Is() ? _xHdl->GetObj() : nullptr; }
     inline operator T* () const
-                         { return _xHdl.Is() ? _xHdl->GetObj() : 0; }
+                         { return _xHdl.Is() ? _xHdl->GetObj() : nullptr; }
 };
 
 #endif


More information about the Libreoffice-commits mailing list