diff --git a/test_conformance/conversions/conversions_data_info.h b/test_conformance/conversions/conversions_data_info.h index b02773b1..8440c2c7 100644 --- a/test_conformance/conversions/conversions_data_info.h +++ b/test_conformance/conversions/conversions_data_info.h @@ -150,13 +150,13 @@ DataInfoSpec::DataInfoSpec(const DataInitInfo &agg) else if (std::is_same::value) ranges = std::make_pair(CL_LONG_MIN, CL_LONG_MAX); - InType outMin = ((InType)ranges.first); - InType outMax = ((InType)ranges.second); - // clang-format off // for readability sake keep this section unformatted if (std::is_floating_point::value) { // from float/double + InType outMin = static_cast(ranges.first); + InType outMax = static_cast(ranges.second); + InType eps = std::is_same::value ? (InType) FLT_EPSILON : (InType) DBL_EPSILON; if (std::is_integral::value) { // to char/uchar/short/ushort/int/uint/long/ulong