Allow tables that are entirely composed of native inlines to be copied. (#4958)

This commit is contained in:
Taj Morton
2018-10-01 16:27:54 -07:00
committed by Wouter van Oortmerssen
parent 4b864fd172
commit ebb410062b

View File

@@ -1299,7 +1299,8 @@ class CppGenerator : public BaseGenerator {
for (auto fit = ev.union_type.struct_def->fields.vec.begin(); for (auto fit = ev.union_type.struct_def->fields.vec.begin();
fit != ev.union_type.struct_def->fields.vec.end(); ++fit) { fit != ev.union_type.struct_def->fields.vec.end(); ++fit) {
const auto &field = **fit; const auto &field = **fit;
if (!field.deprecated && field.value.type.struct_def) { if (!field.deprecated && field.value.type.struct_def &&
!field.native_inline) {
copyable = false; copyable = false;
break; break;
} }