Commit e4c7ead2 authored by reed-lau's avatar reed-lau Committed by Adam Cozzette

use move method for SetString

parent 218df038
......@@ -788,11 +788,11 @@ bool CheckAndSetString(
string value_string(value, value_len);
if (append) {
reflection->AddString(message, descriptor, value_string);
reflection->AddString(message, descriptor, std::move(value_string));
} else if (index < 0) {
reflection->SetString(message, descriptor, value_string);
reflection->SetString(message, descriptor, std::move(value_string));
} else {
reflection->SetRepeatedString(message, descriptor, index, value_string);
reflection->SetRepeatedString(message, descriptor, index, std::move(value_string));
}
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment