allow putFrom to implicitly resize

This commit is contained in:
Michael Davidsaver
2013-05-01 11:27:37 -04:00
parent 00ac5bf64f
commit ae847aea2b

View File

@@ -1099,6 +1099,8 @@ public:
}
virtual void putFrom(ScalarType dtype, const void*ptr, size_t count, size_t offset)
{
if(getLength()<offset+count)
setLength(offset+count);
castUnsafeV(count, typeCode, (void*)(get()+offset), dtype, ptr);
}