Skip to content

Commit

Permalink
LSC: Move expensive variables on their last use to avoid copies.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 641336948
  • Loading branch information
protobuf-github-bot authored and copybara-github committed Jun 7, 2024
1 parent 08a6c36 commit 54d8f03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/google/protobuf/text_format.cc
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ class TextFormat::Parser::ParserImpl {
case FieldDescriptor::CPPTYPE_STRING: {
std::string value;
DO(ConsumeString(&value));
SET_FIELD(String, string, value);
SET_FIELD(String, string, std::move(value));
break;
}

Expand Down

0 comments on commit 54d8f03

Please sign in to comment.