Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Code Change #19605

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading