Merge pull request #725 from coderextreme/master

Added GenericValue(unsigned long) to document.h
pull/726/head
Kim Kulling 2015-12-18 13:16:02 +01:00
commit 8a037124a8
1 changed files with 13 additions and 0 deletions

View File

@ -545,6 +545,19 @@ public:
flags_ |= kIntFlag;
}
#if defined(__APPLE__)
//! Constructor for unsigned long value.
explicit GenericValue(unsigned long u64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUint64Flag) {
data_.n.u64 = u64;
if (!(u64 & RAPIDJSON_UINT64_C2(0x80000000, 0x00000000)))
flags_ |= kInt64Flag;
if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x00000000)))
flags_ |= kUintFlag;
if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
flags_ |= kIntFlag;
}
#endif
//! Constructor for double value.
explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberDoubleFlag) { data_.n.d = d; }