vcl/source/outdev/text.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit faad724af54808998e47edad6bbb80aee3e3f4d1
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Tue Oct 29 21:41:09 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Oct 30 10:09:33 2024 +0100

    no need to use std::unique_ptr in GetPartialTextArray
    
    Change-Id: I3c60f69d1693721a620faef4e1cda2f479c1bfda
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175801
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index f327f56c9024..4113121b6820 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -849,12 +849,13 @@ OutputDevice::GetPartialTextArray(const OUString& rStr, 
KernArray* pKernArray, s
         return {};
     }
 
-    std::unique_ptr<std::vector<double>> xDXPixelArray;
+    std::vector<double> aDXPixelArray;
+    std::vector<double>* pDXPixelArray = nullptr;
     if(pDXAry)
     {
-        xDXPixelArray.reset(new std::vector<double>(nPartLen));
+        aDXPixelArray.resize(nPartLen);
+        pDXPixelArray = &aDXPixelArray;
     }
-    std::vector<double>* pDXPixelArray = xDXPixelArray.get();
 
     double nWidth = 0.0;
 

Reply via email to