diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-10-11 16:27:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-12 06:38:11 +0000 |
commit | 41683b9a8581445fef09e7a25ad35e58fc5602be (patch) | |
tree | b43c19c199b3361536aa411aea5bc88b7d93b05d /include/tools/ref.hxx | |
parent | 90021d3d3b8d42ee8b8b1af86d4c1880a29d39ef (diff) |
use more 'nullptr' in SvRef templates
Change-Id: Idfe140863b7ec51230110d942c5732e18f411192
Reviewed-on: https://gerrit.libreoffice.org/29701
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/tools/ref.hxx')
-rw-r--r-- | include/tools/ref.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx index c8db2bd6deca..ff7175b86f81 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 |