[clang-tidy] Apply performance-move-const-arg fixes (misc).
This CL is a manual spin-off of [1], which tried to apply clang-tidy's performance-move-const-arg [1] to the WebRTC codebase. Since there were some wrong fixes to correct, this CL lands a few different fixes, like adding a constructor overload to take an rvalue reference or remove 'const' to make std::move effective. [1] - https://webrtc-review.googlesource.com/c/src/+/120350 [2] - https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html Bug: webrtc:10252 Change-Id: I42a777247fee2cb788efcd7c2035148330056b7a Reviewed-on: https://webrtc-review.googlesource.com/c/120928 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26553}
This commit is contained in:

committed by
Commit Bot

parent
87ce874f99
commit
1c54605e77
@ -1051,7 +1051,7 @@ bool ParsedRtcEventLog::ParseStream(
|
||||
// Since we dont need rapid lookup based on SSRC after parsing, we move the
|
||||
// packets_streams from map to vector.
|
||||
incoming_rtp_packets_by_ssrc_.reserve(incoming_rtp_packets_map_.size());
|
||||
for (const auto& kv : incoming_rtp_packets_map_) {
|
||||
for (auto& kv : incoming_rtp_packets_map_) {
|
||||
incoming_rtp_packets_by_ssrc_.emplace_back(LoggedRtpStreamIncoming());
|
||||
incoming_rtp_packets_by_ssrc_.back().ssrc = kv.first;
|
||||
incoming_rtp_packets_by_ssrc_.back().incoming_packets =
|
||||
@ -1059,7 +1059,7 @@ bool ParsedRtcEventLog::ParseStream(
|
||||
}
|
||||
incoming_rtp_packets_map_.clear();
|
||||
outgoing_rtp_packets_by_ssrc_.reserve(outgoing_rtp_packets_map_.size());
|
||||
for (const auto& kv : outgoing_rtp_packets_map_) {
|
||||
for (auto& kv : outgoing_rtp_packets_map_) {
|
||||
outgoing_rtp_packets_by_ssrc_.emplace_back(LoggedRtpStreamOutgoing());
|
||||
outgoing_rtp_packets_by_ssrc_.back().ssrc = kv.first;
|
||||
outgoing_rtp_packets_by_ssrc_.back().outgoing_packets =
|
||||
|
Reference in New Issue
Block a user