Merge pull request #444 from ya1gaurav/patch-35

Supporting GCC 6.0

Resolves #411.
This commit is contained in:
Christopher Dunn 2016-03-15 19:23:17 -05:00
commit e29b671ed5
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ static inline bool InRange(double d, T min, U max) {
}
#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
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) {

View File

@ -39,7 +39,7 @@ static inline double uint64ToDouble(Json::UInt64 value) {
#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
static inline double uint64ToDouble(Json::UInt64 value) {
return static_cast<double>(Json::Int64(value / 2)) * 2.0 +
Json::Int64(value & 1);
static_cast<double>(Json::Int64(value & 1));
}
#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)