aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bufferarray.cc
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2000-07-31 03:12:38 +0000
committerFritz Elfert <felfert@to.com>2000-07-31 03:12:38 +0000
commit7fb94ed43a814788cda019c1e77314abc1626339 (patch)
tree50b86a44e2809e6fbcdcd080f2a2dc4dbc37042e /lib/bufferarray.cc
parentfbb17061d3c622f0786a5d9ad41e8ccd95ef706c (diff)
downloadplptools-7fb94ed43a814788cda019c1e77314abc1626339.tar.gz
plptools-7fb94ed43a814788cda019c1e77314abc1626339.tar.bz2
plptools-7fb94ed43a814788cda019c1e77314abc1626339.zip
Applied mjg-0.6 patch.
Started adding kdoc compliant documentation comments. Added PsiTime
Diffstat (limited to 'lib/bufferarray.cc')
-rw-r--r--lib/bufferarray.cc22
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)
{