[clang-tidy] Apply performance-for-range-copy fixes.
This CL applies clang-tidy's performance-for-range-copy [1] on the WebRTC codebase. All changes in this CL are automatically generated by both clang-tidy and 'git cl format'. [1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html Bug: webrtc:10215 Change-Id: I7c83290b8866d76129bbec4e24e6701f5014102e Reviewed-on: https://webrtc-review.googlesource.com/c/120043 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26420}
This commit is contained in:

committed by
Commit Bot

parent
2d65fff16f
commit
739baf097b
@ -347,7 +347,7 @@ class PeerConnectionWrapper : public webrtc::PeerConnectionObserver,
|
||||
std::vector<rtc::scoped_refptr<RtpReceiverInterface>> GetReceiversOfType(
|
||||
cricket::MediaType media_type) {
|
||||
std::vector<rtc::scoped_refptr<RtpReceiverInterface>> receivers;
|
||||
for (auto receiver : pc()->GetReceivers()) {
|
||||
for (const auto& receiver : pc()->GetReceivers()) {
|
||||
if (receiver->media_type() == media_type) {
|
||||
receivers.push_back(receiver);
|
||||
}
|
||||
@ -2237,7 +2237,7 @@ TEST_P(PeerConnectionIntegrationTest, AnswererRejectsAudioAndVideoSections) {
|
||||
} else {
|
||||
callee()->SetRemoteOfferHandler([this] {
|
||||
// Stopping all transceivers will cause all media sections to be rejected.
|
||||
for (auto transceiver : callee()->pc()->GetTransceivers()) {
|
||||
for (const auto& transceiver : callee()->pc()->GetTransceivers()) {
|
||||
transceiver->Stop();
|
||||
}
|
||||
});
|
||||
@ -2551,7 +2551,7 @@ TEST_P(PeerConnectionIntegrationTest, GetBytesReceivedStatsWithOldStatsApi) {
|
||||
|
||||
// Get a handle to the remote tracks created, so they can be used as GetStats
|
||||
// filters.
|
||||
for (auto receiver : callee()->pc()->GetReceivers()) {
|
||||
for (const auto& receiver : callee()->pc()->GetReceivers()) {
|
||||
// We received frames, so we definitely should have nonzero "received bytes"
|
||||
// stats at this point.
|
||||
EXPECT_GT(callee()->OldGetStatsForTrack(receiver->track())->BytesReceived(),
|
||||
|
Reference in New Issue
Block a user