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:
parent
4a556af89d
commit
b8d0d50c6a
@ -106,7 +106,7 @@ namespace cruft {
|
|||||||
std::is_signed_v<ValueA> == std::is_signed_v<ValueB>)
|
std::is_signed_v<ValueA> == std::is_signed_v<ValueB>)
|
||||||
{
|
{
|
||||||
using common_t = std::common_type_t<ValueA,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 {
|
} else {
|
||||||
return equal (a, b);
|
return equal (a, b);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user