Fix 28 ClangTidy - Readability findings in modules/rtp_rtcp/
These fixes are automatically created by various analysis tools, but have been manually triggered to be applied. * the 'empty' method should be used to check for emptiness instead of 'size' (3 times) * using decl 'Return' is unused (4 times) * using decl '_' is unused (3 times) * using decl 'DoAll' is unused (2 times) * using decl 'SetArgPointee' is unused * using decl 'Dlrr' is unused * using decl 'IsEmpty' is unused * redundant get() call on smart pointer * using decl 'Invoke' is unused (2 times) * using decl 'SizeIs' is unused (3 times) * using decl 'make_tuple' is unused * using decl 'NiceMock' is unused * using decl 'SaveArg' is unused (2 times) * using decl 'AtLeast' is unused * using decl 'ElementsAre' is unused * using decl 'Gt' is unused Bug: None Change-Id: I97658fb0e94620b8319d7c3da29b15e27ec23188 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151133 Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29056}
This commit is contained in:
parent
38350b1ef2
commit
59e1464fcd
@ -33,12 +33,12 @@ bool IsTokenChar(char ch) {
|
||||
} // namespace
|
||||
|
||||
bool IsLegalMidName(absl::string_view name) {
|
||||
return (name.size() <= kMidRsidMaxSize && name.size() > 0 &&
|
||||
return (name.size() <= kMidRsidMaxSize && !name.empty() &&
|
||||
absl::c_all_of(name, IsTokenChar));
|
||||
}
|
||||
|
||||
bool IsLegalRsidName(absl::string_view name) {
|
||||
return (name.size() <= kMidRsidMaxSize && name.size() > 0 &&
|
||||
return (name.size() <= kMidRsidMaxSize && !name.empty() &&
|
||||
absl::c_all_of(name, isalnum));
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,6 @@ namespace {
|
||||
using ::testing::_;
|
||||
using ::testing::Args;
|
||||
using ::testing::ElementsAreArray;
|
||||
using ::testing::Return;
|
||||
|
||||
using test::fec::FlexfecPacketGenerator;
|
||||
using Packet = ForwardErrorCorrection::Packet;
|
||||
|
||||
@ -14,11 +14,6 @@
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::DoAll;
|
||||
using ::testing::Return;
|
||||
using ::testing::SetArgPointee;
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
static const int64_t kTestRtt = 10;
|
||||
|
||||
@ -19,7 +19,6 @@ using ::testing::ElementsAre;
|
||||
using ::testing::ElementsAreArray;
|
||||
using ::testing::make_tuple;
|
||||
using ::testing::SizeIs;
|
||||
using webrtc::rtcp::Dlrr;
|
||||
using webrtc::rtcp::ExtendedReports;
|
||||
using webrtc::rtcp::ReceiveTimeInfo;
|
||||
using webrtc::rtcp::Rrtr;
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
|
||||
using ::testing::ElementsAreArray;
|
||||
using ::testing::IsEmpty;
|
||||
using ::testing::make_tuple;
|
||||
using webrtc::rtcp::TmmbItem;
|
||||
using webrtc::rtcp::Tmmbr;
|
||||
|
||||
@ -743,7 +743,7 @@ int32_t RTCPSender::SendCompoundRTCP(
|
||||
|
||||
BuilderFunc func = builder_it->second;
|
||||
std::unique_ptr<rtcp::RtcpPacket> packet = (this->*func)(context);
|
||||
if (packet.get() == nullptr)
|
||||
if (packet == nullptr)
|
||||
return -1;
|
||||
// If there is a BYE, don't append now - save it and append it
|
||||
// at the end later.
|
||||
|
||||
@ -32,7 +32,6 @@ namespace {
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::ElementsAre;
|
||||
using ::testing::Invoke;
|
||||
using ::testing::Return;
|
||||
using ::testing::SizeIs;
|
||||
using ::testing::StrictMock;
|
||||
|
||||
@ -30,7 +30,6 @@ using ::testing::Contains;
|
||||
using ::testing::Each;
|
||||
using ::testing::ElementsAreArray;
|
||||
using ::testing::Le;
|
||||
using ::testing::SizeIs;
|
||||
|
||||
constexpr RtpPacketizer::PayloadSizeLimits kNoSizeLimits;
|
||||
|
||||
|
||||
@ -23,7 +23,6 @@ using ::testing::Each;
|
||||
using ::testing::ElementsAre;
|
||||
using ::testing::ElementsAreArray;
|
||||
using ::testing::IsEmpty;
|
||||
using ::testing::make_tuple;
|
||||
|
||||
constexpr int8_t kPayloadType = 100;
|
||||
constexpr uint32_t kSsrc = 0x12345678;
|
||||
|
||||
@ -694,7 +694,7 @@ void ModuleRtpRtcpImpl::OnReceivedNack(
|
||||
if (!rtp_sender_)
|
||||
return;
|
||||
|
||||
if (!rtp_sender_->StorePackets() || nack_sequence_numbers.size() == 0) {
|
||||
if (!rtp_sender_->StorePackets() || nack_sequence_numbers.empty()) {
|
||||
return;
|
||||
}
|
||||
// Use RTT from RtcpRttStats class if provided.
|
||||
|
||||
@ -29,11 +29,7 @@
|
||||
#include "test/rtcp_packet_parser.h"
|
||||
#include "test/rtp_header_parser.h"
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::ElementsAre;
|
||||
using ::testing::NiceMock;
|
||||
using ::testing::Return;
|
||||
using ::testing::SaveArg;
|
||||
|
||||
namespace webrtc {
|
||||
namespace {
|
||||
|
||||
@ -33,7 +33,6 @@ const uint32_t kSsrc = 725242;
|
||||
const uint8_t kAudioLevel = 0x5a;
|
||||
const uint64_t kStartTime = 123456789;
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::ElementsAreArray;
|
||||
|
||||
class LoopbackTransportTest : public webrtc::Transport {
|
||||
|
||||
@ -74,19 +74,12 @@ const char kNoMid[] = "";
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::AllOf;
|
||||
using ::testing::AtLeast;
|
||||
using ::testing::DoAll;
|
||||
using ::testing::ElementsAre;
|
||||
using ::testing::ElementsAreArray;
|
||||
using ::testing::Field;
|
||||
using ::testing::Gt;
|
||||
using ::testing::Invoke;
|
||||
using ::testing::NiceMock;
|
||||
using ::testing::Pointee;
|
||||
using ::testing::Property;
|
||||
using ::testing::Return;
|
||||
using ::testing::SaveArg;
|
||||
using ::testing::SizeIs;
|
||||
using ::testing::StrictMock;
|
||||
|
||||
uint64_t ConvertMsToAbsSendTime(int64_t time_ms) {
|
||||
|
||||
@ -31,7 +31,6 @@ using ::testing::Combine;
|
||||
using ::testing::ElementsAre;
|
||||
using ::testing::ElementsAreArray;
|
||||
using ::testing::IsEmpty;
|
||||
using ::testing::SizeIs;
|
||||
using ::testing::TestWithParam;
|
||||
using ::testing::Values;
|
||||
|
||||
|
||||
@ -30,7 +30,6 @@ namespace {
|
||||
using ::testing::_;
|
||||
using ::testing::Args;
|
||||
using ::testing::ElementsAreArray;
|
||||
using ::testing::Return;
|
||||
|
||||
using test::fec::AugmentedPacket;
|
||||
using Packet = ForwardErrorCorrection::Packet;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user