Clang-tidy fixes in call/
Bug: None
Change-Id: Icfd947848199ca99d667884db2551b164f5d54ab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/377543
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43937}
diff --git a/call/adaptation/broadcast_resource_listener.cc b/call/adaptation/broadcast_resource_listener.cc
index 505036d..28720be 100644
--- a/call/adaptation/broadcast_resource_listener.cc
+++ b/call/adaptation/broadcast_resource_listener.cc
@@ -13,6 +13,7 @@
#include <algorithm>
#include <string>
#include <utility>
+#include <vector>
#include "absl/strings/string_view.h"
#include "api/make_ref_counted.h"
diff --git a/call/adaptation/encoder_settings.cc b/call/adaptation/encoder_settings.cc
index 7c00dce..bfc14d8 100644
--- a/call/adaptation/encoder_settings.cc
+++ b/call/adaptation/encoder_settings.cc
@@ -10,6 +10,7 @@
#include "call/adaptation/encoder_settings.h"
+#include <optional>
#include <utility>
namespace webrtc {
diff --git a/call/adaptation/resource_adaptation_processor.cc b/call/adaptation/resource_adaptation_processor.cc
index e4f4e2a..c11d196 100644
--- a/call/adaptation/resource_adaptation_processor.cc
+++ b/call/adaptation/resource_adaptation_processor.cc
@@ -11,8 +11,11 @@
#include "call/adaptation/resource_adaptation_processor.h"
#include <algorithm>
+#include <map>
#include <string>
+#include <tuple>
#include <utility>
+#include <vector>
#include "absl/algorithm/container.h"
#include "absl/strings/string_view.h"
diff --git a/call/adaptation/test/fake_adaptation_constraint.cc b/call/adaptation/test/fake_adaptation_constraint.cc
index 8fc5f67..2a03935 100644
--- a/call/adaptation/test/fake_adaptation_constraint.cc
+++ b/call/adaptation/test/fake_adaptation_constraint.cc
@@ -10,6 +10,7 @@
#include "call/adaptation/test/fake_adaptation_constraint.h"
+#include <string>
#include <utility>
#include "absl/strings/string_view.h"
diff --git a/call/adaptation/test/fake_resource.cc b/call/adaptation/test/fake_resource.cc
index 48b4768..6d17691 100644
--- a/call/adaptation/test/fake_resource.cc
+++ b/call/adaptation/test/fake_resource.cc
@@ -11,6 +11,7 @@
#include "call/adaptation/test/fake_resource.h"
#include <algorithm>
+#include <string>
#include <utility>
#include "absl/strings/string_view.h"
diff --git a/call/adaptation/video_source_restrictions.cc b/call/adaptation/video_source_restrictions.cc
index ed791cd..be4e13b 100644
--- a/call/adaptation/video_source_restrictions.cc
+++ b/call/adaptation/video_source_restrictions.cc
@@ -12,6 +12,9 @@
#include <algorithm>
#include <limits>
+#include <optional>
+#include <string>
+#include <utility>
#include "rtc_base/checks.h"
#include "rtc_base/strings/string_builder.h"
diff --git a/call/adaptation/video_source_restrictions_unittest.cc b/call/adaptation/video_source_restrictions_unittest.cc
index 1205332..eaa537c 100644
--- a/call/adaptation/video_source_restrictions_unittest.cc
+++ b/call/adaptation/video_source_restrictions_unittest.cc
@@ -10,8 +10,9 @@
#include "call/adaptation/video_source_restrictions.h"
-#include "test/gtest.h"
+#include <optional>
+#include "test/gtest.h"
namespace webrtc {
namespace {
diff --git a/call/adaptation/video_stream_adapter_unittest.cc b/call/adaptation/video_stream_adapter_unittest.cc
index e5521cd..2d0aa97 100644
--- a/call/adaptation/video_stream_adapter_unittest.cc
+++ b/call/adaptation/video_stream_adapter_unittest.cc
@@ -35,9 +35,7 @@
namespace webrtc {
using ::testing::_;
-using ::testing::DoAll;
using ::testing::Return;
-using ::testing::SaveArg;
namespace {
diff --git a/call/adaptation/video_stream_input_state.cc b/call/adaptation/video_stream_input_state.cc
index 0a12d2e..df4a6a1 100644
--- a/call/adaptation/video_stream_input_state.cc
+++ b/call/adaptation/video_stream_input_state.cc
@@ -10,6 +10,8 @@
#include "call/adaptation/video_stream_input_state.h"
+#include <optional>
+
#include "api/video_codecs/video_encoder.h"
namespace webrtc {
diff --git a/call/bitrate_estimator_tests.cc b/call/bitrate_estimator_tests.cc
index d66e4cc..de5f2ab 100644
--- a/call/bitrate_estimator_tests.cc
+++ b/call/bitrate_estimator_tests.cc
@@ -67,8 +67,8 @@
// Ignore log lines that are due to missing AST extensions, these are
// logged when we switch back from AST to TOF until the wrapping bitrate
// estimator gives up on using AST.
- if (message.find("BitrateEstimator") != absl::string_view::npos &&
- message.find("packet is missing") == absl::string_view::npos) {
+ if (absl::StrContains(message, "BitrateEstimator") &&
+ !absl::StrContains(message, "packet is missing")) {
received_log_lines_.push_back(std::string(message));
}
diff --git a/call/call_unittest.cc b/call/call_unittest.cc
index d2c9836..a33bad7 100644
--- a/call/call_unittest.cc
+++ b/call/call_unittest.cc
@@ -55,7 +55,6 @@
namespace {
using ::testing::_;
-using ::testing::Contains;
using ::testing::MockFunction;
using ::testing::NiceMock;
using ::testing::StrictMock;
diff --git a/call/payload_type_picker.cc b/call/payload_type_picker.cc
index 5c80f58..269c67b 100644
--- a/call/payload_type_picker.cc
+++ b/call/payload_type_picker.cc
@@ -78,7 +78,7 @@
std::string profile_id;
if (codec.GetParam(cricket::kVP9ProfileId, &profile_id)) {
- if (profile_id.compare("1") == 0 || profile_id.compare("3") == 0) {
+ if (profile_id == "1" || profile_id == "3") {
return true;
}
}
diff --git a/call/payload_type_picker_unittest.cc b/call/payload_type_picker_unittest.cc
index a1f89e4..f476908 100644
--- a/call/payload_type_picker_unittest.cc
+++ b/call/payload_type_picker_unittest.cc
@@ -22,7 +22,6 @@
using testing::Eq;
using testing::Ge;
using testing::Le;
-using testing::Lt;
using testing::Ne;
TEST(PayloadTypePicker, PayloadTypeAssignmentWorks) {