mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +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();
|
||||
fit != ev.union_type.struct_def->fields.vec.end(); ++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;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user