mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-02 01:33:58 +00:00
Fixed vector test on Windows
This commit is contained in:
@@ -946,6 +946,11 @@ class Builder FLATBUFFERS_FINAL_CLASS {
|
|||||||
EndVector(start, false, false);
|
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) {
|
template<typename T> void Vector(const std::vector<T> &vec) {
|
||||||
Vector(vec.data(), vec.size());
|
Vector(vec.data(), vec.size());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1373,8 +1373,8 @@ void FlexBuffersTest() {
|
|||||||
slb.IndirectFloat(4.0f);
|
slb.IndirectFloat(4.0f);
|
||||||
});
|
});
|
||||||
int ints[] = { 1, 2, 3 };
|
int ints[] = { 1, 2, 3 };
|
||||||
slb.Add("bar", ints);
|
slb.Vector("bar", ints, 3);
|
||||||
slb.FixedTypedVector("bar3", ints, sizeof(ints) / sizeof(int));
|
slb.FixedTypedVector("bar3", ints, 3);
|
||||||
slb.Double("foo", 100);
|
slb.Double("foo", 100);
|
||||||
slb.Map("mymap", [&]() {
|
slb.Map("mymap", [&]() {
|
||||||
slb.String("foo", "Fred"); // Testing key and string reuse.
|
slb.String("foo", "Fred"); // Testing key and string reuse.
|
||||||
|
|||||||
Reference in New Issue
Block a user