[Libreoffice-commits] .: sal/osl sal/rtl
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 1 14:28:20 PDT 2012
sal/osl/w32/profile.cxx | 3 ++-
sal/rtl/source/byteseq.cxx | 3 +--
sal/rtl/source/cipher.cxx | 1 -
sal/rtl/source/digest.cxx | 1 -
sal/rtl/source/strbuf.cxx | 5 ++---
sal/rtl/source/string.cxx | 1 -
sal/rtl/source/ustrbuf.cxx | 7 +++----
sal/rtl/source/ustring.cxx | 1 -
8 files changed, 8 insertions(+), 14 deletions(-)
New commits:
commit d9f61e785e7469165fefc1fc8e2459ffb3335883
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date: Mon Oct 1 20:52:45 2012 +0200
Remove internal usage of rtl/memory.h in sal module
Change-Id: I43650c6f4a66058e73945851a6990555e42b8ac2
Reviewed-on: https://gerrit.libreoffice.org/744
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sal/osl/w32/profile.cxx b/sal/osl/w32/profile.cxx
index 1040a89..24b02ef 100644
--- a/sal/osl/w32/profile.cxx
+++ b/sal/osl/w32/profile.cxx
@@ -31,6 +31,7 @@
#include "file_url.h"
#include "path_helper.hxx"
+#include <string.h>
#include <osl/diagnose.h>
#include <osl/profile.h>
#include <osl/process.h>
@@ -40,7 +41,7 @@
#include <sal/macros.h>
#include <algorithm>
using std::min;
-static inline void copy_ustr_n( void *dest, const void *source, size_t length ) { rtl_copyMemory(dest, source, length*sizeof(sal_Unicode)); }
+static inline void copy_ustr_n( void *dest, const void *source, size_t length ) { memcpy(dest, source, length*sizeof(sal_Unicode)); }
#define LINES_INI 32
#define LINES_ADD 10
diff --git a/sal/rtl/source/byteseq.cxx b/sal/rtl/source/byteseq.cxx
index ee74581..8f9e400 100644
--- a/sal/rtl/source/byteseq.cxx
+++ b/sal/rtl/source/byteseq.cxx
@@ -33,7 +33,6 @@
#include <rtl/byteseq.h>
#include <rtl/alloc.h>
-#include <rtl/memory.h>
/* static data to be referenced by all empty strings
* the refCount is predefined to 1 and must never become 0 !
@@ -245,7 +244,7 @@ sal_Bool SAL_CALL rtl_byte_sequence_equals( sal_Sequence *pSequence1 , sal_Seque
return sal_False;
}
return (sal_Bool)
- (rtl_compareMemory(
+ (memcmp(
pSequence1->elements, pSequence2->elements, pSequence1->nElements )
== 0);
}
diff --git a/sal/rtl/source/cipher.cxx b/sal/rtl/source/cipher.cxx
index b5ff962..42dfbd5 100644
--- a/sal/rtl/source/cipher.cxx
+++ b/sal/rtl/source/cipher.cxx
@@ -30,7 +30,6 @@
#include <sal/types.h>
#include <rtl/alloc.h>
-#include <rtl/memory.h>
#include <rtl/cipher.h>
/*========================================================================
diff --git a/sal/rtl/source/digest.cxx b/sal/rtl/source/digest.cxx
index 58a179b..42b6f75 100644
--- a/sal/rtl/source/digest.cxx
+++ b/sal/rtl/source/digest.cxx
@@ -32,7 +32,6 @@
#include <sal/macros.h>
#include <osl/endian.h>
#include <rtl/alloc.h>
-#include <rtl/memory.h>
#include <rtl/digest.h>
/*========================================================================
diff --git a/sal/rtl/source/strbuf.cxx b/sal/rtl/source/strbuf.cxx
index 953e630..9dd4699 100644
--- a/sal/rtl/source/strbuf.cxx
+++ b/sal/rtl/source/strbuf.cxx
@@ -30,7 +30,6 @@
#include <osl/interlck.h>
#include <rtl/strbuf.hxx>
-#include <rtl/memory.h>
/*************************************************************************
* rtl_stringbuffer_newFromStr_WithLength
@@ -125,7 +124,7 @@ void SAL_CALL rtl_stringbuffer_insert( rtl_String ** This,
/* optimized for 1 character */
pBuf[offset + len] = pBuf[offset];
else if( n > 1 )
- rtl_moveMemory( pBuf + offset + len, pBuf + offset, n * sizeof(sal_Char) );
+ memmove( pBuf + offset + len, pBuf + offset, n * sizeof(sal_Char) );
/* insert the new characters */
n = len;
@@ -162,7 +161,7 @@ void SAL_CALL rtl_stringbuffer_remove( rtl_String ** This,
if (nTailLen)
{
/* move the tail */
- rtl_moveMemory(pBuf + start, pBuf + start + len, nTailLen * sizeof(sal_Char));
+ memmove(pBuf + start, pBuf + start + len, nTailLen * sizeof(sal_Char));
}
(*This)->length-=len;
diff --git a/sal/rtl/source/string.cxx b/sal/rtl/source/string.cxx
index 78874b6..7926fa8 100644
--- a/sal/rtl/source/string.cxx
+++ b/sal/rtl/source/string.cxx
@@ -35,7 +35,6 @@
#include <cassert>
#include <cstdlib>
-#include <rtl/memory.h>
#include <osl/interlck.h>
#include <rtl/alloc.h>
#include <osl/diagnose.h>
diff --git a/sal/rtl/source/ustrbuf.cxx b/sal/rtl/source/ustrbuf.cxx
index 23b6cb8..1bbdfe3 100644
--- a/sal/rtl/source/ustrbuf.cxx
+++ b/sal/rtl/source/ustrbuf.cxx
@@ -31,7 +31,6 @@
#include <osl/interlck.h>
#include <rtl/ustrbuf.hxx>
-#include <rtl/memory.h>
#include <strimp.hxx>
void SAL_CALL rtl_uStringbuffer_newFromStr_WithLength( rtl_uString ** newStr,
@@ -142,7 +141,7 @@ void SAL_CALL rtl_uStringbuffer_insert( rtl_uString ** This,
/* optimized for 1 character */
pBuf[offset + len] = pBuf[offset];
else if( n > 1 )
- rtl_moveMemory( pBuf + offset + len, pBuf + offset, n * sizeof(sal_Unicode) );
+ memmove( pBuf + offset + len, pBuf + offset, n * sizeof(sal_Unicode) );
/* insert the new characters */
if( len == 1 )
@@ -197,7 +196,7 @@ void SAL_CALL rtl_uStringbuffer_insert_ascii( /*inout*/rtl_uString ** This,
/* optimized for 1 character */
pBuf[offset + len] = pBuf[offset];
else if( n > 1 )
- rtl_moveMemory( pBuf + offset + len, pBuf + offset, n * sizeof(sal_Unicode) );
+ memmove( pBuf + offset + len, pBuf + offset, n * sizeof(sal_Unicode) );
/* insert the new characters */
for( n = 0; n < len; n++ )
@@ -236,7 +235,7 @@ void SAL_CALL rtl_uStringbuffer_remove( rtl_uString ** This,
if (nTailLen)
{
/* move the tail */
- rtl_moveMemory(pBuf + start, pBuf + start + len, nTailLen * sizeof(sal_Unicode));
+ memmove(pBuf + start, pBuf + start + len, nTailLen * sizeof(sal_Unicode));
}
(*This)->length-=len;
diff --git a/sal/rtl/source/ustring.cxx b/sal/rtl/source/ustring.cxx
index ec0827f..b219949 100644
--- a/sal/rtl/source/ustring.cxx
+++ b/sal/rtl/source/ustring.cxx
@@ -35,7 +35,6 @@
#include <cassert>
#include <cstdlib>
-#include <rtl/memory.h>
#include <osl/diagnose.h>
#include <osl/interlck.h>
#include <rtl/alloc.h>
More information about the Libreoffice-commits
mailing list