rapidjson: add apple-specific constructor with size_t.
parent
22f7f60ba0
commit
43be58bbfe
|
@ -513,19 +513,12 @@ public:
|
||||||
flags_ |= kUintFlag | kUint64Flag;
|
flags_ |= kUintFlag | kUint64Flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Constructor for size_t value.
|
|
||||||
explicit GenericValue( size_t u ) RAPIDJSON_NOEXCEPT : data_(), flags_( kNumberUintFlag ) {
|
|
||||||
data_.n.u64 = u;
|
|
||||||
if ( !( u&0x80000000 ) )
|
|
||||||
flags_ |= kIntFlag|kInt64Flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Constructor for unsigned value.
|
//! Constructor for unsigned value.
|
||||||
/* explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUintFlag) {
|
explicit GenericValue(unsigned u) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberUintFlag) {
|
||||||
data_.n.u64 = u;
|
data_.n.u64 = u;
|
||||||
if (!(u & 0x80000000))
|
if (!(u & 0x80000000))
|
||||||
flags_ |= kIntFlag | kInt64Flag;
|
flags_ |= kIntFlag | kInt64Flag;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
//! Constructor for int64_t value.
|
//! Constructor for int64_t value.
|
||||||
explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberInt64Flag) {
|
explicit GenericValue(int64_t i64) RAPIDJSON_NOEXCEPT : data_(), flags_(kNumberInt64Flag) {
|
||||||
|
@ -563,6 +556,13 @@ public:
|
||||||
if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
|
if (!(u64 & RAPIDJSON_UINT64_C2(0xFFFFFFFF, 0x80000000)))
|
||||||
flags_ |= kIntFlag;
|
flags_ |= kIntFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Constructor for size_t value.
|
||||||
|
explicit GenericValue( size_t u ) RAPIDJSON_NOEXCEPT : data_(), flags_( kNumberUintFlag ) {
|
||||||
|
data_.n.u64 = u;
|
||||||
|
if ( !( u&0x80000000 ) )
|
||||||
|
flags_ |= kIntFlag|kInt64Flag;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! Constructor for double value.
|
//! Constructor for double value.
|
||||||
|
|
Loading…
Reference in New Issue