mirror of
https://github.com/HowardHinnant/date.git
synced 2024-12-26 07:53:16 +08:00
static_cast to silent warning implict conversion (#693)
That happen because `sizeof(long long unsigned int) == sizeof(long double)` in 32-bit architectures.
This commit is contained in:
parent
d57d764707
commit
b0adc54677
@ -6405,7 +6405,7 @@ read_long_double(std::basic_istream<CharT, Traits>& is, unsigned m = 1, unsigned
|
||||
is.setstate(std::ios::failbit);
|
||||
return 0;
|
||||
}
|
||||
return i + f/std::pow(10.L, fcount);
|
||||
return static_cast<long double>(i) + static_cast<long double>(f)/std::pow(10.L, fcount);
|
||||
}
|
||||
|
||||
struct rs
|
||||
|
Loading…
x
Reference in New Issue
Block a user