summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-29 22:41:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-07-29 23:09:38 +0100
commit321216ea83533db83a603f6c8ea2eec0abccf288 (patch)
treedcc7e8b0b05cf94963e5e025e8c1433693c85a87 /svl
parentdc89ef154f076e7578f82d67cc4c4ef7f4101fe0 (diff)
Remove strange DummyType
I can see no purpose to DummyType Change-Id: I25d9d3b321df28f8c2bcb4bf915eb176a14fdaf8
Diffstat (limited to 'svl')
-rw-r--r--svl/inc/svl/svarray.hxx18
-rw-r--r--svl/source/memtools/svarray.cxx10
2 files changed, 11 insertions, 17 deletions
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index 1f405f8f12fa..556f10460787 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -49,21 +49,11 @@
#include "svl/svldllapi.h"
-#include <string.h> // memmove()
#include <limits.h> // USHRT_MAX
#include <osl/diagnose.h>
#include <rtl/alloc.h>
#include <tools/solar.h>
-class String;
-
-class DummyType;
-inline void* operator new( size_t, DummyType* pPtr )
-{
- return pPtr;
-}
-inline void operator delete( void*, DummyType* ) {}
-
typedef void* VoidPtr;
class SVL_DLLPUBLIC SvPtrarr
{
@@ -81,13 +71,7 @@ public:
VoidPtr& operator[](sal_uInt16 nP) const { return *(pData+nP); }
void Insert( const SvPtrarr * pI, sal_uInt16 nP,
- sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX )
- {
- if( USHRT_MAX == nE )
- nE = pI->nA;
- if( nS < nE )
- Insert( (const VoidPtr*)pI->pData+nS, (sal_uInt16)nE-nS, nP );
- }
+ sal_uInt16 nS = 0, sal_uInt16 nE = USHRT_MAX );
VoidPtr& GetObject(sal_uInt16 nP) const { return (*this)[nP]; }
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index c6fa6dd0e62b..6f1f1cb0cb25 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -18,6 +18,7 @@
*/
#include <svl/svarray.hxx>
+#include <string.h> // memmove()
SvPtrarr::SvPtrarr( sal_uInt16 nInit )
: pData (0),
@@ -65,6 +66,15 @@ void SvPtrarr::Insert( const VoidPtr* pE, sal_uInt16 nL, sal_uInt16 nP )
nA = nA + nL; nFree = nFree - nL;
}
+void SvPtrarr::Insert( const SvPtrarr * pI, sal_uInt16 nP,
+ sal_uInt16 nS, sal_uInt16 nE )
+{
+ if( USHRT_MAX == nE )
+ nE = pI->nA;
+ if( nS < nE )
+ Insert( (const VoidPtr*)pI->pData+nS, (sal_uInt16)nE-nS, nP );
+}
+
void SvPtrarr::Remove( sal_uInt16 nP, sal_uInt16 nL )
{
if( !nL )