sal/rtl/math.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 7a887b1710a39535edc70eaf73f874c7810ce63c Author: Mike Kaganski <[email protected]> AuthorDate: Fri Oct 3 08:44:33 2025 +0200 Commit: Mike Kaganski <[email protected]> CommitDate: Fri Oct 3 10:13:47 2025 +0200 Use make_unique_for_overwrite for buffer created for overwrite It's also interesting, if this function is supported by our baseline compilers. Change-Id: Ia1bd6ce1328ccdecfe7b880064e538ef586b8c45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191809 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx index dfcc924745ec..66227a203f57 100644 --- a/sal/rtl/math.cxx +++ b/sal/rtl/math.cxx @@ -235,8 +235,8 @@ double stringToDouble(CharT const* pBegin, CharT const* pEnd, CharT cDecSeparato { if (bufsize > 256) { - stringInHeap = std::make_unique<char[]>(bufsize); - mapInHeap = std::make_unique<const CharT* []>(bufsize); + stringInHeap = std::make_unique_for_overwrite<char[]>(bufsize); + mapInHeap = std::make_unique_for_overwrite<const CharT* []>(bufsize); string = stringInHeap.get(); map = mapInHeap.get(); }
