summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJosh Blum2012-11-25 21:44:30 -0800
committerJosh Blum2012-11-25 21:44:30 -0800
commit34d0a5fe7f4884f4dcc2fab60931517d2a01b311 (patch)
tree9ce7b01affd9f030bbb15cc8e5ae7c52d3618196 /lib
parent4e93db82b0501190eab04115d84c51ed3b8b1b5c (diff)
downloadsandhi-34d0a5fe7f4884f4dcc2fab60931517d2a01b311.tar.gz
sandhi-34d0a5fe7f4884f4dcc2fab60931517d2a01b311.tar.bz2
sandhi-34d0a5fe7f4884f4dcc2fab60931517d2a01b311.zip
tweaks for io sig extend logic
Diffstat (limited to 'lib')
-rw-r--r--lib/topology_handler.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/topology_handler.cpp b/lib/topology_handler.cpp
index df8d445..f434377 100644
--- a/lib/topology_handler.cpp
+++ b/lib/topology_handler.cpp
@@ -7,11 +7,14 @@ using namespace gras;
template <typename V, typename Sig>
void fill_item_sizes_from_sig(V &v, const Sig &s, const size_t size)
{
- v.resize(size);
- for (size_t i = 0; i < v.size(); i++)
- {
- v[i] = s->sizeof_stream_item(i);
- }
+ //default item size of 1 in case we cant set
+ v.resize(size, 1);
+
+ //empty signature? maybe it was a message port
+ if (s.empty()) return;
+
+ //fill v by copying signature (with back extend mode)
+ for (size_t i = 0; i < v.size(); i++) v[i] = s[i];
}
template <typename V, typename T>