ClangTidy fixes for call/

These are manual edits please verify there are no typos.
Feel free to auto-submit if there are no issues.

Bug: webrtc:10410
Change-Id: I08ff36bd689fa7c3716c8e7017bd571cc9f09f35
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127642
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27125}
This commit is contained in:
Benjamin Wright 2019-03-13 18:03:29 -07:00 committed by Commit Bot
parent 009ab3c438
commit 41f9f2cc57
8 changed files with 7 additions and 15 deletions

View File

@ -19,7 +19,6 @@
using ::testing::_;
using ::testing::NiceMock;
using ::testing::StrictMock;
namespace webrtc {
// Emulating old interface for test suite compatibility.

View File

@ -66,7 +66,7 @@ class LogObserver {
num_popped++;
EXPECT_TRUE(a.find(b) != std::string::npos) << a << " != " << b;
}
if (expected_log_lines_.size() <= 0) {
if (expected_log_lines_.empty()) {
if (num_popped > 0) {
done_.Set();
}

View File

@ -1092,16 +1092,16 @@ void Call::UpdateAggregateNetworkState() {
bool have_video = false;
{
ReadLockScoped read_lock(*send_crit_);
if (audio_send_ssrcs_.size() > 0)
if (!audio_send_ssrcs_.empty())
have_audio = true;
if (video_send_ssrcs_.size() > 0)
if (!video_send_ssrcs_.empty())
have_video = true;
}
{
ReadLockScoped read_lock(*receive_crit_);
if (audio_receive_streams_.size() > 0)
if (!audio_receive_streams_.empty())
have_audio = true;
if (video_receive_streams_.size() > 0)
if (!video_receive_streams_.empty())
have_video = true;
}

View File

@ -25,7 +25,7 @@ namespace webrtc {
namespace {
bool ParseConfigParam(std::string exp_name, int* field) {
std::string group = field_trial::FindFullName(exp_name);
if (group == "")
if (group.empty())
return false;
return (sscanf(group.c_str(), "%d", field) == 1);

View File

@ -637,7 +637,7 @@ void CallPerfTest::TestMinTransmitBitrate(bool pad_to_min_bitrate) {
// TODO(holmer): Run this with a timer instead of once per packet.
Action OnSendRtp(const uint8_t* packet, size_t length) override {
VideoSendStream::Stats stats = send_stream_->GetStats();
if (stats.substreams.size() > 0) {
if (!stats.substreams.empty()) {
RTC_DCHECK_EQ(1, stats.substreams.size());
int bitrate_kbps =
stats.substreams.begin()->second.total_bitrate_bps / 1000;

View File

@ -20,9 +20,6 @@
#include "test/gtest.h"
using ::testing::_;
using ::testing::AnyNumber;
using ::testing::Invoke;
using ::testing::Return;
namespace webrtc {

View File

@ -35,7 +35,6 @@ class TaskQueue;
} // namespace rtc
namespace webrtc {
class CallStats;
class CallStatsObserver;
class FrameEncryptorInterface;
class TargetTransferRateObserver;

View File

@ -27,10 +27,7 @@
#include "video/send_statistics_proxy.h"
using ::testing::_;
using ::testing::AnyNumber;
using ::testing::Invoke;
using ::testing::NiceMock;
using ::testing::Return;
using ::testing::SaveArg;
using ::testing::Unused;