mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 04:21:13 +00:00
more google merge fixes
This commit is contained in:
@@ -3267,7 +3267,8 @@ class CppGenerator : public BaseGenerator {
|
||||
// If set_empty_vectors_to_null option is enabled, for optional fields,
|
||||
// check to see if there actually is any data in _o->field before
|
||||
// attempting to access it.
|
||||
if (opts_.set_empty_vectors_to_null && !field.IsRequired()) {
|
||||
if (field.attributes.Lookup("nested_flatbuffer") ||
|
||||
(opts_.set_empty_vectors_to_null && !field.IsRequired())) {
|
||||
code = value + ".size() ? " + code + " : 0";
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user