Don't copy loop variables when we don't have to
This was suggested by clang-tidy.
BUG=none
Review-Url: https://codereview.webrtc.org/2489693002
Cr-Commit-Position: refs/heads/master@{#15018}
diff --git a/webrtc/api/rtcstatscollector.cc b/webrtc/api/rtcstatscollector.cc
index ce3176b..d1145eb 100644
--- a/webrtc/api/rtcstatscollector.cc
+++ b/webrtc/api/rtcstatscollector.cc
@@ -250,7 +250,7 @@
stream_stats->stream_identifier = stream->label();
stream_stats->track_ids = std::vector<std::string>();
// Audio Tracks
- for (rtc::scoped_refptr<AudioTrackInterface> audio_track :
+ for (const rtc::scoped_refptr<AudioTrackInterface>& audio_track :
stream->GetAudioTracks()) {
std::string id = RTCMediaStreamTrackStatsIDFromMediaStreamTrackInterface(
*audio_track.get());
@@ -284,7 +284,7 @@
report->AddStats(std::move(audio_track_stats));
}
// Video Tracks
- for (rtc::scoped_refptr<VideoTrackInterface> video_track :
+ for (const rtc::scoped_refptr<VideoTrackInterface>& video_track :
stream->GetVideoTracks()) {
std::string id = RTCMediaStreamTrackStatsIDFromMediaStreamTrackInterface(
*video_track.get());