diff options
author | Josh Blum | 2012-11-24 00:32:38 -0800 |
---|---|---|
committer | Josh Blum | 2012-11-24 00:32:38 -0800 |
commit | 4f7dbcddccd70f3592ede97d739791bcfcfc8b52 (patch) | |
tree | 82a938703d1a1e6e54c0e20e69d1a454488eca0c /lib/block.cpp | |
parent | ccfc4200547605b71a5b65ea9ab86fa45a34dc7b (diff) | |
download | sandhi-4f7dbcddccd70f3592ede97d739791bcfcfc8b52.tar.gz sandhi-4f7dbcddccd70f3592ede97d739791bcfcfc8b52.tar.bz2 sandhi-4f7dbcddccd70f3592ede97d739791bcfcfc8b52.zip |
change output buffer api call to pop
Once the output buffer is tampered with,
its not acceptable to be kept in the queue anymore
Diffstat (limited to 'lib/block.cpp')
-rw-r--r-- | lib/block.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/block.cpp b/lib/block.cpp index 0521490..469a233 100644 --- a/lib/block.cpp +++ b/lib/block.cpp @@ -203,9 +203,11 @@ const SBuffer &Block::get_input_buffer(const size_t which_input) const return (*this)->block->input_queues.front(which_input); } -const SBuffer &Block::get_output_buffer(const size_t which_output) const +SBuffer Block::pop_output_buffer(const size_t which_output) { - return (*this)->block->output_queues.front(which_output); + SBuffer buff = (*this)->block->output_queues.front(which_output); + (*this)->block->output_queues.pop(which_output); + return buff; } void Block::post_output_buffer(const size_t which_output, const SBuffer &buffer) |