Added shallow copy constructors for Json_Array and Json_Object && Added a float type constructor for Json_Value && Fixed the incorrect indentation issue when pretty-printing an empty Json_Array.
This commit is contained in:
@@ -54,6 +54,8 @@ public:
|
||||
// 列表构造
|
||||
Json_Arry(std::initializer_list<Json_Value> init_list) : private_element_list(init_list) {};
|
||||
Json_Arry(std::vector<Json_Value> init_list) : private_element_list(init_list) {};
|
||||
// 浅拷贝构造
|
||||
Json_Arry(const Json_Arry &temp);
|
||||
|
||||
// 深拷贝
|
||||
Json_Arry &operator=(const Json_Arry &another);
|
||||
@@ -101,6 +103,7 @@ public:
|
||||
Json_Value(int64_t num_integer);
|
||||
Json_Value(int num_integer) : Json_Value((int64_t)num_integer) {};
|
||||
Json_Value(double num_float);
|
||||
Json_Value(float num_float) : Json_Value((double)num_float) {};
|
||||
Json_Value(bool boolean);
|
||||
// 浅拷贝构造
|
||||
Json_Value(const Json_Value &temp);
|
||||
@@ -165,6 +168,8 @@ public:
|
||||
// 列表构造
|
||||
Json_Object(std::initializer_list<Json_Pair> init_list) : private_element_list(init_list) {};
|
||||
Json_Object(std::vector<Json_Pair> init_list) : private_element_list(init_list) {};
|
||||
// 浅拷贝构造
|
||||
Json_Object(const Json_Object &temp);
|
||||
|
||||
// 深拷贝
|
||||
Json_Object &operator=(const Json_Object &another);
|
||||
|
||||
Reference in New Issue
Block a user