Replace usage of rtl/memory.h in svl with equivalent from string.h

Change-Id: I44e6b162a190939bfa17e04f551309d6249c48df
This commit is contained in:
Arnaud Versini
2012-09-02 14:55:54 +02:00
parent cbb8612465
commit a3ffd9ed6e
4 changed files with 12 additions and 10 deletions

View File

@@ -33,6 +33,7 @@
#include <unotools/syslocale.hxx>
#include <algorithm>
#include <comphelper/servicehelper.hxx>
#include <string.h>
#ifdef DBG_UTIL
class DbgStyleSheetReferences
@@ -942,7 +943,7 @@ SfxUnoStyleSheet* SfxUnoStyleSheet::getUnoStyleSheet( const ::com::sun::star::un
::sal_Int64 SAL_CALL SfxUnoStyleSheet::getSomething( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& rId ) throw (::com::sun::star::uno::RuntimeException)
{
if( rId.getLength() == 16 && 0 == rtl_compareMemory( getIdentifier().getConstArray(), rId.getConstArray(), 16 ) )
if( rId.getLength() == 16 && 0 == memcmp( getIdentifier().getConstArray(), rId.getConstArray(), 16 ) )
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this));
}

View File

@@ -20,10 +20,10 @@
#include <svl/inethist.hxx>
#include <algorithm>
#include <string.h>
#include "rtl/instance.hxx"
#include "rtl/crc.h"
#include "rtl/memory.h"
#include <tools/solar.h>
#include <tools/debug.hxx>
#include <tools/string.hxx>
@@ -273,7 +273,7 @@ void INetURLHistory_Impl::move (sal_uInt16 nSI, sal_uInt16 nDI)
if (nSI < nDI)
{
// shift left.
rtl_moveMemory (
memmove (
&m_pHash[nSI ],
&m_pHash[nSI + 1],
(nDI - nSI) * sizeof(hash_entry));
@@ -281,7 +281,7 @@ void INetURLHistory_Impl::move (sal_uInt16 nSI, sal_uInt16 nDI)
if (nSI > nDI)
{
// shift right.
rtl_moveMemory (
memmove (
&m_pHash[nDI + 1],
&m_pHash[nDI ],
(nSI - nDI) * sizeof(hash_entry));

View File

@@ -23,8 +23,9 @@
#include <algorithm>
#include <limits>
#include <set>
#include <string.h>
#include <rtl/alloc.h>
#include <rtl/memory.h>
#include <svl/instrm.hxx>
#include <svl/outstrm.hxx>
#include <svl/strmadpt.hxx>
@@ -511,7 +512,7 @@ sal_uLong SvInputStream::GetData(void * pData, sal_uLong nSize)
SetError(ERRCODE_IO_CANTREAD);
return nRead;
}
rtl_copyMemory(static_cast< sal_Int8 * >(pData) + nRead,
memcpy(static_cast< sal_Int8 * >(pData) + nRead,
aBuffer.getConstArray(), sal_uInt32(nCount));
nRead += nCount;
if (nCount < nRemain)
@@ -879,7 +880,7 @@ sal_uInt32 SvDataPipe_Impl::read()
sal_uInt32 nBlock = std::min(sal_uInt32(m_pReadPage->m_pEnd
- m_pReadPage->m_pRead),
nRemain);
rtl_copyMemory(m_pReadBuffer, m_pReadPage->m_pRead, nBlock);
memcpy(m_pReadBuffer, m_pReadPage->m_pRead, nBlock);
m_pReadPage->m_pRead += nBlock;
m_pReadBuffer += nBlock;
m_nReadBufferSize -= nBlock;
@@ -942,7 +943,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize)
if (nBlock > 0)
{
rtl_copyMemory(m_pReadBuffer + m_nReadBufferFilled, pBuffer,
memcpy(m_pReadBuffer + m_nReadBufferFilled, pBuffer,
nBlock);
m_nReadBufferFilled += nBlock;
nRemain -= nBlock;
@@ -963,7 +964,7 @@ sal_uInt32 SvDataPipe_Impl::write(sal_Int8 const * pBuffer, sal_uInt32 nSize)
= std::min(sal_uInt32(m_pWritePage->m_aBuffer + m_nPageSize
- m_pWritePage->m_pEnd),
nRemain);
rtl_copyMemory(m_pWritePage->m_pEnd, pBuffer, nBlock);
memcpy(m_pWritePage->m_pEnd, pBuffer, nBlock);
m_pWritePage->m_pEnd += nBlock;
pBuffer += nBlock;
nRemain -= nBlock;

View File

@@ -106,7 +106,7 @@ sal_Int64 SAL_CALL SvNumberFormatsSupplierObj::getSomething(
const uno::Sequence<sal_Int8 >& rId ) throw(uno::RuntimeException)
{
if ( rId.getLength() == 16 &&
0 == rtl_compareMemory( getUnoTunnelId().getConstArray(),
0 == memcmp( getUnoTunnelId().getConstArray(),
rId.getConstArray(), 16 ) )
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this));