[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r9790: add method to get the amount o
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r9790: add method to get the amount of allocated bytes. |
Date: |
Wed, 26 Nov 2008 15:58:25 -0700 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9790
committer: address@hidden
branch nick: rtmp
timestamp: Wed 2008-11-26 15:58:25 -0700
message:
add method to get the amount of allocated bytes.
modified:
libamf/buffer.h
=== modified file 'libamf/buffer.h'
--- a/libamf/buffer.h 2008-11-26 17:11:17 +0000
+++ b/libamf/buffer.h 2008-11-26 22:58:25 +0000
@@ -340,6 +340,13 @@
/// @return The amoount of unused bytes in the Buffer.
size_t spaceLeft() { return (_nbytes - (_seekptr - _data.get())); };
+ /// \brief How much room has been allocated before the seek pointer.
+ /// This is primarily used to see if the buffer is fully
+ /// populated with data before appending more.
+ ///
+ /// @return The amoount of unused bytes in the Buffer.
+ size_t allocated() { return (_seekptr - _data.get()); };
+
/// \brief Dump the internal data of this class in a human readable form.
/// This should only be used for debugging purposes.
void dump() const { dump(std::cerr); }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r9790: add method to get the amount of allocated bytes.,
rob <=