提交 ed18a6f0 编写于 作者: A Alexey Milovidov

A fix in appreciation of UBSan

上级 27f0b932
......@@ -128,6 +128,9 @@ public:
/// Then divide the area to the area of rectangle.
if (count_positive == 0 || count_positive == size)
return std::numeric_limits<ResultType>::quiet_NaN();
return ResultType(area) / count_positive / (size - count_positive);
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册