mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-26 10:02:40 +00:00
Allow tables that are entirely composed of native inlines to be copied. (#4958)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
4b864fd172
commit
ebb410062b
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user