diff options
author | Fritz Elfert <felfert@to.com> | 2000-08-07 23:42:40 +0000 |
---|---|---|
committer | Fritz Elfert <felfert@to.com> | 2000-08-07 23:42:40 +0000 |
commit | 68d5fd192fee358ad195c32b47333f8f87ae13f2 (patch) | |
tree | 59f865b9679830a006c5c35fb13dcf8f81b85099 /lib/bufferarray.cc | |
parent | 50dee0db8d5117ed3b9691140ceb02d8aac292d1 (diff) | |
download | plptools-68d5fd192fee358ad195c32b47333f8f87ae13f2.tar.gz plptools-68d5fd192fee358ad195c32b47333f8f87ae13f2.tar.bz2 plptools-68d5fd192fee358ad195c32b47333f8f87ae13f2.zip |
General cleanup:
- Corrected some operators of bufferArray
- Added more constructors to PsiTime
- Added one more fallback for Timezone calculation in PsiTime
- Use PsiTime in rfsv
- Moved some common methods from rfsv16/32 to rfsv
- Added more kdoc comments.
- Made interface more robust (added const whereever possible,
changed pointer arguments to references)
Diffstat (limited to 'lib/bufferarray.cc')
-rw-r--r-- | lib/bufferarray.cc | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lib/bufferarray.cc b/lib/bufferarray.cc index 77a08c6..953ec8f 100644 --- a/lib/bufferarray.cc +++ b/lib/bufferarray.cc @@ -125,16 +125,25 @@ operator [](const unsigned long index) return buff[index]; } -bufferArray &bufferArray:: -operator +(const bufferStore &a) +bufferArray bufferArray:: +operator +(const bufferStore &s) { - append(a); - return *this; + bufferArray res = *this; + res += s; + return res; } -bufferArray &bufferArray:: +bufferArray bufferArray:: operator +(const bufferArray &a) { + bufferArray res = *this; + res += a; + return res; +} + +bufferArray &bufferArray:: +operator +=(const bufferArray &a) +{ lenAllocd += a.lenAllocd; bufferStore *nb = new bufferStore[lenAllocd]; for (int i = 0; i < len; i++) @@ -148,8 +157,8 @@ operator +(const bufferArray &a) } bufferArray &bufferArray:: -operator +=(const bufferStore &a) +operator +=(const bufferStore &s) { - append(a); + append(s); return *this; } |