mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
merged upstream/master
This commit is contained in:
commit
6848a586f3
94 changed files with 1618 additions and 758 deletions
|
@ -222,6 +222,13 @@ struct RsGenericSerializer : RsSerialType
|
|||
/** Allow shared allocator usage to avoid costly JSON deepcopy for
|
||||
* nested RsSerializable */
|
||||
SerializeContext(
|
||||
uint8_t *data, uint32_t size,
|
||||
SerializationFlags flags = SERIALIZATION_FLAG_NONE,
|
||||
RsJson::AllocatorType* allocator = nullptr) :
|
||||
mData(data), mSize(size), mOffset(0), mOk(true), mFlags(flags),
|
||||
mJson(rapidjson::kObjectType, allocator) {}
|
||||
|
||||
RS_DEPRECATED SerializeContext(
|
||||
uint8_t *data, uint32_t size, SerializationFormat format,
|
||||
SerializationFlags flags,
|
||||
RsJson::AllocatorType* allocator = nullptr) :
|
||||
|
|
|
@ -288,8 +288,8 @@ bool RsTypeSerializer::from_JSON( const std::string& memberName,
|
|||
uint64_t& member, RsJson& jDoc )
|
||||
{
|
||||
SAFE_GET_JSON_V();
|
||||
ret = ret && v.IsUint();
|
||||
if(ret) member = v.GetUint();
|
||||
ret = ret && v.IsUint64();
|
||||
if(ret) member = v.GetUint64();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue