Supporting GCC 6.0

This patch is also needed to build success for GCC 6.0.
Refer issue - https://github.com/open-source-parsers/jsoncpp/issues/411
This commit is contained in:
Gaurav 2016-03-15 18:31:44 +05:30
parent 75570d7068
commit cf86c473a5

View File

@ -62,7 +62,7 @@ static inline bool InRange(double d, T min, U max) {
} }
#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION) #else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
static inline double integerToDouble(Json::UInt64 value) { static inline double integerToDouble(Json::UInt64 value) {
return static_cast<double>(Int64(value / 2)) * 2.0 + Int64(value & 1); return static_cast<double>(Int64(value / 2)) * 2.0 + static_cast<double>(Int64(value & 1));
} }
template <typename T> static inline double integerToDouble(T value) { template <typename T> static inline double integerToDouble(T value) {