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
a711e1f5
Unverified
Commit
a711e1f5
authored
Jul 13, 2021
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fix warnings
parent
3bb94670
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
include/nlohmann/json.hpp
include/nlohmann/json.hpp
+3
-2
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+3
-2
No files found.
include/nlohmann/json.hpp
View file @
a711e1f5
...
...
@@ -1304,10 +1304,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
return
it
;
}
reference
set_parent
(
reference
j
,
std
::
size_t
old_capacity
=
-
1
)
reference
set_parent
(
reference
j
,
std
::
size_t
old_capacity
=
std
::
size_t
(
-
1
)
)
{
#if JSON_DIAGNOSTICS
if
(
old_capacity
!=
-
1
)
if
(
old_capacity
!=
std
::
size_t
(
-
1
)
)
{
// see https://github.com/nlohmann/json/issues/2838
JSON_ASSERT
(
type
()
==
value_t
::
array
);
...
...
@@ -1322,6 +1322,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
j
.
m_parent
=
this
;
#else
static_cast
<
void
>
(
j
);
static_cast
<
void
>
(
old_capacity
);
#endif
return
j
;
}
...
...
single_include/nlohmann/json.hpp
View file @
a711e1f5
...
...
@@ -18339,10 +18339,10 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
return
it
;
}
reference
set_parent
(
reference
j
,
std
::
size_t
old_capacity
=
-
1
)
reference
set_parent
(
reference
j
,
std
::
size_t
old_capacity
=
std
::
size_t
(
-
1
)
)
{
#if JSON_DIAGNOSTICS
if
(
old_capacity
!=
-
1
)
if
(
old_capacity
!=
std
::
size_t
(
-
1
)
)
{
// see https://github.com/nlohmann/json/issues/2838
JSON_ASSERT
(
type
()
==
value_t
::
array
);
...
...
@@ -18357,6 +18357,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
j
.
m_parent
=
this
;
#else
static_cast
<
void
>
(
j
);
static_cast
<
void
>
(
old_capacity
);
#endif
return
j
;
}
...
...
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