From 27d5c3b8f8005e5c8fd867739a6db37b5b3bc08e Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 23 Jun 2007 15:36:02 +0000 Subject: Adding "GetBuffer" accessor. --- lib/Buffer.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib') 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 #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; } -- cgit v1.2.3