From 70de0c38fd177b3c95837118c5fb35e380c87e90 Mon Sep 17 00:00:00 2001 From: Jens-Heiner Rechtien Date: Thu, 27 Mar 2003 14:45:43 +0000 Subject: MWS_SRX644: migrate branch mws_srx644 -> HEAD --- sw/source/core/bastyp/bparr.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'sw/source/core/bastyp/bparr.cxx') 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 -- cgit v1.2.3