diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:21:32 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:34 +0100 |
commit | 5bbdb9423e15b68438bb8397c15635e044129e28 (patch) | |
tree | 737406d1586cdd8b5247f7f230ab59bf0bb87bbb /rsc/source/res | |
parent | e96bf3c40f945d15a8bdc9cffc27346dfb3cb246 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I8df6c1c7d2312a4864750180561a3e63fe37003f
Diffstat (limited to 'rsc/source/res')
-rw-r--r-- | rsc/source/res/rscarray.cxx | 18 | ||||
-rw-r--r-- | rsc/source/res/rscclass.cxx | 18 | ||||
-rw-r--r-- | rsc/source/res/rscclobj.cxx | 4 | ||||
-rw-r--r-- | rsc/source/res/rscconst.cxx | 2 | ||||
-rw-r--r-- | rsc/source/res/rsccont.cxx | 14 | ||||
-rw-r--r-- | rsc/source/res/rscflag.cxx | 2 | ||||
-rw-r--r-- | rsc/source/res/rscmgr.cxx | 6 | ||||
-rw-r--r-- | rsc/source/res/rscstr.cxx | 8 | ||||
-rw-r--r-- | rsc/source/res/rsctop.cxx | 4 |
9 files changed, 38 insertions, 38 deletions
diff --git a/rsc/source/res/rscarray.cxx b/rsc/source/res/rscarray.cxx index 4db3fb2c8dbb..595963b67ebc 100644 --- a/rsc/source/res/rscarray.cxx +++ b/rsc/source/res/rscarray.cxx @@ -69,16 +69,16 @@ RscTop * RscArray::GetTypeClass() const static RscInstNode * Create( RscInstNode * pNode ) { - RscInstNode * pRetNode = NULL; + RscInstNode * pRetNode = nullptr; if( pNode ) { pRetNode = new RscInstNode( pNode->GetId() ); - pRetNode->aInst = pNode->aInst.pClass->Create( NULL, pNode->aInst ); + pRetNode->aInst = pNode->aInst.pClass->Create( nullptr, pNode->aInst ); RscInstNode * pTmpNode = Create(pNode->Left()); if (pTmpNode) pRetNode->Insert( pTmpNode ); - if( (pTmpNode = Create( pNode->Right() )) != NULL ) + if( (pTmpNode = Create( pNode->Right() )) != nullptr ) pRetNode->Insert( pTmpNode ); } @@ -105,7 +105,7 @@ RSCINST RscArray::Create( RSCINST * pInst, const RSCINST & rDflt, RscTop::Create( &aInst, rDflt, bOwnClass ); pClassData = reinterpret_cast<RscArrayInst *>(aInst.pData + nOffInstData); - pClassData->pNode = NULL; + pClassData->pNode = nullptr; if( bOwnClass ) { RscArrayInst * pDfltClassData; @@ -160,15 +160,15 @@ ERRTYPE RscArray::GetValueEle( const RSCINST & rInst, if( pClassData->pNode ) pNode = pClassData->pNode->Search( sal_uInt32(lValue) ); else - pNode = NULL; + pNode = nullptr; if( !pNode ) { pNode = new RscInstNode( sal_uInt32(lValue) ); if( pCreateClass && GetSuperClass()->InHierarchy( pCreateClass ) ) - pNode->aInst = pCreateClass->Create( NULL, rInst ); + pNode->aInst = pCreateClass->Create( nullptr, rInst ); else - pNode->aInst = GetSuperClass()->Create( NULL, rInst ); + pNode->aInst = GetSuperClass()->Create( nullptr, rInst ); pNode->aInst.pClass->SetToDefault( pNode->aInst ); if( pClassData->pNode ) @@ -311,7 +311,7 @@ void RscArray::WriteSrcHeader( const RSCINST & rInst, FILE * fOutput, if( pTC->IsSrsDefault() ) { // nur einen Wert schreiben - RscInstNode * pNode = NULL; + RscInstNode * pNode = nullptr; if( pClassData->pNode ) { std::vector< sal_uInt32 >::const_iterator it; @@ -392,7 +392,7 @@ ERRTYPE RscArray::WriteRc( const RSCINST & rInst, RscWriteRc & rMem, { ERRTYPE aError; RscArrayInst * pClassData; - RscInstNode * pNode = NULL; + RscInstNode * pNode = nullptr; pClassData = reinterpret_cast<RscArrayInst *>(rInst.pData + nOffInstData); diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx index a16755202bcb..41647629008b 100644 --- a/rsc/source/res/rscclass.cxx +++ b/rsc/source/res/rscclass.cxx @@ -32,7 +32,7 @@ RscClass::RscClass( Atom nId, sal_uInt32 nTypeId, RscTop * pSuperCl ) : RscTop( nId, nTypeId, pSuperCl ) { nEntries = 0; - pVarTypeList = NULL; + pVarTypeList = nullptr; nSuperSize = RscTop::Size(); nSize = nSuperSize + ALIGNED_SIZE( sizeof( RscClassInst ) ); } @@ -51,7 +51,7 @@ void RscClass::Pre_dtor() RSCINST( pVarTypeList[ i ].pClass, pVarTypeList[ i ].pDefault ) ); rtl_freeMemory( pVarTypeList[ i ].pDefault ); - pVarTypeList[ i ].pDefault = NULL; + pVarTypeList[ i ].pDefault = nullptr; } } } @@ -166,7 +166,7 @@ RSCINST RscClass::Create( RSCINST * pInst, for( i = 0; i < nEntries; i++ ) { - aDfltI = GetInstData( bOwnClass ? rDflt.pData : NULL, i, true ); + aDfltI = GetInstData( bOwnClass ? rDflt.pData : nullptr, i, true ); if( (VAR_POINTER & pVarTypeList[ i ].nVarType) && !(VAR_NODATAINST & pVarTypeList[ i ].nVarType) ) @@ -181,10 +181,10 @@ RSCINST RscClass::Create( RSCINST * pInst, else ppData = reinterpret_cast<CLASS_DATA*>(aInst.pData + pVarTypeList[ i ].nOffset ); - *ppData = NULL; + *ppData = nullptr; if( aDfltI.IsInst() ) { - aMemInst = pVarTypeList[ i ].pClass->Create( NULL, aDfltI ); + aMemInst = pVarTypeList[ i ].pClass->Create( nullptr, aDfltI ); *ppData = aMemInst.pData; } } @@ -250,7 +250,7 @@ ERRTYPE RscClass::SetVariable( Atom nVarName, if( pDflt ) pVarTypeList[ nEntries ].pDefault = pDflt->pData; else - pVarTypeList[ nEntries ].pDefault = NULL; + pVarTypeList[ nEntries ].pDefault = nullptr; pVarTypeList[ nEntries ].nVarType = ~VAR_POINTER & nVarType; if( pClass->Size() > 10 || (nVarType & VAR_EXTENDABLE) ) @@ -338,16 +338,16 @@ RSCINST RscClass::GetVariable( const RSCINST & rInst, RSCINST * pInst = reinterpret_cast<RSCINST *> (rInst.pData + pVarTypeList[ i ].nOffset ); if( pCreateClass && pCreateClass->InHierarchy( aTmpI.pClass ) ) - *pInst = pCreateClass->Create( NULL, aDefInst ); + *pInst = pCreateClass->Create( nullptr, aDefInst ); else - *pInst = aTmpI.pClass->Create( NULL, aDefInst ); + *pInst = aTmpI.pClass->Create( nullptr, aDefInst ); aTmpI = *pInst; } else { CLASS_DATA * ppData = reinterpret_cast<CLASS_DATA *>(rInst.pData + pVarTypeList[ i ].nOffset); - aTmpI = aTmpI.pClass->Create( NULL, aDefInst ); + aTmpI = aTmpI.pClass->Create( nullptr, aDefInst ); *ppData = aTmpI.pData; } } diff --git a/rsc/source/res/rscclobj.cxx b/rsc/source/res/rscclobj.cxx index 8788ecba1659..940163644632 100644 --- a/rsc/source/res/rscclobj.cxx +++ b/rsc/source/res/rscclobj.cxx @@ -24,7 +24,7 @@ RefNode::RefNode( Atom nTyp ) { - pObjBiTree = 0; + pObjBiTree = nullptr; nTypNameId = nTyp; } @@ -54,7 +54,7 @@ ObjNode * RefNode::GetObjNode( const RscId & rRscId ) { if( pObjBiTree ) return pObjBiTree->Search( rRscId ); - return NULL; + return nullptr; } ObjNode::ObjNode( const RscId & rId, CLASS_DATA pData, sal_uLong lKey ) diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx index ed47f9ae2e5a..6e6c54c052cf 100644 --- a/rsc/source/res/rscconst.cxx +++ b/rsc/source/res/rscconst.cxx @@ -29,7 +29,7 @@ RscConst::RscConst( Atom nId, sal_uInt32 nTypeId ) : RscTop( nId, nTypeId ) { - pVarArray = NULL; + pVarArray = nullptr; nEntries = 0; } diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx index 2adc1fcf5769..d2fe2889e386 100644 --- a/rsc/source/res/rsccont.cxx +++ b/rsc/source/res/rsccont.cxx @@ -40,8 +40,8 @@ RscBaseCont::RscBaseCont( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper, : RscTop( nId, nTypeId, pSuper ) , nSize( 0 ) { - pTypeClass = NULL; - pTypeClass1 = NULL; + pTypeClass = nullptr; + pTypeClass1 = nullptr; bNoId = bNoIdent; nOffInstData = RscTop::Size(); nSize = nOffInstData + ALIGNED_SIZE( sizeof( RscBaseContInst ) ); @@ -65,7 +65,7 @@ void RscBaseCont::DestroyElements( RscBaseContInst * pClassData ) pClassData->pEntries[ i ].Destroy(); } rtl_freeMemory( pClassData->pEntries ); - pClassData->pEntries = NULL; + pClassData->pEntries = nullptr; pClassData->nEntries = 0; } } @@ -91,7 +91,7 @@ RSCINST RscBaseCont::Create( RSCINST * pInst, const RSCINST & rDflt, pClassData = reinterpret_cast<RscBaseContInst *>(aInst.pData + nOffInstData); pClassData->nEntries = 0; - pClassData->pEntries = NULL; + pClassData->pEntries = nullptr; pClassData->bDflt = true; if( bOwnClass ) @@ -114,7 +114,7 @@ RSCINST RscBaseCont::Create( RSCINST * pInst, const RSCINST & rDflt, pDfltClassData->pEntries[ i ].aName; aDfltI = pDfltClassData->pEntries[ i ].aInst; pClassData->pEntries[ i ].aInst = - aDfltI.pClass->Create( NULL, aDfltI ); + aDfltI.pClass->Create( nullptr, aDfltI ); } } } @@ -230,12 +230,12 @@ ERRTYPE RscBaseCont::GetElement( const RSCINST & rInst, const RscId & rEleName, { // initialize instance with CreateInst data pClassData->pEntries[ pClassData->nEntries ].aInst = - pCreateClass->Create( NULL, rCreateInst ); + pCreateClass->Create( nullptr, rCreateInst ); } else { pClassData->pEntries[ pClassData->nEntries ].aInst = - pCreateClass->Create( NULL, RSCINST() ); + pCreateClass->Create( nullptr, RSCINST() ); } pClassData->nEntries++; diff --git a/rsc/source/res/rscflag.cxx b/rsc/source/res/rscflag.cxx index d0f1573e1b3a..1c4b04ba1974 100644 --- a/rsc/source/res/rscflag.cxx +++ b/rsc/source/res/rscflag.cxx @@ -339,7 +339,7 @@ RSCINST RscClient::Create( RSCINST * pInst, const RSCINST & rDflt, aTmpI = pRefClass->CreateClient( &aTmpI, aDfltI, bOwnClass, nConstId ); else - aTmpI = pRefClass->CreateClient( NULL, aDfltI, + aTmpI = pRefClass->CreateClient( nullptr, aDfltI, bOwnClass, nConstId ); aTmpI.pClass = this; diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx index cb4ca66719f2..3c4fdbe1a75e 100644 --- a/rsc/source/res/rscmgr.cxx +++ b/rsc/source/res/rscmgr.cxx @@ -162,7 +162,7 @@ ERRTYPE RscMgr::WriteRcHeader( const RSCINST & rInst, RscWriteRc & rMem, { RscMgrInst * pClassData; ERRTYPE aError; - ObjNode * pObjNode = NULL; + ObjNode * pObjNode = nullptr; pClassData = reinterpret_cast<RscMgrInst *>(rInst.pData + RscClass::Size()); @@ -200,7 +200,7 @@ ERRTYPE RscMgr::WriteRcHeader( const RSCINST & rInst, RscWriteRc & rMem, } else { - RSCINST aRefInst = rInst.pClass->Create( NULL, aRefI ); + RSCINST aRefInst = rInst.pClass->Create( nullptr, aRefI ); aError = aRefI.pClass->WriteRcHeader( aRefInst, rMem, pTC, rId, nDeep, bExtra ); pTmpRefClass->Destroy( aRefInst ); @@ -302,7 +302,7 @@ ERRTYPE RscMgr::IsToDeep( const RSCINST & rInst, sal_uInt32 nDeep ) nDeep++; } else //aTmpI.IsInst() becomes false, end loop - aTmpI.pData = NULL; + aTmpI.pData = nullptr; } if( nDeep >= nRefDeep ) diff --git a/rsc/source/res/rscstr.cxx b/rsc/source/res/rscstr.cxx index f656e72b0ed8..5bd886e44460 100644 --- a/rsc/source/res/rscstr.cxx +++ b/rsc/source/res/rscstr.cxx @@ -32,7 +32,7 @@ RscString::RscString( Atom nId, sal_uInt32 nTypeId ) : RscTop( nId, nTypeId ) { nSize = ALIGNED_SIZE( sizeof( RscStringInst ) ); - pRefClass = NULL; + pRefClass = nullptr; } RSCCLASS_TYPE RscString::GetClassType() const @@ -53,7 +53,7 @@ ERRTYPE RscString::SetString( const RSCINST & rInst, const char * pStr ) if( pTmp ) { rtl_freeMemory( pTmp ); - pTmp = NULL; + pTmp = nullptr; } if( pStr ) @@ -112,7 +112,7 @@ RSCINST RscString::Create( RSCINST * pInst, const RSCINST & rDflt, bOwnClass = rDflt.pClass->InHierarchy( this ); reinterpret_cast<RscStringInst *>(aInst.pData)->aRefId.Create(); - reinterpret_cast<RscStringInst *>(aInst.pData)->pStr = NULL; + reinterpret_cast<RscStringInst *>(aInst.pData)->pStr = nullptr; reinterpret_cast<RscStringInst *>(aInst.pData)->bDflt = true; if( bOwnClass ) @@ -230,7 +230,7 @@ ERRTYPE RscString::WriteRc( const RSCINST & rInst, RscWriteRc & rMem, RscTypCont * pTC, sal_uInt32 nDeep, bool bExtra ) { ERRTYPE aError; - ObjNode * pObjNode = NULL; + ObjNode * pObjNode = nullptr; if( reinterpret_cast<RscStringInst *>(rInst.pData)->aRefId.IsId() ) diff --git a/rsc/source/res/rsctop.cxx b/rsc/source/res/rsctop.cxx index 1688e3951078..02ee9413632e 100644 --- a/rsc/source/res/rsctop.cxx +++ b/rsc/source/res/rsctop.cxx @@ -44,7 +44,7 @@ void RscTop::SetCallPar(const OString& rPar1, const OString& rPar2, RSCINST RscTop::GetDefault() { if( !aDfltInst.IsInst() ) - aDfltInst = this->Create( NULL, RSCINST() ); + aDfltInst = this->Create( nullptr, RSCINST() ); return aDfltInst; } @@ -63,7 +63,7 @@ RscTop * RscTop::GetTypeClass() const if( pSuperClass ) return pSuperClass->GetTypeClass(); else - return NULL; + return nullptr; } sal_uInt32 RscTop::Size() |