Skip to content

Commit 28b7eb7

Browse files
committed
Issue 1021: Fix clang 10 compilation
This patch fixes an implicit long to double conversion, fixing compilation on the as-of-yet unreleased clang v10.
1 parent 2cb9a58 commit 28b7eb7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/lib_json/json_value.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ template <typename T, typename U>
9494
static inline bool InRange(double d, T min, U max) {
9595
// The casts can lose precision, but we are looking only for
9696
// an approximate range. Might fail on edge cases though. ~cdunn
97-
// return d >= static_cast<double>(min) && d <= static_cast<double>(max);
98-
return d >= min && d <= max;
97+
return d >= static_cast<double>(min) && d <= static_cast<double>(max);
9998
}
10099
#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
101100
static inline double integerToDouble(Json::UInt64 value) {

0 commit comments

Comments
 (0)