make clang-tidy happy.

This commit is contained in:
dhmemi 2023-09-15 15:22:49 +08:00 committed by Patrick Boettcher
parent a19d71ddcb
commit a33fe4bcdd

View File

@ -863,7 +863,7 @@ class numeric : public schema
// multipleOf - if the remainder of the division is 0 -> OK
bool violates_multiple_of(T x) const
{
if constexpr (std::is_floating_point_v<T>) {
if constexpr (std::is_floating_point<T>::value) {
auto multiple = x / multipleOf_.second;
auto error = std::abs((multiple - std::round(multiple)) * multipleOf_.second);
return error > std::numeric_limits<T>::epsilon();