mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Fixed STLPort build
Change-Id: I2b9508f547667695475be64fa56f64f129603fd4
This commit is contained in:
@@ -2363,8 +2363,9 @@ class CppGenerator : public BaseGenerator {
|
||||
// the underlying storage type (eg. uint8_t).
|
||||
const auto basetype = GenTypeBasic(
|
||||
field.value.type.enum_def->underlying_type, false);
|
||||
code += "_fbb.CreateVectorScalarCast<" + basetype + ">(" + value +
|
||||
".data(), " + value + ".size())";
|
||||
code += "_fbb.CreateVectorScalarCast<" + basetype +
|
||||
">(flatbuffers::data(" + value + "), " + value +
|
||||
".size())";
|
||||
} else if (field.attributes.Lookup("cpp_type")) {
|
||||
auto type = GenTypeBasic(vector_type, false);
|
||||
code += "_fbb.CreateVector<" + type + ">(" + value + ".size(), ";
|
||||
|
||||
Reference in New Issue
Block a user