mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-02-24 15:26:51 +01:00
Value::removeMember moves the existing value to "removed" now
This commit is contained in:
parent
edb4bdb7ec
commit
c27936e0aa
@ -1186,7 +1186,11 @@ bool Value::removeMember(const char* key, const char* cend, Value* removed)
|
||||
ObjectValues::iterator it = value_.map_->find(actualKey);
|
||||
if (it == value_.map_->end())
|
||||
return false;
|
||||
#if JSON_HAS_RVALUE_REFERENCES
|
||||
*removed = std::move(it->second);
|
||||
#else
|
||||
*removed = it->second;
|
||||
#endif
|
||||
value_.map_->erase(it);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user