diff options
author | Josh Blum | 2012-11-22 21:32:20 -0800 |
---|---|---|
committer | Josh Blum | 2012-11-22 21:32:20 -0800 |
commit | 784e7dcf40bd3502f228fbc59d023c49110cd09f (patch) | |
tree | c47b4164e9c4cabf424a899fa0ca64e218b509c1 /lib/block.cpp | |
parent | 284252b1b34c93b6eb2b4344eee285415b96887a (diff) | |
download | sandhi-784e7dcf40bd3502f228fbc59d023c49110cd09f.tar.gz sandhi-784e7dcf40bd3502f228fbc59d023c49110cd09f.tar.bz2 sandhi-784e7dcf40bd3502f228fbc59d023c49110cd09f.zip |
extra asserts for sign on consume/produce
Diffstat (limited to 'lib/block.cpp')
-rw-r--r-- | lib/block.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/block.cpp b/lib/block.cpp index d84cc8b..63edfd0 100644 --- a/lib/block.cpp +++ b/lib/block.cpp @@ -90,11 +90,13 @@ void Block::set_output_config(const size_t which_output, const OutputPortConfig void Block::consume(const size_t which_input, const size_t num_items) { + ASSERT(long(num_items) > 0); //sign bit set? you dont want a negative (*this)->block->consume(which_input, num_items); } void Block::produce(const size_t which_output, const size_t num_items) { + ASSERT(long(num_items) > 0); //sign bit set? you dont want a negative (*this)->block->produce(which_output, num_items); } |