Skip to content

Commit

Permalink
Try fixing unit test in release configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
miloyip committed Feb 12, 2016
1 parent 746a996 commit 58d8d9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/rapidjson/document.h
Expand Up @@ -791,8 +791,8 @@ class GenericValue {
// Checks whether a number can be losslessly converted to a double.
bool IsLosslessDouble() const {
if (!IsNumber()) return false;
if (IsUint64()) return static_cast<uint64_t>(static_cast<double>(GetUint64())) == GetUint64();
if (IsInt64()) return static_cast< int64_t>(static_cast<double>(GetInt64())) == GetInt64();
if (IsUint64()) return static_cast<volatile uint64_t>(static_cast<volatile double>(GetUint64())) == GetUint64();
if (IsInt64()) return static_cast<volatile int64_t>(static_cast<volatile double>(GetInt64())) == GetInt64();
return true; // double, int, uint are always lossless
}

Expand Down

0 comments on commit 58d8d9a

Please sign in to comment.