-
-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1394 from mavlink/fix-jsoncpp-android-ndk22
Fix jsoncpp Werror with NDK r22b
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp | ||
index 91d4802..62b9475 100644 | ||
--- a/src/lib_json/json_value.cpp | ||
+++ b/src/lib_json/json_value.cpp | ||
@@ -69,8 +69,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) { |