This will fix to use correct flatbuffers::Vector method and type
- Length() is deprecated, should use size()
- size return type is uint32_t not int
Signed-off-by: SaeHie Park <saehie.park@samsung.com>
*/
IndexVector as_index_vector(const flatbuffers::Vector<int32_t> *array)
{
- std::vector<int32_t> res(array->Length());
+ const uint32_t size = array->size();
- for (int i = 0; i < array->Length(); i++)
+ std::vector<int32_t> res(size);
+
+ for (uint32_t i = 0; i < size; i++)
{
res[i] = array->Get(i);
}