| 877 | } |
| 878 | |
| 879 | absl::Status LegacyStructValue::Equal( |
| 880 | const Value& other, |
| 881 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 882 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 883 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 884 | if (auto legacy_struct_value = common_internal::AsLegacyStructValue(other); |
| 885 | legacy_struct_value.has_value()) { |
| 886 | auto message_wrapper = AsMessageWrapper(message_ptr_, legacy_type_info_); |
| 887 | const auto* access_apis = |
| 888 | message_wrapper.legacy_type_info()->GetAccessApis(message_wrapper); |
| 889 | if (ABSL_PREDICT_FALSE(access_apis == nullptr)) { |
| 890 | return absl::UnimplementedError( |
| 891 | absl::StrCat("legacy access APIs missing for ", GetTypeName())); |
| 892 | } |
| 893 | auto other_message_wrapper = |
| 894 | AsMessageWrapper(legacy_struct_value->message_ptr(), |
| 895 | legacy_struct_value->legacy_type_info()); |
| 896 | *result = BoolValue{ |
| 897 | access_apis->IsEqualTo(message_wrapper, other_message_wrapper)}; |
| 898 | return absl::OkStatus(); |
| 899 | } |
| 900 | if (auto struct_value = other.AsStruct(); struct_value.has_value()) { |
| 901 | return common_internal::StructValueEqual( |
| 902 | common_internal::LegacyStructValue(message_ptr_, legacy_type_info_), |
| 903 | *struct_value, descriptor_pool, message_factory, arena, result); |
| 904 | } |
| 905 | *result = FalseValue(); |
| 906 | return absl::OkStatus(); |
| 907 | } |
| 908 | |
| 909 | bool LegacyStructValue::IsZeroValue() const { |
| 910 | auto message_wrapper = AsMessageWrapper(message_ptr_, legacy_type_info_); |
nothing calls this directly
no test coverage detected