summaryrefslogtreecommitdiff
path: root/lib/block.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-12-25 22:08:01 -0600
committerJosh Blum2012-12-25 22:08:01 -0600
commitd8c46b89674262bcb1b93b468e66d836de05e92e (patch)
tree7bade90167fdc69c4f3ab2572a190e33f1c6d25e /lib/block.cpp
parent24fd52e42daafb71bc6638fc18900514046f4473 (diff)
downloadsandhi-d8c46b89674262bcb1b93b468e66d836de05e92e.tar.gz
sandhi-d8c46b89674262bcb1b93b468e66d836de05e92e.tar.bz2
sandhi-d8c46b89674262bcb1b93b468e66d836de05e92e.zip
todo comment for block's pop output buffer
Diffstat (limited to 'lib/block.cpp')
-rw-r--r--lib/block.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/block.cpp b/lib/block.cpp
index c806063..21e2d36 100644
--- a/lib/block.cpp
+++ b/lib/block.cpp
@@ -237,6 +237,11 @@ const SBuffer &Block::get_input_buffer(const size_t which_input) const
SBuffer Block::pop_output_buffer(const size_t which_output)
{
SBuffer buff = (*this)->block->output_queues.front(which_output);
+ //set the offset on the buffer to be popped so that something will be removed
+ //TODO this basically addresses popping on the circ buff,
+ //but perhaps there is a better API for output buffer access.
+ //like using get_output_buffer() + pop(some length)
+ (*this)->block->output_queues.front(which_output).offset = buff.get_actual_length();
(*this)->block->output_queues.pop(which_output);
return buff;
}