1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-21 19:33:03 +04:00

Replace deprecated proto2::FieldDescriptor::is_optional

It has been marked for inlining, cf
https://github.com/protocolbuffers/protobuf/blob/930036a8cf4a489521ea78ea47510a3a6fb9d7c0/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
+1 -1
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)