Fixed conversion warning in generated code.

This commit is contained in:
Wouter van Oortmerssen
2016-07-20 18:17:33 -07:00
parent bdd668df7b
commit 5efa22447e
2 changed files with 9 additions and 8 deletions

View File

@@ -989,7 +989,8 @@ class CppGenerator : public BaseGenerator {
switch (field.value.type.base_type) {
case BASE_TYPE_VECTOR: {
code += prefix;
code += "{ for (size_t _i = 0; _i < _e->size(); _i++) { ";
code += "{ for (flatbuffers::uoffset_t _i = 0;";
code += " _i < _e->size(); _i++) { ";
code += dest + ".push_back(";
std::string indexing = "_e->Get(_i)";
if (field.value.type.element == BASE_TYPE_BOOL)