提交 4b376672 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Make clang-tidy happy

上级 d101226b
...@@ -599,14 +599,14 @@ namespace RTC ...@@ -599,14 +599,14 @@ namespace RTC
} }
} }
void Consumer::OnRtpStreamDied(RtpStream* stream) void Consumer::OnRtpStreamDied(RtpStream* rtpStream)
{ {
MS_TRACE(); MS_TRACE();
OnRtpStreamUnhealthy(stream); OnRtpStreamUnhealthy(rtpStream);
} }
void Consumer::OnRtpStreamHealthy(RtpStream* /*stream*/) void Consumer::OnRtpStreamHealthy(RtpStream* /*rtpStream*/)
{ {
MS_TRACE(); MS_TRACE();
...@@ -634,7 +634,7 @@ namespace RTC ...@@ -634,7 +634,7 @@ namespace RTC
RTC::RtpEncodingParameters::profile2String[this->targetProfile].c_str()); RTC::RtpEncodingParameters::profile2String[this->targetProfile].c_str());
} }
void Consumer::OnRtpStreamUnhealthy(RtpStream* /*stream*/) void Consumer::OnRtpStreamUnhealthy(RtpStream* /*rtpStream*/)
{ {
MS_TRACE(); MS_TRACE();
...@@ -883,16 +883,12 @@ namespace RTC ...@@ -883,16 +883,12 @@ namespace RTC
{ {
// New profile higher or equal than the one being probed. Do not upgrade. // New profile higher or equal than the one being probed. Do not upgrade.
if (newTargetProfile >= this->probingProfile) if (newTargetProfile >= this->probingProfile)
{
return; return;
}
// New profile lower than the one begin probed. Stop probation. // New profile lower than the one begin probed. Stop probation.
else this->isProbing = false;
{ this->probingProfile = RTC::RtpEncodingParameters::Profile::NONE;
this->isProbing = false; this->targetProfile = newTargetProfile;
this->probingProfile = RTC::RtpEncodingParameters::Profile::NONE;
this->targetProfile = newTargetProfile;
}
} }
// New profile is higher than current target. // New profile is higher than current target.
else if (newTargetProfile > this->targetProfile) else if (newTargetProfile > this->targetProfile)
......
...@@ -16,8 +16,7 @@ namespace RTC ...@@ -16,8 +16,7 @@ namespace RTC
/* Instance methods. */ /* Instance methods. */
IceServer::IceServer(Listener* listener, const std::string& usernameFragment, const std::string& password) IceServer::IceServer(Listener* listener, const std::string& usernameFragment, const std::string& password)
: listener(listener), usernameFragment(std::move(usernameFragment)), : listener(listener), usernameFragment(usernameFragment), password(password)
password(std::move(password))
{ {
MS_TRACE(); MS_TRACE();
......
...@@ -176,7 +176,7 @@ namespace RTC ...@@ -176,7 +176,7 @@ namespace RTC
MS_TRACE(); MS_TRACE();
// Mirror RTP if needed. // Mirror RTP if needed.
if (this->mirrorTuple && this->mirroringOptions.rtp) if (this->mirrorTuple != nullptr && this->mirroringOptions.rtp)
this->mirrorTuple->Send(data, len); this->mirrorTuple->Send(data, len);
RTC::RtpPacket* packet = RTC::RtpPacket::Parse(data, len); RTC::RtpPacket* packet = RTC::RtpPacket::Parse(data, len);
...@@ -229,7 +229,7 @@ namespace RTC ...@@ -229,7 +229,7 @@ namespace RTC
MS_TRACE(); MS_TRACE();
// Mirror RTCP if needed. // Mirror RTCP if needed.
if (this->mirrorTuple && this->mirroringOptions.rtcp) if (this->mirrorTuple != nullptr && this->mirroringOptions.rtcp)
this->mirrorTuple->Send(data, len); this->mirrorTuple->Send(data, len);
RTC::RTCP::Packet* packet = RTC::RTCP::Packet::Parse(data, len); RTC::RTCP::Packet* packet = RTC::RTCP::Packet::Parse(data, len);
......
...@@ -352,11 +352,10 @@ namespace RTC ...@@ -352,11 +352,10 @@ namespace RTC
break; break;
} }
// Packet is already stored. // Packet is already stored.
else if (packetSeq == currentSeq) if (packetSeq == currentSeq)
{
return; return;
}
} }
// The packet was older than anything in the buffer, store it at the beginning. // The packet was older than anything in the buffer, store it at the beginning.
......
...@@ -72,7 +72,7 @@ namespace RTC ...@@ -72,7 +72,7 @@ namespace RTC
int err; int err;
if (this->mirrorTuple) if (this->mirrorTuple != nullptr)
MS_THROW_ERROR("Transport is already mirroring"); MS_THROW_ERROR("Transport is already mirroring");
switch (Utils::IP::GetFamily(options.remoteIP)) switch (Utils::IP::GetFamily(options.remoteIP))
...@@ -129,7 +129,7 @@ namespace RTC ...@@ -129,7 +129,7 @@ namespace RTC
{ {
delete this->mirrorTuple; delete this->mirrorTuple;
if (this->mirrorSocket) if (this->mirrorSocket != nullptr)
this->mirrorSocket->Destroy(); this->mirrorSocket->Destroy();
this->mirrorTuple = nullptr; this->mirrorTuple = nullptr;
......
...@@ -695,7 +695,7 @@ namespace RTC ...@@ -695,7 +695,7 @@ namespace RTC
} }
// Mirror RTP if needed. // Mirror RTP if needed.
if (this->mirrorTuple && this->mirroringOptions.rtp) if (this->mirrorTuple != nullptr && this->mirroringOptions.rtp)
this->mirrorTuple->Send(data, len); this->mirrorTuple->Send(data, len);
RTC::RtpPacket* packet = RTC::RtpPacket::Parse(data, len); RTC::RtpPacket* packet = RTC::RtpPacket::Parse(data, len);
...@@ -787,7 +787,7 @@ namespace RTC ...@@ -787,7 +787,7 @@ namespace RTC
return; return;
// Mirror RTCP if needed. // Mirror RTCP if needed.
if (this->mirrorTuple && this->mirroringOptions.rtcp) if (this->mirrorTuple != nullptr && this->mirroringOptions.rtcp)
this->mirrorTuple->Send(data, len); this->mirrorTuple->Send(data, len);
RTC::RTCP::Packet* packet = RTC::RTCP::Packet::Parse(data, len); RTC::RTCP::Packet* packet = RTC::RTCP::Packet::Parse(data, len);
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论