[clang-tidy] Apply performance-inefficient-vector-operation fixes.
This CL applies clang-tidy's performance-inefficient-vector-operation
[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-inefficient-vector-operation.html
Bug: webrtc:10252
Change-Id: I824caab2a5746036852e00d714b89aa5ec030ee3
Reviewed-on: https://webrtc-review.googlesource.com/c/120052
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26442}
diff --git a/pc/rtp_sender_receiver_unittest.cc b/pc/rtp_sender_receiver_unittest.cc
index f3fb63a..69d0c74 100644
--- a/pc/rtp_sender_receiver_unittest.cc
+++ b/pc/rtp_sender_receiver_unittest.cc
@@ -203,6 +203,7 @@
void CreateVideoRtpSenderWithSimulcast(
int num_layers = kVideoSimulcastLayerCount) {
std::vector<uint32_t> ssrcs;
+ ssrcs.reserve(num_layers);
for (int i = 0; i < num_layers; ++i)
ssrcs.push_back(kVideoSsrcSimulcast + i);
cricket::StreamParams stream_params =
@@ -260,6 +261,7 @@
std::vector<rtc::scoped_refptr<MediaStreamInterface>> streams = {},
int num_layers = kVideoSimulcastLayerCount) {
std::vector<uint32_t> ssrcs;
+ ssrcs.reserve(num_layers);
for (int i = 0; i < num_layers; ++i)
ssrcs.push_back(kVideoSsrcSimulcast + i);
cricket::StreamParams stream_params =
@@ -943,6 +945,7 @@
// Simulate the setLocalDescription call
std::vector<uint32_t> ssrcs;
+ ssrcs.reserve(2);
for (int i = 0; i < 2; ++i)
ssrcs.push_back(kVideoSsrcSimulcast + i);
cricket::StreamParams stream_params =
@@ -978,6 +981,7 @@
// Simulate the setLocalDescription call as if the user used SDP munging
// to enable simulcast
std::vector<uint32_t> ssrcs;
+ ssrcs.reserve(2);
for (int i = 0; i < 2; ++i)
ssrcs.push_back(kVideoSsrcSimulcast + i);
cricket::StreamParams stream_params =