Skip to content

Commit e29b671

Browse files
committed
Merge pull request #444 from ya1gaurav/patch-35
Supporting GCC 6.0 Resolves #411.
2 parents 75570d7 + fbe1cf3 commit e29b671

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/lib_json/json_value.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static inline bool InRange(double d, T min, U max) {
6262
}
6363
#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
6464
static inline double integerToDouble(Json::UInt64 value) {
65-
return static_cast<double>(Int64(value / 2)) * 2.0 + Int64(value & 1);
65+
return static_cast<double>(Int64(value / 2)) * 2.0 + static_cast<double>(Int64(value & 1));
6666
}
6767

6868
template <typename T> static inline double integerToDouble(T value) {

Diff for: src/test_lib_json/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static inline double uint64ToDouble(Json::UInt64 value) {
3939
#else // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
4040
static inline double uint64ToDouble(Json::UInt64 value) {
4141
return static_cast<double>(Json::Int64(value / 2)) * 2.0 +
42-
Json::Int64(value & 1);
42+
static_cast<double>(Json::Int64(value & 1));
4343
}
4444
#endif // if !defined(JSON_USE_INT64_DOUBLE_CONVERSION)
4545

0 commit comments

Comments
 (0)