vcl/source/bitmap/BitmapEx.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 9b4cbd876b5eba07bfb00bc4eeef1b179b37fbb6
Author:     Christopher Sherlock <chris.sherloc...@gmail.com>
AuthorDate: Thu Dec 5 01:35:22 2024 +1100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Thu Dec 5 08:26:13 2024 +0100

    vcl: move variables closer to first usage
    
    Change-Id: Ib09f054eca56d55ba6b91c8e2377f373fc615430
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177808
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx
index 8ce9c47dee09..c46f1647aa39 100644
--- a/vcl/source/bitmap/BitmapEx.cxx
+++ b/vcl/source/bitmap/BitmapEx.cxx
@@ -1316,14 +1316,6 @@ tools::Polygon  BitmapEx::GetContour( bool 
bContourEdgeDetect,
     if (!pAcc || !nWidth || !nHeight)
         return tools::Polygon();
 
-    const tools::Long          nStartX1 = aWorkRect.Left() + 1;
-    const tools::Long          nEndX1 = aWorkRect.Right();
-    const tools::Long          nStartX2 = nEndX1 - 1;
-    const tools::Long          nStartY1 = aWorkRect.Top() + 1;
-    const tools::Long          nEndY1 = aWorkRect.Bottom();
-
-    sal_uInt16              nPolyPos = 0;
-
     // tdf#161833 treat semi-transparent pixels as opaque
     // Limiting the contour wrapping polygon to only opaque pixels
     // causes clipping of any shadows or other semi-transparent
@@ -1338,6 +1330,14 @@ tools::Polygon  BitmapEx::GetContour( bool 
bContourEdgeDetect,
     pPoints1.reset(new Point[ nHeight ]);
     pPoints2.reset(new Point[ nHeight ]);
 
+    const tools::Long nStartX1 = aWorkRect.Left() + 1;
+    const tools::Long nEndX1 = aWorkRect.Right();
+    const tools::Long nStartX2 = nEndX1 - 1;
+    const tools::Long nStartY1 = aWorkRect.Top() + 1;
+    const tools::Long nEndY1 = aWorkRect.Bottom();
+
+    sal_uInt16 nPolyPos = 0;
+
     for (tools::Long nY = nStartY1; nY < nEndY1; nY++)
     {
         tools::Long nX = nStartX1;

Reply via email to