summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-10-01 08:28:25 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-10-01 14:17:17 +0200
commitd7bd370e7ec71ae8e511c21aa1a2bb51b6c208a3 (patch)
tree4e48af93553cb9f2f9e53bc1f4f4ec0156ec4904 /sal
parent6f908b48373b71d45c8119b296b0504fb586f6f8 (diff)
Use std::memmove instead of loop
Change-Id: Ia88ceaaad700bf3c2c8db9bb19146b75146dad3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122861 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/math.cxx8
1 files changed, 1 insertions, 7 deletions
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 7aefe09a5fa6..970f2e298e02 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -627,13 +627,7 @@ void doubleToString(typename T::String ** pResult,
{
if (eFormat == rtl_math_StringFormat_F)
{ // insert '1'
- typename T::Char * px = p++;
- while (pBuf < px)
- {
- *px = *(px-1);
- px--;
- }
-
+ std::memmove(pBuf + 1, pBuf, (p++ - pBuf) * sizeof(*p));
pBuf[0] = '1';
}
else