diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 5c77dbe..2f6bb2a 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -791,8 +791,8 @@ public: // Checks whether a number can be losslessly converted to a double. bool IsLosslessDouble() const { if (!IsNumber()) return false; - if (IsUint64()) return static_cast(static_cast(GetUint64())) == GetUint64(); - if (IsInt64()) return static_cast< int64_t>(static_cast(GetInt64())) == GetInt64(); + if (IsUint64()) return static_cast(static_cast(GetUint64())) == GetUint64(); + if (IsInt64()) return static_cast(static_cast(GetInt64())) == GetInt64(); return true; // double, int, uint are always lossless }