diff options
Diffstat (limited to 'lib/bufferarray.cc')
-rw-r--r-- | lib/bufferarray.cc | 22 |
1 files changed, 5 insertions, 17 deletions
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) { |