forked from BigfootDev/flatbuffers
Fixed vector test on Windows
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user