提交 323930ca authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Remove ununsed variable and use references.

上级 62adee13
......@@ -38,7 +38,7 @@ tap.test('room.Peer() without peerName must fail', { timeout: 2000 }, (t) =>
room.Peer();
},
TypeError,
'room.Peer()) must throw TypeError');
'room.Peer() must throw TypeError');
t.end();
});
......
......@@ -204,20 +204,18 @@ namespace RTC
void RtpParameters::ValidateEncodings()
{
uint8_t firstMediaPayloadType;
bool hasFirstMediaPayloadType = false;
{
auto it = this->codecs.begin();
for (; it != this->codecs.end(); ++it)
{
auto codec = *it;
auto& codec = *it;
// Must be a media codec.
if (codec.mime.IsMediaCodec())
{
firstMediaPayloadType = codec.payloadType;
hasFirstMediaPayloadType = true;
break;
}
......@@ -239,7 +237,7 @@ namespace RTC
this->encodings.push_back(encoding);
}
// Otherwise iterate all the encodings, set the first payloadType in all of them
// with codecPayloadType unset, and check that others point to a media codec.
// with `codecPayloadType` unset, and check that others point to a media codec.
else
{
for (auto& encoding : this->encodings)
......
......@@ -196,7 +196,7 @@ namespace RTC
for (; it != rtpParameters->encodings.end(); ++it)
{
auto encoding = *it;
auto& encoding = *it;
if (
!encoding.ssrc ||
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论