aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bufferstore.h
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-01-31 02:07:07 +0000
committerFritz Elfert <felfert@to.com>2001-01-31 02:07:07 +0000
commitda3bbc53c62c7e84c4f0f4f54ebbebe98ba9e13a (patch)
tree4905a84c5a72ad25f4edcd16a0ae443bb7fa9262 /lib/bufferstore.h
parentdd2fe02677f9c15e1e13fdf7d45f91896e174ec1 (diff)
downloadplptools-da3bbc53c62c7e84c4f0f4f54ebbebe98ba9e13a.tar.gz
plptools-da3bbc53c62c7e84c4f0f4f54ebbebe98ba9e13a.tar.bz2
plptools-da3bbc53c62c7e84c4f0f4f54ebbebe98ba9e13a.zip
Added a truncate() method.
Diffstat (limited to 'lib/bufferstore.h')
-rw-r--r--lib/bufferstore.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bufferstore.h b/lib/bufferstore.h
index 81704e1..494d0af 100644
--- a/lib/bufferstore.h
+++ b/lib/bufferstore.h
@@ -190,6 +190,14 @@ public:
*/
void addBuff(const bufferStore &b, long maxLen = -1);
+ /**
+ * Truncates the buffer.
+ * If the buffer is smaller, does nothing.
+ *
+ * @param newLen The new length of the buffer.
+ */
+ void truncate(long newLen);
+
private:
void checkAllocd(long newLen);