diff options
author | pixel <pixel> | 2007-06-23 15:36:02 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-06-23 15:36:02 +0000 |
commit | 27d5c3b8f8005e5c8fd867739a6db37b5b3bc08e (patch) | |
tree | 631dd5253995bb6f1cbd38a57b35995908af712c /lib | |
parent | dd689636c1e82bb0c773f98cc3595c3002b12837 (diff) |
Adding "GetBuffer" accessor.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Buffer.cc | 10 |
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; } |