pitrou commented on code in PR #49342:
URL: https://github.com/apache/arrow/pull/49342#discussion_r3235276095
##########
cpp/src/parquet/metadata.cc:
##########
@@ -177,9 +177,9 @@ std::shared_ptr<KeyValueMetadata>
FromThriftKeyValueMetadata(const Metadata& sou
std::vector<std::string> values;
keys.reserve(source.key_value_metadata.size());
values.reserve(source.key_value_metadata.size());
- for (const auto& it : source.key_value_metadata) {
- keys.push_back(it.key);
- values.push_back(it.value);
+ for (auto& it : source.key_value_metadata) {
+ keys.push_back(std::move(it.key));
+ values.push_back(std::move(it.value));
Review Comment:
`source` is semantically constant (it's marked `const`) so we should not
move any values from it like this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]