Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
30e1cbb0
Unverified
Commit
30e1cbb0
authored
Nov 08, 2018
by
Niels Lohmann
Committed by
GitHub
Nov 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1346 from ax3l/fix-mergePatchShadowParam
Fix merge_patch shadow warning
parents
d2e6e1bf
798754df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
json.hpp
include/nlohmann/json.hpp
+5
-5
json.hpp
single_include/nlohmann/json.hpp
+5
-5
No files found.
include/nlohmann/json.hpp
View file @
30e1cbb0
...
@@ -7851,7 +7851,7 @@ class basic_json
...
@@ -7851,7 +7851,7 @@ class basic_json
Thereby, `Target` is the current object; that is, the patch is applied to
Thereby, `Target` is the current object; that is, the patch is applied to
the current value.
the current value.
@param[in] patch the patch to apply
@param[in]
apply_
patch the patch to apply
@complexity Linear in the lengths of @a patch.
@complexity Linear in the lengths of @a patch.
...
@@ -7863,15 +7863,15 @@ class basic_json
...
@@ -7863,15 +7863,15 @@ class basic_json
@since version 3.0.0
@since version 3.0.0
*/
*/
void
merge_patch
(
const
basic_json
&
patch
)
void
merge_patch
(
const
basic_json
&
apply_
patch
)
{
{
if
(
patch
.
is_object
())
if
(
apply_
patch
.
is_object
())
{
{
if
(
not
is_object
())
if
(
not
is_object
())
{
{
*
this
=
object
();
*
this
=
object
();
}
}
for
(
auto
it
=
patch
.
begin
();
it
!=
patch
.
end
();
++
it
)
for
(
auto
it
=
apply_patch
.
begin
();
it
!=
apply_
patch
.
end
();
++
it
)
{
{
if
(
it
.
value
().
is_null
())
if
(
it
.
value
().
is_null
())
{
{
...
@@ -7885,7 +7885,7 @@ class basic_json
...
@@ -7885,7 +7885,7 @@ class basic_json
}
}
else
else
{
{
*
this
=
patch
;
*
this
=
apply_
patch
;
}
}
}
}
...
...
single_include/nlohmann/json.hpp
View file @
30e1cbb0
...
@@ -20113,7 +20113,7 @@ class basic_json
...
@@ -20113,7 +20113,7 @@ class basic_json
Thereby, `Target` is the current object; that is, the patch is applied to
Thereby, `Target` is the current object; that is, the patch is applied to
the current value.
the current value.
@param[in] patch the patch to apply
@param[in]
apply_
patch the patch to apply
@complexity Linear in the lengths of @a patch.
@complexity Linear in the lengths of @a patch.
...
@@ -20125,15 +20125,15 @@ class basic_json
...
@@ -20125,15 +20125,15 @@ class basic_json
@since version 3.0.0
@since version 3.0.0
*/
*/
void
merge_patch
(
const
basic_json
&
patch
)
void
merge_patch
(
const
basic_json
&
apply_
patch
)
{
{
if
(
patch
.
is_object
())
if
(
apply_
patch
.
is_object
())
{
{
if
(
not
is_object
())
if
(
not
is_object
())
{
{
*
this
=
object
();
*
this
=
object
();
}
}
for
(
auto
it
=
patch
.
begin
();
it
!=
patch
.
end
();
++
it
)
for
(
auto
it
=
apply_patch
.
begin
();
it
!=
apply_
patch
.
end
();
++
it
)
{
{
if
(
it
.
value
().
is_null
())
if
(
it
.
value
().
is_null
())
{
{
...
@@ -20147,7 +20147,7 @@ class basic_json
...
@@ -20147,7 +20147,7 @@ class basic_json
}
}
else
else
{
{
*
this
=
patch
;
*
this
=
apply_
patch
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment