Skip to content

Commit

Permalink
Issue 1021: Fix clang 10 compilation (open-source-parsers#1023)
Browse files Browse the repository at this point in the history
This patch fixes an implicit long to double conversion, fixing
compilation on the as-of-yet unreleased clang v10.
  • Loading branch information
baylesj authored Sep 16, 2019
1 parent 3013ed4 commit 18f790f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib_json/json_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 18f790f

Please sign in to comment.