[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}
diff --git a/p2p/base/stun_request.cc b/p2p/base/stun_request.cc
index f97ca86..088cbc8 100644
--- a/p2p/base/stun_request.cc
+++ b/p2p/base/stun_request.cc
@@ -69,7 +69,7 @@
}
void StunRequestManager::Flush(int msg_type) {
- for (const auto kv : requests_) {
+ for (const auto& kv : requests_) {
StunRequest* request = kv.second;
if (msg_type == kAllRequests || msg_type == request->type()) {
thread_->Clear(request, MSG_STUN_SEND);
@@ -79,7 +79,7 @@
}
bool StunRequestManager::HasRequest(int msg_type) {
- for (const auto kv : requests_) {
+ for (const auto& kv : requests_) {
StunRequest* request = kv.second;
if (msg_type == kAllRequests || msg_type == request->type()) {
return true;