summaryrefslogtreecommitdiff
path: root/sal/rtl/strtmpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/rtl/strtmpl.cxx')
-rw-r--r--sal/rtl/strtmpl.cxx13
1 files changed, 2 insertions, 11 deletions
diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index 421a615b7574..af3a28cbfec2 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -744,18 +744,9 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( trim_WithLength )( IMPL_RTL_STRCODE* pStr,
if ( nPreSpaces )
{
- IMPL_RTL_STRCODE* pNewStr = pStr+nPreSpaces;
-
nLen -= nPreSpaces;
- nIndex = nLen;
-
- while ( nIndex )
- {
- *pStr = *pNewStr;
- pStr++;
- pNewStr++;
- nIndex--;
- }
+ memmove(pStr, pStr + nPreSpaces, nLen * sizeof(IMPL_RTL_STRCODE));
+ pStr += nLen;
*pStr = 0;
}