remove superfluous test
This commit is contained in:
@ -371,7 +371,7 @@ double ValueTokenizer::next_double()
|
|||||||
char *end;
|
char *end;
|
||||||
auto val = std::strtod(current.c_str(), &end);
|
auto val = std::strtod(current.c_str(), &end);
|
||||||
// return value of denormal
|
// return value of denormal
|
||||||
if ((val != 0.0) && (val > -HUGE_VAL) && (val < HUGE_VAL)) return val;
|
if ((val > -HUGE_VAL) && (val < HUGE_VAL)) return val;
|
||||||
throw InvalidFloatException(current);
|
throw InvalidFloatException(current);
|
||||||
} catch (std::invalid_argument const &) {
|
} catch (std::invalid_argument const &) {
|
||||||
throw InvalidFloatException(current);
|
throw InvalidFloatException(current);
|
||||||
|
|||||||
@ -557,7 +557,7 @@ double utils::numeric(const char *file, int line, const std::string &str, bool d
|
|||||||
char *end;
|
char *end;
|
||||||
rv = std::strtod(buf.c_str(), &end);
|
rv = std::strtod(buf.c_str(), &end);
|
||||||
// return value if denormal
|
// return value if denormal
|
||||||
if ((rv != 0.0) && (rv > -HUGE_VAL) && (rv < HUGE_VAL)) return rv;
|
if ((rv > -HUGE_VAL) && (rv < HUGE_VAL)) return rv;
|
||||||
|
|
||||||
msg = fmt::format("Floating point number {} in input script or data file is out of range", buf);
|
msg = fmt::format("Floating point number {} in input script or data file is out of range", buf);
|
||||||
if (do_abort)
|
if (do_abort)
|
||||||
|
|||||||
Reference in New Issue
Block a user