mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-20 13:44:05 +08:00
Make Value copy constructor simplier
Helper private methods Value::dupPayload() and Value::dupMeta() are added. Value copy constructor doesn't attempt to delete its data first. * Value::dupPayload() duplicates a payload. * Value::dupMeta() duplicates comments and an offset position with a limit.
This commit is contained in:
@@ -606,7 +606,9 @@ Json::Value obj_value(Json::objectValue); // {}
|
||||
|
||||
private:
|
||||
void initBasic(ValueType type, bool allocated = false);
|
||||
void dupPayload(const Value& other);
|
||||
void releasePayload();
|
||||
void dupMeta(const Value& other);
|
||||
|
||||
Value& resolveReference(const char* key);
|
||||
Value& resolveReference(const char* key, const char* end);
|
||||
|
Reference in New Issue
Block a user