Compare commits

...

3 Commits
0.8.2 ... 0.7.0

Author SHA1 Message Date
Christopher Dunn
15949af098 0.7.0 2014-11-20 08:48:22 -06:00
Christopher Dunn
8dc52b3cca 0.7.0 2014-11-20 00:18:47 -06:00
Christopher Dunn
add941c1a9 Revert "Switch to copy-and-swap idiom for operator=."
This reverts commit 45cd9490cd.

Ignored ValueInternal* changes, since those did not produce symbols for
Debian build. (They must not have used the INTERNAL stuff.)

  https://github.com/open-source-parsers/jsoncpp/issues/78

Conflicts:
	include/json/value.h
	src/lib_json/json_internalarray.inl
	src/lib_json/json_internalmap.inl
	src/lib_json/json_value.cpp
2014-11-17 00:16:39 -06:00
3 changed files with 9 additions and 7 deletions

View File

@@ -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.

View File

@@ -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;
}

View File

@@ -1 +1 @@
0.7.0
0.7.0