fixed a shadow error

This commit is contained in:
Niels committed 2016-05-11 18:43:12 +02:00
1 parent db5c9ec9ba
commit f1e61896fb
2 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -9659,7 +9659,7 @@ basic_json_parser_63:
@since version 2.0.0 @since version 2.0.0
*/ */
basic_json patch(const basic_json& patch) const basic_json patch(const basic_json& json_patch) const
{ {
// make a working copy to apply the patch to // make a working copy to apply the patch to
basic_json result = *this; basic_json result = *this;
@@ -9790,14 +9790,14 @@ basic_json_parser_63:
}; };
// type check // type check
if (not patch.is_array()) if (not json_patch.is_array())
{ {
// a JSON patch must be an array of objects // a JSON patch must be an array of objects
throw std::invalid_argument("JSON patch must be an array of objects"); throw std::invalid_argument("JSON patch must be an array of objects");
} }
// iterate and apply th eoperations // iterate and apply th eoperations
for (const auto& val : patch) for (const auto& val : json_patch)
{ {
// wrapper to get a value for an operation // wrapper to get a value for an operation
const auto get_value = [&val](const std::string & op, const auto get_value = [&val](const std::string & op,
+3 -3
View File
@@ -8969,7 +8969,7 @@ class basic_json
@since version 2.0.0 @since version 2.0.0
*/ */
basic_json patch(const basic_json& patch) const basic_json patch(const basic_json& json_patch) const
{ {
// make a working copy to apply the patch to // make a working copy to apply the patch to
basic_json result = *this; basic_json result = *this;
@@ -9100,14 +9100,14 @@ class basic_json
}; };
// type check // type check
if (not patch.is_array()) if (not json_patch.is_array())
{ {
// a JSON patch must be an array of objects // a JSON patch must be an array of objects
throw std::invalid_argument("JSON patch must be an array of objects"); throw std::invalid_argument("JSON patch must be an array of objects");
} }
// iterate and apply th eoperations // iterate and apply th eoperations
for (const auto& val : patch) for (const auto& val : json_patch)
{ {
// wrapper to get a value for an operation // wrapper to get a value for an operation
const auto get_value = [&val](const std::string & op, const auto get_value = [&val](const std::string & op,