diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-16 13:17:24 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-03-17 06:09:42 +0000 |
commit | 8ca50d20c189dda2fcc4477303ef2947c72bb01e (patch) | |
tree | 4e68e83104b3822f3b9949f39b2de6a66b67ef97 /tools/source/ref | |
parent | a976a19ca82661d8b459b85f5514b0e4c9222d47 (diff) |
loplugin:constantparam in tools
Change-Id: I3774661799c074561c694515baba42a375d0a077
Reviewed-on: https://gerrit.libreoffice.org/23301
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'tools/source/ref')
-rw-r--r-- | tools/source/ref/pstm.cxx | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx index 6c10aaace559..3c15968c0699 100644 --- a/tools/source/ref/pstm.cxx +++ b/tools/source/ref/pstm.cxx @@ -51,11 +51,11 @@ SvCreateInstancePersist SvClassManager::Get( sal_Int32 nClassId ) (cf. <SvPersistStream::SetStream>). @see SvPersistStream::SetStream */ -SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream, Index nStartIdxP ) +SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream ) : rClassMgr( rMgr ) , pStm( pStream ) - , aPUIdx( nStartIdxP ) - , nStartIdx( nStartIdxP ) + , aPUIdx( 1 ) + , nStartIdx( 1 ) , pRefStm( nullptr ) { DBG_ASSERT( nStartIdx != 0, "zero index not allowed" ); @@ -446,8 +446,7 @@ SvPersistStream& SvPersistStream::WritePointer void SvPersistStream::ReadObj ( - SvPersistBase * & rpObj, - bool bRegister + SvPersistBase * & rpObj ) { sal_uInt8 nHdr; @@ -492,15 +491,12 @@ void SvPersistStream::ReadObj // Save reference rpObj->AddFirstRef(); - if( bRegister ) - { - // insert into table - const Index nNewId = aPUIdx.Insert( rpObj ); - // in order to restore state after saving - aPTable[ rpObj ] = nNewId; - DBG_ASSERT( !(nHdr & P_DBGUTIL) || nId == nNewId, - "read write id conflict: not the same" ); - } + // insert into table + const Index nNewId = aPUIdx.Insert( rpObj ); + // in order to restore state after saving + aPTable[ rpObj ] = nNewId; + DBG_ASSERT( !(nHdr & P_DBGUTIL) || nId == nNewId, + "read write id conflict: not the same" ); rpObj->Load( *this ); #ifdef DBG_UTIL if( nObjLen + nObjPos != Tell() ) @@ -529,7 +525,7 @@ SvPersistStream& SvPersistStream::ReadPointer SvPersistBase * & rpObj ) { - ReadObj( rpObj, true ); + ReadObj( rpObj ); return *this; } |