mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 07:14:45 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
15949af098 | ||
![]() |
8dc52b3cca | ||
![]() |
add941c1a9 |
@@ -171,7 +171,7 @@ private:
|
||||
CZString(const char* cstr, DuplicationPolicy allocate);
|
||||
CZString(const CZString& other);
|
||||
~CZString();
|
||||
CZString& operator=(CZString other);
|
||||
CZString &operator=(const CZString &other);
|
||||
bool operator<(const CZString& other) const;
|
||||
bool operator==(const CZString& other) const;
|
||||
ArrayIndex index() const;
|
||||
@@ -238,7 +238,7 @@ Json::Value obj_value(Json::objectValue); // {}
|
||||
Value(const Value& other);
|
||||
~Value();
|
||||
|
||||
Value& operator=(Value other);
|
||||
Value &operator=(const Value &other);
|
||||
/// Swap values.
|
||||
/// \note Currently, comments are intentionally not swapped, for
|
||||
/// both logic and efficiency.
|
||||
|
@@ -188,8 +188,9 @@ void Value::CZString::swap(CZString& other) {
|
||||
std::swap(index_, other.index_);
|
||||
}
|
||||
|
||||
Value::CZString& Value::CZString::operator=(CZString other) {
|
||||
swap(other);
|
||||
Value::CZString &Value::CZString::operator=(const CZString &other) {
|
||||
CZString temp(other);
|
||||
swap(temp);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -478,8 +479,9 @@ Value::~Value() {
|
||||
delete[] comments_;
|
||||
}
|
||||
|
||||
Value& Value::operator=(Value other) {
|
||||
swap(other);
|
||||
Value &Value::operator=(const Value &other) {
|
||||
Value temp(other);
|
||||
swap(temp);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user