cwNumericConvert.h : Remove verification of double value vs d_min in numeric_convert().

This commit is contained in:
kevin 2021-08-15 15:57:54 -04:00
parent 7df957f4a9
commit df975da715

View File

@ -40,7 +40,7 @@ namespace cw
// and avoid the double conversion // and avoid the double conversion
double d_min = 0; // std::numeric_limits<DST_t>::min() return smallest positive number which then fails this test when 'src' is zero. double d_min = 0; // std::numeric_limits<DST_t>::min() return smallest positive number which then fails this test when 'src' is zero.
double d_max = std::numeric_limits<DST_t>::max(); double d_max = std::numeric_limits<DST_t>::max();
if( d_min <= (double)src && (double)src <= d_max ) if( (double)src <= d_max )
dst = src; dst = src;
else else
return cwLogError(kInvalidArgRC,"Numeric conversion failed. The source value is outside the range of the destination value. min:%f max:%f src:%f",d_min,d_max,(double)src ); return cwLogError(kInvalidArgRC,"Numeric conversion failed. The source value is outside the range of the destination value. min:%f max:%f src:%f",d_min,d_max,(double)src );