io/source/TextInputStream/TextInputStream.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 8391bd0ea4fb3a7f4cad4149ec63c980eab5808d Author: Alin Andrei Abahnencei <alinandrei2...@gmail.com> AuthorDate: Fri Dec 20 19:10:10 2024 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Dec 20 22:42:19 2024 +0100 tdf#163691 Use std::copy() instead of memmove() Signed-off-by: Alin Andrei Abahnencei <alinandrei2...@gmail.com> Change-Id: I429aa29f97d3f7cc904cac5664b988548fe7f46c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178954 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> 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;