From f1147f65bbedeee0cf3843bb06313cbe11fc6191 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Mon, 30 Sep 2019 12:12:36 -0700 Subject: [PATCH] Fixed Android STLPort related error. Change-Id: I59ff072e526fc63b3215767a4d4a2a8944b65654 --- src/idl_gen_general.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/idl_gen_general.cpp b/src/idl_gen_general.cpp index 2f78ae8c0..47e035b8b 100644 --- a/src/idl_gen_general.cpp +++ b/src/idl_gen_general.cpp @@ -1270,7 +1270,7 @@ class GeneralGenerator : public BaseGenerator { code += MakeCamel(field.name, lang_.first_camel_upper); code += "Bytes() { return "; code += lang_.accessor_prefix + "__vector_as_arraysegment("; - code += NumToString(field.value.offset); + code += NumToString(field.value.offset); code += "); }\n"; code += "#endif\n"; @@ -1784,7 +1784,7 @@ bool GenerateBinary(const Parser &parser, const std::string &path, const std::string &file_name) { if (parser.opts.use_flexbuffers) { auto data_vec = parser.flex_builder_.GetBuffer(); - auto data_ptr = reinterpret_cast(data_vec.data()); + auto data_ptr = reinterpret_cast(data(data_vec)); return !parser.flex_builder_.GetSize() || flatbuffers::SaveFile( BinaryFileName(parser, path, file_name).c_str(), data_ptr,