From 7fb94ed43a814788cda019c1e77314abc1626339 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Mon, 31 Jul 2000 03:12:38 +0000 Subject: Applied mjg-0.6 patch. Started adding kdoc compliant documentation comments. Added PsiTime --- lib/bufferarray.cc | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'lib/bufferarray.cc') diff --git a/lib/bufferarray.cc b/lib/bufferarray.cc index 4e922ed..77a08c6 100644 --- a/lib/bufferarray.cc +++ b/lib/bufferarray.cc @@ -45,11 +45,11 @@ bufferArray::bufferArray(const bufferArray & a) bufferArray::~bufferArray() { - delete[]buff; + delete []buff; } bufferStore bufferArray:: -popBuffer() +pop() { bufferStore ret; if (len > 0) { @@ -63,7 +63,7 @@ popBuffer() } void bufferArray:: -pushBuffer(const bufferStore & b) +append(const bufferStore & b) { if (len == lenAllocd) { lenAllocd += ALLOC_MIN; @@ -71,7 +71,7 @@ pushBuffer(const bufferStore & b) for (long i = 0; i < len; i++) { nb[i] = buff[i]; } - delete[]buff; + delete []buff; buff = nb; } buff[len++] = b; @@ -84,7 +84,7 @@ push(const bufferStore & b) lenAllocd += ALLOC_MIN; bufferStore *nb = new bufferStore[lenAllocd]; for (long i = len; i > 0; i--) { - nb[i] = buff[i-1]; + nb[i] = buff[i - 1]; } nb[0] = b; delete[]buff; @@ -92,18 +92,6 @@ push(const bufferStore & b) len++; } -bufferStore bufferArray:: -pop() -{ - return popBuffer(); -} - -void bufferArray:: -append(const bufferStore & b) -{ - pushBuffer(b); -} - long bufferArray:: length(void) { -- cgit v1.2.3