LSC: Move expensive variables on their last use to avoid copies.

PiperOrigin-RevId: 641336948
pull/17069/head
Protobuf Team Bot 6 months ago committed by Copybara-Service
parent 08a6c36f5a
commit 54d8f03974
  1. 2
      src/google/protobuf/text_format.cc

@ -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;
}

Loading…
Cancel
Save