Skip to content

Commit

Permalink
Automated Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 705443030
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Dec 12, 2024
1 parent 0765dd4 commit 390124a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/google/protobuf/lite_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ bool ParseFrom(const std::string& data, MessageLite& msg) {
}

bool ParseFrom(const absl::Cord& data, MessageLite& msg) {
return msg.ParseFromCord(data);
return msg.ParseFromString(data);
}

template <typename T>
Expand Down Expand Up @@ -488,7 +488,7 @@ TYPED_TEST(LiteTest, AllLite13CordStream) {
coded_output.WriteVarint32(20);
}
absl::Cord buffer = output_stream.Consume();
message.ParseFromCord(buffer);
message.ParseFromString(buffer);
data = SerializeAs<TypeParam>(message);
EXPECT_EQ(data, buffer);
}
Expand Down
10 changes: 5 additions & 5 deletions src/google/protobuf/message_lite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ std::string MessageLite::SerializePartialAsString() const {
bool MessageLite::AppendToString(absl::Cord* output) const {
ABSL_DCHECK(IsInitialized())
<< InitializationErrorMessage("serialize", *this);
return AppendPartialToCord(output);
return AppendPartialToString(output);
}

bool MessageLite::AppendPartialToString(absl::Cord* output) const {
Expand Down Expand Up @@ -694,23 +694,23 @@ bool MessageLite::AppendPartialToString(absl::Cord* output) const {

bool MessageLite::SerializeToString(absl::Cord* output) const {
output->Clear();
return AppendToCord(output);
return AppendToString(output);
}

bool MessageLite::SerializePartialToString(absl::Cord* output) const {
output->Clear();
return AppendPartialToCord(output);
return AppendPartialToString(output);
}

absl::Cord MessageLite::SerializeAsCord() const {
absl::Cord output;
if (!AppendToCord(&output)) output.Clear();
if (!AppendToString(&output)) output.Clear();
return output;
}

absl::Cord MessageLite::SerializePartialAsCord() const {
absl::Cord output;
if (!AppendPartialToCord(&output)) output.Clear();
if (!AppendPartialToString(&output)) output.Clear();
return output;
}

Expand Down
2 changes: 1 addition & 1 deletion src/google/protobuf/no_field_presence_map_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ bool TestSerialize<std::string>(const MessageLite& message,

template <>
bool TestSerialize<absl::Cord>(const MessageLite& message, absl::Cord* output) {
return message.SerializeToCord(output);
return message.SerializeToString(output);
}

template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion src/google/protobuf/no_field_presence_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ bool TestSerialize<std::string>(const MessageLite& message,

template <>
bool TestSerialize<absl::Cord>(const MessageLite& message, absl::Cord* output) {
return message.SerializeToCord(output);
return message.SerializeToString(output);
}

template <typename T>
Expand Down

0 comments on commit 390124a

Please sign in to comment.