summaryrefslogtreecommitdiff
path: root/sw/source/core/bastyp/bparr.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-03-27 14:45:43 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-03-27 14:45:43 +0000
commit70de0c38fd177b3c95837118c5fb35e380c87e90 (patch)
treebb54ac0c5769dcfc89fdaeb151ffac6eb18154de /sw/source/core/bastyp/bparr.cxx
parent5aff37cd51879a41365f2ceb0e927bdf57ffddb3 (diff)
MWS_SRX644: migrate branch mws_srx644 -> HEAD
Diffstat (limited to 'sw/source/core/bastyp/bparr.cxx')
-rw-r--r--sw/source/core/bastyp/bparr.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx
index 69ad8c6b0894..afd1c7f135a7 100644
--- a/sw/source/core/bastyp/bparr.cxx
+++ b/sw/source/core/bastyp/bparr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bparr.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mib $ $Date: 2001-11-28 13:47:32 $
+ * last change: $Author: hr $ $Date: 2003-03-27 15:39:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -117,11 +117,11 @@ BigPtrArray::~BigPtrArray()
BlockInfo** pp = ppInf;
for( USHORT n = 0; n < nBlock; ++n, ++pp )
{
- __DELETE( (*pp)->nElem ) (*pp)->pData;
- delete *pp;
+ delete[] (*pp)->pData;
+ delete *pp;
}
}
- __DELETE( nMaxBlock ) ppInf;
+ delete[] ppInf;
}
// Einfachst-Implementation, evtl. spaeter mal komplexer
@@ -278,7 +278,7 @@ BlockInfo* BigPtrArray::InsBlock( USHORT pos )
// dann sollte wir mal das Array erweitern
BlockInfo** ppNew = new BlockInfo* [ nMaxBlock + nBlockGrowSize ];
memcpy( ppNew, ppInf, nMaxBlock * sizeof( BlockInfo* ));
- __DELETE( nMaxBlock ) ppInf;
+ delete[] ppInf;
nMaxBlock += nBlockGrowSize;
ppInf = ppNew;
}
@@ -309,7 +309,7 @@ void BigPtrArray::BlockDel( USHORT nDel )
nDel = (( nBlock / nBlockGrowSize ) + 1 ) * nBlockGrowSize;
BlockInfo** ppNew = new BlockInfo* [ nDel ];
memcpy( ppNew, ppInf, nBlock * sizeof( BlockInfo* ));
- __DELETE( nMaxBlock ) ppInf;
+ delete[] ppInf;
ppInf = ppNew;
nMaxBlock = nDel;
}
@@ -449,7 +449,7 @@ void BigPtrArray::Remove( ULONG pos, ULONG n )
if( !p->nElem )
{
// eventuell Block ganz entfernen
- delete p->pData;
+ delete[] p->pData;
nBlkdel++;
if( USHRT_MAX == nBlk1del )
nBlk1del = cur;
@@ -588,8 +588,8 @@ USHORT BigPtrArray::Compress( short nMax )
if( !p->nElem )
{
// dann kann der entfernt werden
- delete p->pData;
- delete p, p = 0;
+ delete[] p->pData;
+ delete p, p = 0;
++nBlkdel;
}
else