diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-22 15:38:12 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-22 15:38:35 +0200 |
commit | 84db33a4569c67c0164b85bd218246e1741f6815 (patch) | |
tree | c69a54c5f68e3f6d170a8f7c91617e476ed42ab7 /vcl/source/gdi/bitmap4.cxx | |
parent | 8fa439aa710bdd21e61910c02bfb9d8a8117eef4 (diff) |
loplugin:commaoperator in vcl/
Change-Id: Ia5bbce27d9e9526122ce1e27389c7845e6709f27
Diffstat (limited to 'vcl/source/gdi/bitmap4.cxx')
-rw-r--r-- | vcl/source/gdi/bitmap4.cxx | 76 |
1 files changed, 59 insertions, 17 deletions
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx index f40ab4bddf0b..d5b190e9728c 100644 --- a/vcl/source/gdi/bitmap4.cxx +++ b/vcl/source/gdi/bitmap4.cxx @@ -215,11 +215,23 @@ bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor ) if( ++nY < nHeight ) { if( pRowTmp1 == pColRow1 ) - pRowTmp1 = pColRow2, pRowTmp2 = pColRow3, pRowTmp3 = pColRow1; + { + pRowTmp1 = pColRow2; + pRowTmp2 = pColRow3; + pRowTmp3 = pColRow1; + } else if( pRowTmp1 == pColRow2 ) - pRowTmp1 = pColRow3, pRowTmp2 = pColRow1, pRowTmp3 = pColRow2; + { + pRowTmp1 = pColRow3; + pRowTmp2 = pColRow1; + pRowTmp3 = pColRow2; + } else - pRowTmp1 = pColRow1, pRowTmp2 = pColRow2, pRowTmp3 = pColRow3; + { + pRowTmp1 = pColRow1; + pRowTmp2 = pColRow2; + pRowTmp3 = pColRow3; + } for( i = 0; i < nWidth2; i++ ) pRowTmp3[ i ] = pReadAcc->GetColor( pRows[ nY + 2 ], pColm[ i ] ); @@ -311,17 +323,35 @@ bool Bitmap::ImplMedianFilter() { for( nX = 0; nX < nWidth; nX++ ) { - nR1 = ( pColor = pRowTmp1 + nX )->GetRed(), nG1 = pColor->GetGreen(), nB1 = pColor->GetBlue(); - nR2 = ( ++pColor )->GetRed(), nG2 = pColor->GetGreen(), nB2 = pColor->GetBlue(); - nR3 = ( ++pColor )->GetRed(), nG3 = pColor->GetGreen(), nB3 = pColor->GetBlue(); - - nR4 = ( pColor = pRowTmp2 + nX )->GetRed(), nG4 = pColor->GetGreen(), nB4 = pColor->GetBlue(); - nR5 = ( ++pColor )->GetRed(), nG5 = pColor->GetGreen(), nB5 = pColor->GetBlue(); - nR6 = ( ++pColor )->GetRed(), nG6 = pColor->GetGreen(), nB6 = pColor->GetBlue(); - - nR7 = ( pColor = pRowTmp3 + nX )->GetRed(), nG7 = pColor->GetGreen(), nB7 = pColor->GetBlue(); - nR8 = ( ++pColor )->GetRed(), nG8 = pColor->GetGreen(), nB8 = pColor->GetBlue(); - nR9 = ( ++pColor )->GetRed(), nG9 = pColor->GetGreen(), nB9 = pColor->GetBlue(); + nR1 = ( pColor = pRowTmp1 + nX )->GetRed(); + nG1 = pColor->GetGreen(); + nB1 = pColor->GetBlue(); + nR2 = ( ++pColor )->GetRed(); + nG2 = pColor->GetGreen(); + nB2 = pColor->GetBlue(); + nR3 = ( ++pColor )->GetRed(); + nG3 = pColor->GetGreen(); + nB3 = pColor->GetBlue(); + + nR4 = ( pColor = pRowTmp2 + nX )->GetRed(); + nG4 = pColor->GetGreen(); + nB4 = pColor->GetBlue(); + nR5 = ( ++pColor )->GetRed(); + nG5 = pColor->GetGreen(); + nB5 = pColor->GetBlue(); + nR6 = ( ++pColor )->GetRed(); + nG6 = pColor->GetGreen(); + nB6 = pColor->GetBlue(); + + nR7 = ( pColor = pRowTmp3 + nX )->GetRed(); + nG7 = pColor->GetGreen(); + nB7 = pColor->GetBlue(); + nR8 = ( ++pColor )->GetRed(); + nG8 = pColor->GetGreen(); + nB8 = pColor->GetBlue(); + nR9 = ( ++pColor )->GetRed(); + nG9 = pColor->GetGreen(); + nB9 = pColor->GetBlue(); MNMX6( nR1, nR2, nR3, nR4, nR5, nR6 ); MNMX5( nR7, nR2, nR3, nR4, nR5 ); @@ -345,11 +375,23 @@ bool Bitmap::ImplMedianFilter() if( ++nY < nHeight ) { if( pRowTmp1 == pColRow1 ) - pRowTmp1 = pColRow2, pRowTmp2 = pColRow3, pRowTmp3 = pColRow1; + { + pRowTmp1 = pColRow2; + pRowTmp2 = pColRow3; + pRowTmp3 = pColRow1; + } else if( pRowTmp1 == pColRow2 ) - pRowTmp1 = pColRow3, pRowTmp2 = pColRow1, pRowTmp3 = pColRow2; + { + pRowTmp1 = pColRow3; + pRowTmp2 = pColRow1; + pRowTmp3 = pColRow2; + } else - pRowTmp1 = pColRow1, pRowTmp2 = pColRow2, pRowTmp3 = pColRow3; + { + pRowTmp1 = pColRow1; + pRowTmp2 = pColRow2; + pRowTmp3 = pColRow3; + } for( i = 0; i < nWidth2; i++ ) pRowTmp3[ i ] = pReadAcc->GetColor( pRows[ nY + 2 ], pColm[ i ] ); |