svx/source/sdr/contact/viewcontactofsdrpathobj.cxx |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit f5c4635c8bbd27b06a81bfa8d75f986994065310
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Oct 19 11:50:57 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Oct 19 15:20:57 2023 +0200

    tdf#155410 small optimisation
    
    Change-Id: I736b5959d52c57ee5e05e349d0c421896229e554
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158172
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx 
b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index 42b699374e1c..d95d5fbeb75e 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -90,15 +90,13 @@ namespace sdr::contact
             if(bIsLine)
             {
                 // special handling for single line mode (2 points)
-                const basegfx::B2DPolygon 
aSubPolygon(aUnitPolyPolygon.getB2DPolygon(0));
-                const basegfx::B2DPoint aStart(aSubPolygon.getB2DPoint(0));
-                const basegfx::B2DPoint aEnd(aSubPolygon.getB2DPoint(1));
+                const basegfx::B2DPolygon & 
rSubPolygon(aUnitPolyPolygon.getB2DPolygon(0));
+                const basegfx::B2DPoint aStart(rSubPolygon.getB2DPoint(0));
+                const basegfx::B2DPoint aEnd(rSubPolygon.getB2DPoint(1));
                 const basegfx::B2DVector aLine(aEnd - aStart);
 
                 // #i102548# create new unit polygon for line (horizontal)
-                basegfx::B2DPolygon aNewPolygon;
-                aNewPolygon.append(basegfx::B2DPoint(0.0, 0.0));
-                aNewPolygon.append(basegfx::B2DPoint(1.0, 0.0));
+                static const basegfx::B2DPolygon 
aNewPolygon{basegfx::B2DPoint(0.0, 0.0), basegfx::B2DPoint(1.0, 0.0)};
                 aUnitPolyPolygon.setB2DPolygon(0, aNewPolygon);
 
                 // #i102548# fill objectMatrix with rotation and offset (no 
shear for lines)

Reply via email to