Replace deprecated proto2::FieldDescriptor::is_optional

It has been marked for inlining, cf
930036a8cf/src/google/protobuf/descriptor.h (L936)
This commit is contained in:
Vincent Rabaud 2025-07-15 09:17:57 +02:00
parent 468de9b367
commit 61a3d7d25d

View File

@ -217,7 +217,7 @@ public:
const google::protobuf::UnknownFieldSet& unknownFields = msgRefl->GetUnknownFields(msg);
bool hasData = fd->is_required() ||
(fd->is_optional() && msgRefl->HasField(msg, fd)) ||
(!fd->is_repeated() && !fd->is_required() && msgRefl->HasField(msg, fd)) ||
(fd->is_repeated() && msgRefl->FieldSize(msg, fd) > 0) ||
!unknownFields.empty();
if (!hasData)