summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Andrei Abahnencei <alinandrei2004@gmail.com>2024-12-20 19:10:10 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2024-12-20 22:42:19 +0100
commit8391bd0ea4fb3a7f4cad4149ec63c980eab5808d (patch)
treec0b31b7efb642d8ff8ea9d0cd1cf561ff41fd163
parent0c900b165d4d24c33942e8b59f85243706b93890 (diff)
tdf#163691 Use std::copy() instead of memmove()
Signed-off-by: Alin Andrei Abahnencei <alinandrei2004@gmail.com> Change-Id: I429aa29f97d3f7cc904cac5664b988548fe7f46c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178954 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--io/source/TextInputStream/TextInputStream.cxx3
1 files changed, 1 insertions, 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;