diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-03 16:31:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-16 18:42:57 +0100 |
commit | 270e41adb0c7a5f3e25e0ea25933de0d5c32ef9c (patch) | |
tree | d56df4efd8e9345cf7f213e6149b9a71a49da458 /vcl/source/gdi/impvect.cxx | |
parent | 26caf1bc59c81704f11225e3e431e412deb8c475 (diff) |
loplugin:buriedassign in sd..writerfilter
Change-Id: I954c12d9e1c493be6ac8c7b15076077b5bff5b74
Reviewed-on: https://gerrit.libreoffice.org/62811
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi/impvect.cxx')
-rw-r--r-- | vcl/source/gdi/impvect.cxx | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index c9b51f575918..fc69daf1b082 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -239,7 +239,8 @@ ImplVectMap::~ImplVectMap() inline void ImplVectMap::Set( long nY, long nX, sal_uInt8 cVal ) { const sal_uInt8 cShift = sal::static_int_cast<sal_uInt8>(6 - ( ( nX & 3 ) << 1 )); - ( ( mpScan[ nY ][ nX >> 2 ] ) &= ~( 3 << cShift ) ) |= ( cVal << cShift ); + auto & rPixel = mpScan[ nY ][ nX >> 2 ]; + rPixel = (rPixel & ~( 3 << cShift ) ) | ( cVal << cShift ); } inline sal_uInt8 ImplVectMap::Get( long nY, long nX ) const @@ -598,7 +599,8 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr ) } } - aNewArr1.ImplSetRealSize( nCount = nNewPos ); + nCount = nNewPos; + aNewArr1.ImplSetRealSize( nCount ); // pass 2 aNewArr2.ImplSetSize( nCount ); @@ -620,7 +622,8 @@ void ImplChain::ImplPostProcess( const ImplPointArray& rArr ) pLeast = &( aNewArr1[ n++ ] ); } - aNewArr2[ nNewPos++ ] = *( pLast = pLeast ); + pLast = pLeast; + aNewArr2[ nNewPos++ ] = *pLast; } aNewArr2.ImplSetRealSize( nNewPos ); @@ -675,7 +678,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, if( n ) fPercentStep_2 = 45.0 / n; - VECT_PROGRESS( pProgress, FRound( fPercent += 10.0 ) ); + fPercent += 10.0; + VECT_PROGRESS( pProgress, FRound( fPercent ) ); for( sal_uInt16 i = 0; i < n; i++ ) { @@ -683,7 +687,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, const Color aFindColor( aBmpCol.GetRed(), aBmpCol.GetGreen(), aBmpCol.GetBlue() ); std::unique_ptr<ImplVectMap> xMap(ImplExpand( pRAcc.get(), aFindColor )); - VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) ); + fPercent += fPercentStep_2; + VECT_PROGRESS( pProgress, FRound( fPercent ) ); if( xMap ) { @@ -706,7 +711,8 @@ bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, } } - VECT_PROGRESS( pProgress, FRound( fPercent += fPercentStep_2 ) ); + fPercent += fPercentStep_2; + VECT_PROGRESS( pProgress, FRound( fPercent ) ); } delete[] pColorSet; @@ -935,7 +941,9 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain if( pMap->IsCont( nTryY, nTryX ) ) { rChain.ImplAdd( static_cast<sal_uInt8>(nLastDir) ); - pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX ); + nActY = nTryY; + nActX = nTryX; + pMap->Set( nActY, nActX, VECT_DONE_INDEX ); nFound = 1; } else @@ -952,7 +960,9 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain if( pMap->IsCont( nTryY, nTryX ) ) { rChain.ImplAdd( static_cast<sal_uInt8>(nDir) ); - pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX ); + nActY = nTryY; + nActX = nTryX; + pMap->Set( nActY, nActX, VECT_DONE_INDEX ); nFound = 1; nLastDir = nDir; break; |