vcl/source/gdi/bitmap3.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit f0e1f861d537e95bafeb52e240d093e574aa2ee9 Author: Chris Sherlock <chris.sherloc...@gmail.com> AuthorDate: Fri Dec 18 16:30:54 2020 +1100 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Sat Dec 19 04:20:02 2020 +0100 vcl: move variables in Dither() closer to where they are used Change-Id: If0621cd6feb4442f2bc2c026580bf50259c6b2f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107951 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index aba33b41c754..293f1682e00c 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -751,18 +751,15 @@ bool Bitmap::Dither() tools::Long nWidth = pReadAcc->Width(); tools::Long nWidth1 = nWidth - 1; tools::Long nHeight = pReadAcc->Height(); - tools::Long nX; tools::Long nW = nWidth * 3; tools::Long nW2 = nW - 3; - tools::Long nRErr, nGErr, nBErr; - tools::Long nRC, nGC, nBC; std::unique_ptr<tools::Long[]> p1(new tools::Long[ nW ]); std::unique_ptr<tools::Long[]> p2(new tools::Long[ nW ]); tools::Long* p1T = p1.get(); tools::Long* p2T = p2.get(); tools::Long* pTmp; - bool bPal = pReadAcc->HasPalette(); + bool bPal = pReadAcc->HasPalette(); pTmp = p2T; if( bPal ) @@ -790,6 +787,9 @@ bool Bitmap::Dither() } } + tools::Long nRErr, nGErr, nBErr; + tools::Long nRC, nGC, nBC; + for( tools::Long nY = 1, nYAcc = 0; nY <= nHeight; nY++, nYAcc++ ) { pTmp = p1T; @@ -825,7 +825,7 @@ bool Bitmap::Dither() } // Examine first Pixel separately - nX = 0; + tools::Long nX = 0; tools::Long nTemp; CALC_ERRORS; CALC_TABLES7; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits