@@ -330,9 +330,10 @@ std::string LegacyListValue::DebugString() const {
330330absl::Status LegacyListValue::SerializeTo (
331331 absl::Nonnull<const google::protobuf::DescriptorPool*> descriptor_pool,
332332 absl::Nonnull<google::protobuf::MessageFactory*> message_factory,
333- absl::Cord& value) const {
333+ absl::Nonnull<absl:: Cord*> value) const {
334334 ABSL_DCHECK (descriptor_pool != nullptr );
335335 ABSL_DCHECK (message_factory != nullptr );
336+ ABSL_DCHECK (value != nullptr );
336337
337338 const google::protobuf::Descriptor* descriptor =
338339 descriptor_pool->FindMessageTypeByName (" google.protobuf.ListValue" );
@@ -349,7 +350,7 @@ absl::Status LegacyListValue::SerializeTo(
349350 if (wrapped == nullptr ) {
350351 return absl::UnknownError (" failed to convert legacy map to JSON" );
351352 }
352- if (!wrapped->SerializePartialToCord (& value)) {
353+ if (!wrapped->SerializePartialToCord (value)) {
353354 return absl::UnknownError (
354355 absl::StrCat (" failed to serialize message: " , wrapped->GetTypeName ()));
355356 }
@@ -506,9 +507,10 @@ std::string LegacyMapValue::DebugString() const {
506507absl::Status LegacyMapValue::SerializeTo (
507508 absl::Nonnull<const google::protobuf::DescriptorPool*> descriptor_pool,
508509 absl::Nonnull<google::protobuf::MessageFactory*> message_factory,
509- absl::Cord& value) const {
510+ absl::Nonnull<absl:: Cord*> value) const {
510511 ABSL_DCHECK (descriptor_pool != nullptr );
511512 ABSL_DCHECK (message_factory != nullptr );
513+ ABSL_DCHECK (value != nullptr );
512514
513515 const google::protobuf::Descriptor* descriptor =
514516 descriptor_pool->FindMessageTypeByName (" google.protobuf.Struct" );
@@ -524,7 +526,7 @@ absl::Status LegacyMapValue::SerializeTo(
524526 if (wrapped == nullptr ) {
525527 return absl::UnknownError (" failed to convert legacy map to JSON" );
526528 }
527- if (!wrapped->SerializePartialToCord (& value)) {
529+ if (!wrapped->SerializePartialToCord (value)) {
528530 return absl::UnknownError (
529531 absl::StrCat (" failed to serialize message: " , wrapped->GetTypeName ()));
530532 }
@@ -752,13 +754,14 @@ std::string LegacyStructValue::DebugString() const {
752754absl::Status LegacyStructValue::SerializeTo (
753755 absl::Nonnull<const google::protobuf::DescriptorPool*> descriptor_pool,
754756 absl::Nonnull<google::protobuf::MessageFactory*> message_factory,
755- absl::Cord& value) const {
757+ absl::Nonnull<absl:: Cord*> value) const {
756758 ABSL_DCHECK (descriptor_pool != nullptr );
757759 ABSL_DCHECK (message_factory != nullptr );
760+ ABSL_DCHECK (value != nullptr );
758761
759762 auto message_wrapper = AsMessageWrapper (message_ptr_, type_info_);
760763 if (ABSL_PREDICT_TRUE (
761- message_wrapper.message_ptr ()->SerializePartialToCord (& value))) {
764+ message_wrapper.message_ptr ()->SerializePartialToCord (value))) {
762765 return absl::OkStatus ();
763766 }
764767 return absl::UnknownError (" failed to serialize protocol buffer message" );
0 commit comments