From 8391bd0ea4fb3a7f4cad4149ec63c980eab5808d Mon Sep 17 00:00:00 2001 From: Alin Andrei Abahnencei Date: Fri, 20 Dec 2024 19:10:10 +0200 Subject: tdf#163691 Use std::copy() instead of memmove() Signed-off-by: Alin Andrei Abahnencei Change-Id: I429aa29f97d3f7cc904cac5664b988548fe7f46c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178954 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- io/source/TextInputStream/TextInputStream.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx index 94710fe6c8d5..287783ca3fad 100644 --- a/io/source/TextInputStream/TextInputStream.cxx +++ b/io/source/TextInputStream/TextInputStream.cxx @@ -228,8 +228,7 @@ OUString OTextInputStream::implReadString( const Sequence< sal_Unicode >& Delimi aRetStr = OUString( mvBuffer.data(), nCopyLen ); // Copy rest of buffer - memmove( mvBuffer.data(), mvBuffer.data() + nBufferReadPos, - (mnCharsInBuffer - nBufferReadPos) * sizeof( sal_Unicode ) ); + std::copy(mvBuffer.data() + nBufferReadPos, mvBuffer.data() + mnCharsInBuffer, mvBuffer.data()); mnCharsInBuffer -= nBufferReadPos; return aRetStr; -- cgit