|
|
@ -935,7 +935,8 @@ SubLayoutArray::SubLayoutArray(const protobuf::Descriptor* message) { |
|
|
|
std::vector<const protobuf::FieldDescriptor*> sorted_subenums = |
|
|
|
std::vector<const protobuf::FieldDescriptor*> sorted_subenums = |
|
|
|
SortedSubEnums(message); |
|
|
|
SortedSubEnums(message); |
|
|
|
for (const auto* field : sorted_subenums) { |
|
|
|
for (const auto* field : sorted_subenums) { |
|
|
|
if (field->file()->syntax() != protobuf::FileDescriptor::SYNTAX_PROTO2) { |
|
|
|
if (field->enum_type()->file()->syntax() != |
|
|
|
|
|
|
|
protobuf::FileDescriptor::SYNTAX_PROTO2) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!indexes_.try_emplace(field->enum_type(), i).second) { |
|
|
|
if (!indexes_.try_emplace(field->enum_type(), i).second) { |
|
|
@ -983,7 +984,8 @@ bool TryFillTableEntry(const protobuf::Descriptor* message, |
|
|
|
type = "b1"; |
|
|
|
type = "b1"; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case protobuf::FieldDescriptor::TYPE_ENUM: |
|
|
|
case protobuf::FieldDescriptor::TYPE_ENUM: |
|
|
|
if (field->file()->syntax() == protobuf::FileDescriptor::SYNTAX_PROTO2) { |
|
|
|
if (field->enum_type()->file()->syntax() == |
|
|
|
|
|
|
|
protobuf::FileDescriptor::SYNTAX_PROTO2) { |
|
|
|
// We don't have the means to test proto2 enum fields for valid values.
|
|
|
|
// We don't have the means to test proto2 enum fields for valid values.
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|