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

RtpStream.cpp: Fix wrong std::round() usage (fixes #423)

上级 b45315a4
......@@ -274,7 +274,7 @@ namespace RTC
// clang-tidy "thinks" that this can lead to division by zero but we are
// smarter.
// NOLINTNEXTLINE(clang-analyzer-core.DivideZero)
this->score = static_cast<uint8_t>(std::round(totalScore / samples));
this->score = static_cast<uint8_t>(std::round(static_cast<float>(totalScore) / samples));
// Call the listener if the global score has changed.
if (this->score != previousScore)
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论