mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-24 14:46:11 +00:00
Fixed VS2010 compile error.
Change-Id: Ibd970d30b51f77a2ac9c125e400c9f1b19a81cbc
This commit is contained in:
@@ -149,11 +149,15 @@ class LobsterGenerator : public BaseGenerator {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BASE_TYPE_UNION: {
|
case BASE_TYPE_UNION: {
|
||||||
for (auto &ev : field.value.type.enum_def->vals.vec) if (ev->value) {
|
for (auto it = field.value.type.enum_def->vals.vec.begin();
|
||||||
code += def + "_as_" + ev->name + "():\n " +
|
it != field.value.type.enum_def->vals.vec.end(); ++it) {
|
||||||
NamespacedName(*ev->union_type.struct_def) +
|
auto &ev = **it;
|
||||||
" { buf_, buf_.flatbuffers_field_table(pos_, " + offsets +
|
if (ev.value) {
|
||||||
") }\n";
|
code += def + "_as_" + ev.name + "():\n " +
|
||||||
|
NamespacedName(*ev.union_type.struct_def) +
|
||||||
|
" { buf_, buf_.flatbuffers_field_table(pos_, " + offsets +
|
||||||
|
") }\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user