Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
a8340452
Unverified
Commit
a8340452
authored
Jan 10, 2021
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fix warnings
parent
e1607490
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
86 deletions
+62
-86
include/nlohmann/detail/value_t.hpp
include/nlohmann/detail/value_t.hpp
+1
-1
include/nlohmann/json.hpp
include/nlohmann/json.hpp
+7
-7
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+8
-8
test/src/unit-json_patch.cpp
test/src/unit-json_patch.cpp
+46
-70
No files found.
include/nlohmann/detail/value_t.hpp
View file @
a8340452
...
...
@@ -32,7 +32,7 @@ number_float), because the library distinguishes these three types for numbers:
@ref basic_json::number_float_t is used for floating-point numbers or to
approximate integers which do not fit in the limits of their respective type.
@sa @ref basic_json::basic_json(const value_t value_type) -- create a JSON
@sa
see
@ref basic_json::basic_json(const value_t value_type) -- create a JSON
value with the default value for a given type
@since version 1.0.0
...
...
include/nlohmann/json.hpp
View file @
a8340452
...
...
@@ -5746,7 +5746,7 @@ class basic_json
iterator
result
=
insert_iterator
(
pos
,
cnt
,
val
);
for
(
size_type
i
=
0
;
i
<
cnt
;
++
i
)
{
(
result
+
i
)
->
m_parent
=
this
;
(
result
+
static_cast
<
typename
iterator
::
difference_type
>
(
i
)
)
->
m_parent
=
this
;
}
return
result
;
#else
...
...
@@ -5815,7 +5815,7 @@ class basic_json
// insert to array and return iterator
#if JSON_DIAGNOSTICS
iterator
result
=
insert_iterator
(
pos
,
first
.
m_it
.
array_iterator
,
last
.
m_it
.
array_iterator
);
for
(
std
::
size_t
i
=
0
;
i
<
std
::
distance
(
first
,
last
);
++
i
)
for
(
typename
iterator
::
difference_type
i
=
0
;
i
<
std
::
distance
(
first
,
last
);
++
i
)
{
(
result
+
i
)
->
m_parent
=
this
;
}
...
...
@@ -5869,7 +5869,7 @@ class basic_json
iterator
result
=
insert_iterator
(
pos
,
ilist
.
begin
(),
ilist
.
end
());
for
(
std
::
size_t
i
=
0
;
i
<
size
;
++
i
)
{
(
result
+
i
)
->
m_parent
=
this
;
(
result
+
static_cast
<
typename
iterator
::
difference_type
>
(
i
)
)
->
m_parent
=
this
;
}
return
result
;
#else
...
...
@@ -8391,7 +8391,7 @@ class basic_json
};
// wrapper for "add" operation; add value at ptr
const
auto
operation_add
=
[
this
,
&
result
](
json_pointer
&
ptr
,
basic_json
val
)
const
auto
operation_add
=
[
&
result
](
json_pointer
&
ptr
,
basic_json
val
)
{
// adding to the root of the target document means replacing it
if
(
ptr
.
empty
())
...
...
@@ -8489,9 +8489,9 @@ class basic_json
for
(
const
auto
&
val
:
json_patch
)
{
// wrapper to get a value for an operation
const
auto
get_value
=
[
this
,
&
val
](
const
std
::
string
&
op
,
const
std
::
string
&
member
,
bool
string_type
)
->
basic_json
&
const
auto
get_value
=
[
&
val
](
const
std
::
string
&
op
,
const
std
::
string
&
member
,
bool
string_type
)
->
basic_json
&
{
// find value
auto
it
=
val
.
m_value
.
object
->
find
(
member
);
...
...
single_include/nlohmann/json.hpp
View file @
a8340452
...
...
@@ -113,7 +113,7 @@ number_float), because the library distinguishes these three types for numbers:
@ref basic_json::number_float_t is used for floating-point numbers or to
approximate integers which do not fit in the limits of their respective type.
@sa @ref basic_json::basic_json(const value_t value_type) -- create a JSON
@sa
see
@ref basic_json::basic_json(const value_t value_type) -- create a JSON
value with the default value for a given type
@since version 1.0.0
...
...
@@ -22490,7 +22490,7 @@ class basic_json
iterator
result
=
insert_iterator
(
pos
,
cnt
,
val
);
for
(
size_type
i
=
0
;
i
<
cnt
;
++
i
)
{
(
result
+
i
)
->
m_parent
=
this
;
(
result
+
static_cast
<
typename
iterator
::
difference_type
>
(
i
)
)
->
m_parent
=
this
;
}
return
result
;
#else
...
...
@@ -22559,7 +22559,7 @@ class basic_json
// insert to array and return iterator
#if JSON_DIAGNOSTICS
iterator
result
=
insert_iterator
(
pos
,
first
.
m_it
.
array_iterator
,
last
.
m_it
.
array_iterator
);
for
(
std
::
size_t
i
=
0
;
i
<
std
::
distance
(
first
,
last
);
++
i
)
for
(
typename
iterator
::
difference_type
i
=
0
;
i
<
std
::
distance
(
first
,
last
);
++
i
)
{
(
result
+
i
)
->
m_parent
=
this
;
}
...
...
@@ -22613,7 +22613,7 @@ class basic_json
iterator
result
=
insert_iterator
(
pos
,
ilist
.
begin
(),
ilist
.
end
());
for
(
std
::
size_t
i
=
0
;
i
<
size
;
++
i
)
{
(
result
+
i
)
->
m_parent
=
this
;
(
result
+
static_cast
<
typename
iterator
::
difference_type
>
(
i
)
)
->
m_parent
=
this
;
}
return
result
;
#else
...
...
@@ -25135,7 +25135,7 @@ class basic_json
};
// wrapper for "add" operation; add value at ptr
const
auto
operation_add
=
[
this
,
&
result
](
json_pointer
&
ptr
,
basic_json
val
)
const
auto
operation_add
=
[
&
result
](
json_pointer
&
ptr
,
basic_json
val
)
{
// adding to the root of the target document means replacing it
if
(
ptr
.
empty
())
...
...
@@ -25233,9 +25233,9 @@ class basic_json
for
(
const
auto
&
val
:
json_patch
)
{
// wrapper to get a value for an operation
const
auto
get_value
=
[
this
,
&
val
](
const
std
::
string
&
op
,
const
std
::
string
&
member
,
bool
string_type
)
->
basic_json
&
const
auto
get_value
=
[
&
val
](
const
std
::
string
&
op
,
const
std
::
string
&
member
,
bool
string_type
)
->
basic_json
&
{
// find value
auto
it
=
val
.
m_value
.
object
->
find
(
member
);
...
...
test/src/unit-json_patch.cpp
View file @
a8340452
This diff is collapsed.
Click to expand it.
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