maths: prefer brace value initialisation for almost_equal<int>

This is more likely to catch future issues with lossy transforms.
This commit is contained in:
Danny Robson 2020-04-06 13:12:52 +10:00
parent 4a556af89d
commit b8d0d50c6a

View File

@ -106,7 +106,7 @@ namespace cruft {
std::is_signed_v<ValueA> == std::is_signed_v<ValueB>)
{
using common_t = std::common_type_t<ValueA,ValueB>;
return static_cast<common_t> (a) == static_cast<common_t> (b);
return common_t {a} == common_t {b};
} else {
return equal (a, b);
}