提交 86f7d7f4 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Remove some unneeded brackets

上级 f13f1dc2
......@@ -62,7 +62,7 @@ if __name__ == '__main__':
if sys.platform == 'win32':
args.append(os.path.join(root, 'mediasoup-worker.gyp'))
common_fn = os.path.join(root, 'common.gypi')
# we force vs 2010 over 2008 which would otherwise be the default for gyp
# we force vs 2010 over 2008 which would otherwise be the default for gyp.
if not os.environ.get('GYP_MSVS_VERSION'):
os.environ['GYP_MSVS_VERSION'] = '2010'
else:
......
......@@ -76,27 +76,19 @@ namespace RTC
// No packet was sent. Consider lost and repaired packets though.
if (sentPackets == 0)
{
sentPackets = (currentLoss > repairedPacketCount) ? currentLoss : repairedPacketCount;
}
// Nothing to do.
if (sentPackets == 0)
{
return;
}
// There cannot be more loss than sent packets.
if (currentLoss > sentPackets)
{
currentLoss = sentPackets;
}
// There cannot be more repaired than sent packets.
if (repairedPacketCount > sentPackets)
{
repairedPacketCount = sentPackets;
}
float lossPercentage = currentLoss * 100 / sentPackets;
float repairedPercentage = repairedPacketCount * 100 / sentPackets;
......@@ -160,9 +152,7 @@ namespace RTC
MS_TRACE();
if (this->scores.size() == HistogramLength)
{
this->scores.erase(this->scores.begin());
}
this->scores.push_back(score);
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论