mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-12 18:10:27 +01:00
Issue 1021: Fix clang 10 compilation (#1023)
This patch fixes an implicit long to double conversion, fixing compilation on the as-of-yet unreleased clang v10.
This commit is contained in:
parent
3013ed48b3
commit
18f790fbe7
@ -94,8 +94,7 @@ template <typename T, typename U>
|
||||
static inline bool InRange(double d, T min, U max) {
|
||||
// The casts can lose precision, but we are looking only for
|
||||
// an approximate range. Might fail on edge cases though. ~cdunn
|
||||
// return d >= static_cast<double>(min) && d <= static_cast<double>(max);
|
||||
return d >= min && d <= max;
|
||||
return d >= static_cast<double>(min) && d <= static_cast<double>(max);
|
||||
}
|
||||
#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
|
||||
static inline double integerToDouble(Json::UInt64 value) {
|
||||
|
Loading…
Reference in New Issue
Block a user