diff options
author | Noel Grandin <noel@peralex.com> | 2016-07-12 10:56:22 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-07-13 06:38:12 +0000 |
commit | c9b4e298137ed7c3112de533d44ddf56b1ebca6d (patch) | |
tree | e0afe5a2b31aa4cd04a40a364d7338a48f1d0535 /tools/source | |
parent | 5ff1e6bdf7f5b9db3b72d62537047fc45b7d104b (diff) |
loplugin:constparams in tools
Change-Id: Iea05efbb90a0a95fefd18ae9673095a31422f06c
Reviewed-on: https://gerrit.libreoffice.org/27137
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/generic/b3dtrans.cxx | 2 | ||||
-rw-r--r-- | tools/source/generic/fract.cxx | 2 | ||||
-rw-r--r-- | tools/source/generic/poly.cxx | 6 | ||||
-rw-r--r-- | tools/source/memtools/multisel.cxx | 2 | ||||
-rw-r--r-- | tools/source/memtools/unqidx.cxx | 2 | ||||
-rw-r--r-- | tools/source/rc/resmgr.cxx | 38 | ||||
-rw-r--r-- | tools/source/ref/errinf.cxx | 4 | ||||
-rw-r--r-- | tools/source/ref/globname.cxx | 2 | ||||
-rw-r--r-- | tools/source/stream/strmunx.cxx | 2 | ||||
-rw-r--r-- | tools/source/zcodec/zcodec.cxx | 2 |
10 files changed, 31 insertions, 31 deletions
diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx index 3d0d977cc9ef..c6364b7c23e1 100644 --- a/tools/source/generic/b3dtrans.cxx +++ b/tools/source/generic/b3dtrans.cxx @@ -327,7 +327,7 @@ void B3dTransformationSet::SetPerspective(bool bNew) } } -void B3dTransformationSet::SetViewportRectangle(Rectangle& rRect, Rectangle& rVisible) +void B3dTransformationSet::SetViewportRectangle(Rectangle const & rRect, Rectangle const & rVisible) { if(rRect != maViewportRectangle || rVisible != maVisibleRectangle) { diff --git a/tools/source/generic/fract.cxx b/tools/source/generic/fract.cxx index 78069a54fb53..2a7ad54983eb 100644 --- a/tools/source/generic/fract.cxx +++ b/tools/source/generic/fract.cxx @@ -362,7 +362,7 @@ bool operator > ( const Fraction& rVal1, const Fraction& rVal2 ) return rVal1.mpImpl->value > rVal2.mpImpl->value; } -SvStream& ReadFraction( SvStream& rIStream, Fraction& rFract ) +SvStream& ReadFraction( SvStream& rIStream, Fraction const & rFract ) { sal_Int32 num(0), den(0); rIStream.ReadInt32( num ); diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 6d70f8af0760..25baea04fb9f 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -212,7 +212,7 @@ void ImplPolygon::ImplSetSize( sal_uInt16 nNewSize, bool bResize ) mnPoints = nNewSize; } -void ImplPolygon::ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly ) +void ImplPolygon::ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon const * pInitPoly ) { //Can't fit this in :-(, throw ? if (mnPoints + nSpace > USHRT_MAX) @@ -1134,8 +1134,8 @@ public: Vector2D& operator-=( const Vector2D& rVec ) { mfX -= rVec.mfX; mfY -= rVec.mfY; return *this; } double Scalar( const Vector2D& rVec ) const { return mfX * rVec.mfX + mfY * rVec.mfY ; } Vector2D& Normalize(); - bool IsPositive( Vector2D& rVec ) const { return ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0; } - bool IsNegative( Vector2D& rVec ) const { return !IsPositive( rVec ); } + bool IsPositive( Vector2D const & rVec ) const { return ( mfX * rVec.mfY - mfY * rVec.mfX ) >= 0.0; } + bool IsNegative( Vector2D const & rVec ) const { return !IsPositive( rVec ); } }; Vector2D& Vector2D::Normalize() { diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx index ac32e372f8ef..47a78d3882ad 100644 --- a/tools/source/memtools/multisel.cxx +++ b/tools/source/memtools/multisel.cxx @@ -769,7 +769,7 @@ bool StringRangeEnumerator::getRangesFromString( const OUString& i_rPageRange, sal_Int32 i_nMinNumber, sal_Int32 i_nMaxNumber, sal_Int32 i_nLogicalOffset, - std::set< sal_Int32 >* i_pPossibleValues + std::set< sal_Int32 > const * i_pPossibleValues ) { o_rPageVector.clear(); diff --git a/tools/source/memtools/unqidx.cxx b/tools/source/memtools/unqidx.cxx index 7c57c1b4f3fe..7a2091601e5c 100644 --- a/tools/source/memtools/unqidx.cxx +++ b/tools/source/memtools/unqidx.cxx @@ -89,7 +89,7 @@ UniqueIndexImpl::Index UniqueIndexImpl::NextIndex(Index aIndex) const return it->first; } -UniqueIndexImpl::Index UniqueIndexImpl::GetIndexOf(void* p) const +UniqueIndexImpl::Index UniqueIndexImpl::GetIndexOf(void const * p) const { for( std::map<Index, void*>::const_iterator it = maMap.begin(); it != maMap.end(); ++it ) if( it->second == p ) diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx index 078ad5bfbcf4..8385e280e7fc 100644 --- a/tools/source/rc/resmgr.cxx +++ b/tools/source/rc/resmgr.cxx @@ -101,7 +101,7 @@ class InternalResMgr void * LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId, void **pResHandle ); public: - static void FreeGlobalRes( void *, void * ); + static void FreeGlobalRes( void const *, void * ); }; class ResMgrContainer @@ -616,7 +616,7 @@ void* InternalResMgr::LoadGlobalRes( RESOURCE_TYPE nRT, sal_uInt32 nId, return nullptr; } -void InternalResMgr::FreeGlobalRes( void * pResHandle, void * pResource ) +void InternalResMgr::FreeGlobalRes( void const * pResHandle, void * pResource ) { if ( !pResHandle ) // Free allocated resource @@ -1115,30 +1115,30 @@ RSHEADER_TYPE* ResMgr::CreateBlock( const ResId& rId ) return pHeader; } -sal_Int16 ResMgr::GetShort( void * pShort ) +sal_Int16 ResMgr::GetShort( void const * pShort ) { - return ((*(static_cast<sal_uInt8*>(pShort) + 0) << 8) | - (*(static_cast<sal_uInt8*>(pShort) + 1) << 0) ); + return ((*(static_cast<const sal_uInt8*>(pShort) + 0) << 8) | + (*(static_cast<const sal_uInt8*>(pShort) + 1) << 0) ); } -sal_Int32 ResMgr::GetLong( void * pLong ) +sal_Int32 ResMgr::GetLong( void const * pLong ) { - return ((*(static_cast<sal_uInt8*>(pLong) + 0) << 24) | - (*(static_cast<sal_uInt8*>(pLong) + 1) << 16) | - (*(static_cast<sal_uInt8*>(pLong) + 2) << 8) | - (*(static_cast<sal_uInt8*>(pLong) + 3) << 0) ); + return ((*(static_cast<const sal_uInt8*>(pLong) + 0) << 24) | + (*(static_cast<const sal_uInt8*>(pLong) + 1) << 16) | + (*(static_cast<const sal_uInt8*>(pLong) + 2) << 8) | + (*(static_cast<const sal_uInt8*>(pLong) + 3) << 0) ); } -sal_uInt64 ResMgr::GetUInt64( void* pDatum ) +sal_uInt64 ResMgr::GetUInt64( void const * pDatum ) { - return ((sal_uInt64(*(static_cast<sal_uInt8*>(pDatum) + 0)) << 56) | - (sal_uInt64(*(static_cast<sal_uInt8*>(pDatum) + 1)) << 48) | - (sal_uInt64(*(static_cast<sal_uInt8*>(pDatum) + 2)) << 40) | - (sal_uInt64(*(static_cast<sal_uInt8*>(pDatum) + 3)) << 32) | - (sal_uInt64(*(static_cast<sal_uInt8*>(pDatum) + 4)) << 24) | - (sal_uInt64(*(static_cast<sal_uInt8*>(pDatum) + 5)) << 16) | - (sal_uInt64(*(static_cast<sal_uInt8*>(pDatum) + 6)) << 8) | - (sal_uInt64(*(static_cast<sal_uInt8*>(pDatum) + 7)) << 0) ); + return ((sal_uInt64(*(static_cast<const sal_uInt8*>(pDatum) + 0)) << 56) | + (sal_uInt64(*(static_cast<const sal_uInt8*>(pDatum) + 1)) << 48) | + (sal_uInt64(*(static_cast<const sal_uInt8*>(pDatum) + 2)) << 40) | + (sal_uInt64(*(static_cast<const sal_uInt8*>(pDatum) + 3)) << 32) | + (sal_uInt64(*(static_cast<const sal_uInt8*>(pDatum) + 4)) << 24) | + (sal_uInt64(*(static_cast<const sal_uInt8*>(pDatum) + 5)) << 16) | + (sal_uInt64(*(static_cast<const sal_uInt8*>(pDatum) + 6)) << 8) | + (sal_uInt64(*(static_cast<const sal_uInt8*>(pDatum) + 7)) << 0) ); } sal_uInt32 ResMgr::GetStringWithoutHook( OUString& rStr, const sal_uInt8* pStr ) diff --git a/tools/source/ref/errinf.cxx b/tools/source/ref/errinf.cxx index 1091e40c32d9..4c3eb5209751 100644 --- a/tools/source/ref/errinf.cxx +++ b/tools/source/ref/errinf.cxx @@ -51,7 +51,7 @@ class DynamicErrorInfo_Impl sal_uInt16 nMask; void RegisterEDcr(DynamicErrorInfo *); - static void UnRegisterEDcr(DynamicErrorInfo *); + static void UnRegisterEDcr(DynamicErrorInfo const *); static ErrorInfo *GetDynamicErrorInfo(sal_uIntPtr lId); friend class DynamicErrorInfo; @@ -83,7 +83,7 @@ void DynamicErrorInfo_Impl::RegisterEDcr(DynamicErrorInfo *pDcr) rData.nNextDcr=0; } -void DynamicErrorInfo_Impl::UnRegisterEDcr(DynamicErrorInfo *pDcr) +void DynamicErrorInfo_Impl::UnRegisterEDcr(DynamicErrorInfo const *pDcr) { DynamicErrorInfo **ppDcr = TheEDcrData::get().ppDcr; sal_uIntPtr lIdx = (((sal_uIntPtr)(*pDcr) & ERRCODE_DYNAMIC_MASK) >> ERRCODE_DYNAMIC_SHIFT) - 1; diff --git a/tools/source/ref/globname.cxx b/tools/source/ref/globname.cxx index 8ba0b21c7b0a..f92a9f217e8e 100644 --- a/tools/source/ref/globname.cxx +++ b/tools/source/ref/globname.cxx @@ -160,7 +160,7 @@ bool SvGlobalName::operator == ( const SvGlobalName & rObj ) const return pImp == rObj.pImp; } -void SvGlobalName::MakeFromMemory( void * pData ) +void SvGlobalName::MakeFromMemory( void const * pData ) { memcpy( &pImp->szData, pData, sizeof( pImp->szData ) ); } diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index c47b7ebd5b2b..e26237e69606 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -145,7 +145,7 @@ bool lockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream ) return true; } -void unlockFile( sal_Size nStart, sal_Size nEnd, SvFileStream* pStream ) +void unlockFile( sal_Size nStart, sal_Size nEnd, SvFileStream const * pStream ) { osl::MutexGuard aGuard( LockMutex::get() ); std::vector<InternalStreamLock> &rLockList = LockList::get(); diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx index 839ef4cf35f8..a20c0d6bfcb8 100644 --- a/tools/source/zcodec/zcodec.cxx +++ b/tools/source/zcodec/zcodec.cxx @@ -391,7 +391,7 @@ void ZCodec::InitDecompress(SvStream & inStream) mpInBuf = new sal_uInt8[ mnInBufSize ]; } -void ZCodec::UpdateCRC ( sal_uInt8* pSource, long nDatSize) +void ZCodec::UpdateCRC ( sal_uInt8 const * pSource, long nDatSize) { mnCRC = rtl_crc32( mnCRC, pSource, nDatSize ); } |