From fa0427ca289ea82dffc4a93efb173dbdd3b3d692 Mon Sep 17 00:00:00 2001 From: carlsonsolutiondesign Date: Thu, 17 Dec 2015 12:16:25 -0500 Subject: [PATCH] Copies the GenericValue(uint64_t) to a GenericValue(unsigned long) for compilation on Mac OS X 10.11.2. Not compiled on Windows yet. Will have to reboot and install Visual Studio or equivalent to compile, so I'm hoping someone else can look at the code and merge for Windows and Linux. Thanks! --- contrib/rapidjson/include/rapidjson/document.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contrib/rapidjson/include/rapidjson/document.h b/contrib/rapidjson/include/rapidjson/document.h index 8c76faf54..45b270811 100644 --- a/contrib/rapidjson/include/rapidjson/document.h +++ b/contrib/rapidjson/include/rapidjson/document.h @@ -545,6 +545,17 @@ public: flags_ |= kIntFlag; } + //! 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; + } + //! Constructor for double value. explicit GenericValue(double d) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberDoubleFlag) { data_.n.d = d; }