Fix some clang-tidy issues in call/
Bug: None
Change-Id: I4bc6425e33324e48cadb27a5d1bb6261221a07a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373905
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43694}
diff --git a/call/flexfec_receive_stream_unittest.cc b/call/flexfec_receive_stream_unittest.cc
index b0a3420..e155e7f 100644
--- a/call/flexfec_receive_stream_unittest.cc
+++ b/call/flexfec_receive_stream_unittest.cc
@@ -33,7 +33,6 @@
namespace {
-using ::testing::_;
using ::testing::Eq;
using ::testing::Property;
diff --git a/call/payload_type_picker.cc b/call/payload_type_picker.cc
index d26abb75..eb8ed45 100644
--- a/call/payload_type_picker.cc
+++ b/call/payload_type_picker.cc
@@ -179,7 +179,7 @@
{{cricket::kDtmfCodecName, 32000, 1}, 112},
{{cricket::kDtmfCodecName, 16000, 1}, 113},
{{cricket::kDtmfCodecName, 8000, 1}, 126}};
- for (auto entry : default_audio_mappings) {
+ for (const MapTableEntry& entry : default_audio_mappings) {
AddMapping(PayloadType(entry.payload_type),
cricket::CreateAudioCodec(entry.format));
}
@@ -198,7 +198,7 @@
}
// The first matching entry is returned, unless excluder
// maps it to something different.
- for (auto entry : entries_) {
+ for (const MapEntry& entry : entries_) {
if (MatchesWithReferenceAttributes(entry.codec(), codec)) {
if (excluder) {
auto result = excluder->LookupCodec(entry.payload_type());
@@ -223,7 +223,7 @@
cricket::Codec codec) {
// Completely duplicate mappings are ignored.
// Multiple mappings for the same codec and the same PT are legal;
- for (auto entry : entries_) {
+ for (const MapEntry& entry : entries_) {
if (payload_type == entry.payload_type() &&
MatchesWithReferenceAttributes(codec, entry.codec())) {
return RTCError::OK();
diff --git a/call/rtp_payload_params.cc b/call/rtp_payload_params.cc
index ffe62eb..a2245e8 100644
--- a/call/rtp_payload_params.cc
+++ b/call/rtp_payload_params.cc
@@ -381,16 +381,16 @@
case VideoCodecType::kVideoCodecGeneric:
if (simulate_generic_structure_) {
return MinimalisticStructure(/*num_spatial_layers=*/1,
- /*num_temporal_layer=*/1);
+ /*num_temporal_layers=*/1);
}
return std::nullopt;
case VideoCodecType::kVideoCodecVP8:
return MinimalisticStructure(/*num_spatial_layers=*/1,
- /*num_temporal_layer=*/kMaxTemporalStreams);
+ /*num_temporal_layers=*/kMaxTemporalStreams);
case VideoCodecType::kVideoCodecVP9: {
std::optional<FrameDependencyStructure> structure = MinimalisticStructure(
/*num_spatial_layers=*/kMaxSimulatedSpatialLayers,
- /*num_temporal_layer=*/kMaxTemporalStreams);
+ /*num_temporal_layers=*/kMaxTemporalStreams);
const CodecSpecificInfoVP9& vp9 = codec_specific_info->codecSpecific.VP9;
if (vp9.ss_data_available && vp9.spatial_layer_resolution_present) {
RenderResolution first_valid;
diff --git a/call/rtp_payload_params_unittest.cc b/call/rtp_payload_params_unittest.cc
index 1d16bb6..9299515 100644
--- a/call/rtp_payload_params_unittest.cc
+++ b/call/rtp_payload_params_unittest.cc
@@ -14,6 +14,7 @@
#include <map>
#include <optional>
#include <set>
+#include <vector>
#include "absl/container/inlined_vector.h"
#include "absl/types/variant.h"
diff --git a/call/rtp_video_sender_unittest.cc b/call/rtp_video_sender_unittest.cc
index 26e36e6..936f293 100644
--- a/call/rtp_video_sender_unittest.cc
+++ b/call/rtp_video_sender_unittest.cc
@@ -1343,7 +1343,7 @@
// Set a very low bitrate.
test.router()->OnBitrateUpdated(
- CreateBitrateAllocationUpdate(/*rate_bps=*/10'000),
+ CreateBitrateAllocationUpdate(/*target_bitrate_bps=*/10'000),
/*framerate=*/30);
// Create and send a large keyframe.
@@ -1421,7 +1421,7 @@
// Set a very low bitrate.
test.router()->OnBitrateUpdated(
- CreateBitrateAllocationUpdate(/*rate_bps=*/10'000),
+ CreateBitrateAllocationUpdate(/*target_bitrate_bps=*/10'000),
/*framerate=*/30);
// Create and send a large keyframe.
diff --git a/call/rtx_receive_stream_unittest.cc b/call/rtx_receive_stream_unittest.cc
index e6aee48..6a2d055 100644
--- a/call/rtx_receive_stream_unittest.cc
+++ b/call/rtx_receive_stream_unittest.cc
@@ -30,7 +30,6 @@
namespace {
-using ::testing::_;
using ::testing::Property;
using ::testing::StrictMock;