summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/bitmap3.cxx
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2020-12-18 16:30:54 +1100
committerTomaž Vajngerl <quikee@gmail.com>2020-12-19 04:20:02 +0100
commitf0e1f861d537e95bafeb52e240d093e574aa2ee9 (patch)
tree3ec57378d6f22bbf14895f7b3cfaba260ae1e67f /vcl/source/gdi/bitmap3.cxx
parent9a575298bd4c704718084481cb57db93259eca68 (diff)
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 <quikee@gmail.com>
Diffstat (limited to 'vcl/source/gdi/bitmap3.cxx')
-rw-r--r--vcl/source/gdi/bitmap3.cxx10
1 files changed, 5 insertions, 5 deletions
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;