Fixed vector test on Windows

parent c57ab92e
......@@ -946,6 +946,11 @@ class Builder FLATBUFFERS_FINAL_CLASS {
EndVector(start, false, false);
}
}
template<typename T> void Vector(const char *key, const T *elems,
size_t len) {
Key(key);
Vector(elems, len);
}
template<typename T> void Vector(const std::vector<T> &vec) {
Vector(vec.data(), vec.size());
}
......
......@@ -1373,8 +1373,8 @@ void FlexBuffersTest() {
slb.IndirectFloat(4.0f);
});
int ints[] = { 1, 2, 3 };
slb.Add("bar", ints);
slb.FixedTypedVector("bar3", ints, sizeof(ints) / sizeof(int));
slb.Vector("bar", ints, 3);
slb.FixedTypedVector("bar3", ints, 3);
slb.Double("foo", 100);
slb.Map("mymap", [&]() {
slb.String("foo", "Fred"); // Testing key and string reuse.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment