diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-05 17:51:56 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-12-05 20:11:52 +0100 |
commit | 6cd053ebf2289fda4c5abd523db493d570ebb1c3 (patch) | |
tree | 3f08b653a2d1a0411a9e0ea7979972d92656f0a4 /sw/source | |
parent | 7c1b420c0f094eee1020806a75f4baa48c3d5d2b (diff) |
since touching this: sprinkle in some nullptr
Change-Id: I8a229e020acddfda2e7c69fc7faf24d1c338c879
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/attr/calbck.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index a1193f74a7d0..a06bba263140 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -23,12 +23,12 @@ #include <swcache.hxx> #include <swfntcch.hxx> -static SwClientIter* pClientIters = 0; +static SwClientIter* pClientIters = nullptr; TYPEINIT0( SwClient ); SwClient::SwClient( SwModify* pToRegisterIn ) - : pLeft( 0 ), pRight( 0 ), pRegisteredIn( 0 ) + : pLeft( nullptr ), pRight( nullptr ), pRegisteredIn( nullptr ) { if(pToRegisterIn) // connect to SwModify @@ -81,7 +81,7 @@ bool SwClient::GetInfo( SfxPoolItem& ) const } SwModify::SwModify() - : SwClient(0), pRoot(0) + : SwClient(nullptr), pRoot(nullptr) { bModifyLocked = false; bLockClientList = false; @@ -91,7 +91,7 @@ SwModify::SwModify() } SwModify::SwModify( SwModify* pToRegisterIn ) - : SwClient( pToRegisterIn ), pRoot( 0 ) + : SwClient( pToRegisterIn ), pRoot( nullptr ) { bModifyLocked = false; bLockClientList = false; @@ -122,7 +122,7 @@ SwModify::~SwModify() SwClient* p = aIter.GoStart(); while ( p ) { - p->pRegisteredIn = 0; + p->pRegisteredIn = nullptr; p = ++aIter; } } @@ -195,7 +195,7 @@ bool SwModify::GetInfo( SfxPoolItem& rInfo ) const if( pLast ) { while( ( bRet = pLast->GetInfo( rInfo ) ) && - 0 != ( pLast = ++aIter ) ) + nullptr != ( pLast = ++aIter ) ) ; } } @@ -218,15 +218,15 @@ void SwModify::Add( SwClient* pDepend ) } #endif // deregister new client in case it is already registered elsewhere - if( pDepend->pRegisteredIn != 0 ) + if( pDepend->pRegisteredIn != nullptr ) pDepend->pRegisteredIn->Remove( pDepend ); if( !pRoot ) { // first client added pRoot = pDepend; - pRoot->pLeft = 0; - pRoot->pRight = 0; + pRoot->pLeft = nullptr; + pRoot->pRight = nullptr; } else { @@ -246,7 +246,7 @@ void SwModify::Add( SwClient* pDepend ) SwClient* SwModify::Remove( SwClient* pDepend ) { if ( bInDocDTOR ) - return 0; + return nullptr; if( pDepend->pRegisteredIn == this ) { @@ -275,8 +275,8 @@ SwClient* SwModify::Remove( SwClient* pDepend ) pTmp = pTmp->pNxtIter; } - pDepend->pLeft = 0; - pDepend->pRight = 0; + pDepend->pLeft = nullptr; + pDepend->pRight = nullptr; } else { @@ -284,7 +284,7 @@ SwClient* SwModify::Remove( SwClient* pDepend ) } // disconnect client from me - pDepend->pRegisteredIn = 0; + pDepend->pRegisteredIn = nullptr; return pDepend; } @@ -369,8 +369,8 @@ bool SwDepend::GetInfo( SfxPoolItem& rInfo ) const SwClientIter::SwClientIter( const SwModify& rModify ) : rRoot(rModify) - , pNxtIter(NULL) - , aSrchId(0) + , pNxtIter(nullptr) + , aSrchId(nullptr) { if( pClientIters ) { @@ -398,7 +398,7 @@ SwClientIter::~SwClientIter() { SwClientIter* pTmp = pClientIters; while( pTmp->pNxtIter != this ) - if( 0 == ( pTmp = pTmp->pNxtIter ) ) + if( nullptr == ( pTmp = pTmp->pNxtIter ) ) { OSL_ENSURE( this, "Lost my pointer" ); return ; |