fixed comparator for native_inline (#7076)

* fixed comparator for native_inline

* added native_inline data

* updated more tests for the new field

* more fixes
This commit is contained in:
Derek Bailey
2022-02-02 23:44:43 -08:00
committed by GitHub
parent 826193ff68
commit 39c8a19ce2
26 changed files with 937 additions and 636 deletions

View File

@@ -2025,7 +2025,7 @@ class CppGenerator : public BaseGenerator {
field.value.type.element != BASE_TYPE_UTYPE)) {
if (!compare_op.empty()) { compare_op += " &&\n "; }
auto accessor = Name(field) + accessSuffix;
if (struct_def.fixed ||
if (struct_def.fixed || field.native_inline ||
field.value.type.base_type != BASE_TYPE_STRUCT) {
compare_op += "(lhs." + accessor + " == rhs." + accessor + ")";
} else {