Provide proper constructor for SerializeContext

Deprecate constructor that depends on deprecated declarations.
This commit is contained in:
Gioacchino Mazzurco 2018-06-09 17:59:11 +02:00
parent 48c4b4c4f8
commit 9886840b79
No known key found for this signature in database
GPG Key ID: A1FBCA3872E87051

View File

@ -225,6 +225,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) :