From 1ec85c76a43872fde6a0c27ba5ba737a445724f1 Mon Sep 17 00:00:00 2001 From: Maxim Ky Date: Mon, 29 Jan 2018 16:59:24 +0300 Subject: [PATCH] Value::removeMember arg "removed" is optional now (could be nullptr) --- src/lib_json/json_value.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index 3a572ee..a3e6550 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -1186,10 +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 (removed) #if JSON_HAS_RVALUE_REFERENCES - *removed = std::move(it->second); + *removed = std::move(it->second); #else - *removed = it->second; + *removed = it->second; #endif value_.map_->erase(it); return true;