summaryrefslogtreecommitdiff
path: root/sal/rtl/source/string.cxx
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2012-07-25 20:03:22 +0200
committerArnaud Versini <arnaud.versini@gmail.com>2012-07-27 20:19:13 +0200
commitd6c284e4b146a44ba69a96836c59a98d077bb934 (patch)
tree13f4f278cd9642eadcbadbc84581573aafb28c58 /sal/rtl/source/string.cxx
parent5dbbe223c8586bd653685d27c664aa8395632e4a (diff)
Use memset and memcpy insteadof rtl_zeroMemory and rtl_copyMemory in sal
Change-Id: I4f9649ca61c988d425b59e41549d1c46bb808f2c
Diffstat (limited to 'sal/rtl/source/string.cxx')
-rw-r--r--sal/rtl/source/string.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sal/rtl/source/string.cxx b/sal/rtl/source/string.cxx
index 42c8ae2a3fdc..78874b668b38 100644
--- a/sal/rtl/source/string.cxx
+++ b/sal/rtl/source/string.cxx
@@ -93,7 +93,7 @@ sal_Int32 SAL_CALL rtl_str_valueOfFloat(sal_Char * pStr, float f)
sal_True);
nLen = pResult->length;
OSL_ASSERT(nLen < RTL_STR_MAX_VALUEOFFLOAT);
- rtl_copyMemory(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Char));
+ memcpy(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Char));
rtl_string_release(pResult);
return nLen;
}
@@ -109,7 +109,7 @@ sal_Int32 SAL_CALL rtl_str_valueOfDouble(sal_Char * pStr, double d)
0, sal_True);
nLen = pResult->length;
OSL_ASSERT(nLen < RTL_STR_MAX_VALUEOFDOUBLE);
- rtl_copyMemory(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Char));
+ memcpy(pStr, pResult->buffer, (nLen + 1) * sizeof(sal_Char));
rtl_string_release(pResult);
return nLen;
}
@@ -362,9 +362,9 @@ void rtl_string_newReplaceFirst(
if (n != 0) {
(*newStr)->length = n;
assert(i >= 0 && i < str->length);
- rtl_copyMemory((*newStr)->buffer, str->buffer, i);
- rtl_copyMemory((*newStr)->buffer + i, to, toLength);
- rtl_copyMemory(
+ memcpy((*newStr)->buffer, str->buffer, i);
+ memcpy((*newStr)->buffer + i, to, toLength);
+ memcpy(
(*newStr)->buffer + i + toLength, str->buffer + i + fromLength,
str->length - i - fromLength);
}