summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorpixel <pixel>2007-06-23 15:36:02 +0000
committerpixel <pixel>2007-06-23 15:36:02 +0000
commit27d5c3b8f8005e5c8fd867739a6db37b5b3bc08e (patch)
tree631dd5253995bb6f1cbd38a57b35995908af712c /lib
parentdd689636c1e82bb0c773f98cc3595c3002b12837 (diff)
Adding "GetBuffer" accessor.
Diffstat (limited to 'lib')
-rw-r--r--lib/Buffer.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Buffer.cc b/lib/Buffer.cc
index 58a8cd0..575503c 100644
--- a/lib/Buffer.cc
+++ b/lib/Buffer.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: Buffer.cc,v 1.27 2007-05-30 11:57:09 pixel Exp $ */
+/* $Id: Buffer.cc,v 1.28 2007-06-23 15:36:02 pixel Exp $ */
#include <string.h>
#ifdef HAVE_CONFIG_H
@@ -155,6 +155,14 @@ Byte & Buffer::operator[](size_t p) {
}
}
+const Byte * Buffer::GetBuffer() const {
+ if (seekable) {
+ return buffer;
+ } else {
+ return buffer + ptr;
+ }
+}
+
bool Buffer::CanSeek() const {
return seekable;
}