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
ec95438a
Unverified
Commit
ec95438a
authored
Oct 06, 2018
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fixed some linter warnings
parent
f1768a54
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
include/nlohmann/detail/conversions/to_json.hpp
include/nlohmann/detail/conversions/to_json.hpp
+1
-1
include/nlohmann/detail/input/lexer.hpp
include/nlohmann/detail/input/lexer.hpp
+1
-1
include/nlohmann/detail/json_pointer.hpp
include/nlohmann/detail/json_pointer.hpp
+2
-2
include/nlohmann/detail/output/serializer.hpp
include/nlohmann/detail/output/serializer.hpp
+1
-1
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+5
-5
No files found.
include/nlohmann/detail/conversions/to_json.hpp
View file @
ec95438a
...
...
@@ -306,7 +306,7 @@ void to_json(BasicJsonType& j, const std::pair<Args...>& p)
// for https://github.com/nlohmann/json/pull/1134
template
<
typename
BasicJsonType
,
typename
T
,
enable_if_t
<
std
::
is_same
<
T
,
typename
iteration_proxy
<
typename
BasicJsonType
::
iterator
>
::
iteration_proxy_internal
>
::
value
,
int
>
=
0
>
void
to_json
(
BasicJsonType
&
j
,
T
b
)
noexcept
void
to_json
(
BasicJsonType
&
j
,
const
T
&
b
)
{
j
=
{{
b
.
key
(),
b
.
value
()}};
}
...
...
include/nlohmann/detail/input/lexer.hpp
View file @
ec95438a
...
...
@@ -709,7 +709,7 @@ class lexer
locale's decimal point is used instead of `.` to work with the
locale-dependent converters.
*/
token_type
scan_number
()
token_type
scan_number
()
// lgtm [cpp/use-of-goto]
{
// reset token_buffer to store the number's bytes
reset
();
...
...
include/nlohmann/detail/json_pointer.hpp
View file @
ec95438a
...
...
@@ -506,11 +506,11 @@ class json_pointer
std
::
size_t
slash
=
reference_string
.
find_first_of
(
'/'
,
1
),
// set the beginning of the first reference token
start
=
1
;
// we can stop if start ==
string::npos+1 = 0
// we can stop if start ==
0 (if slash == std::string::npos)
start
!=
0
;
// set the beginning of the next reference token
// (will eventually be 0 if slash == std::string::npos)
start
=
slash
+
1
,
start
=
(
slash
==
std
::
string
::
npos
)
?
0
:
slash
+
1
,
// find next slash
slash
=
reference_string
.
find_first_of
(
'/'
,
start
))
{
...
...
include/nlohmann/detail/output/serializer.hpp
View file @
ec95438a
...
...
@@ -442,7 +442,7 @@ class serializer
return
;
}
const
bool
is_negative
=
not
(
x
>=
0
);
// see issue #755
const
bool
is_negative
=
std
::
is_same
<
NumberType
,
number_integer_t
>::
value
and
not
(
x
>=
0
);
// see issue #755
std
::
size_t
i
=
0
;
while
(
x
!=
0
)
...
...
single_include/nlohmann/json.hpp
View file @
ec95438a
...
...
@@ -1839,7 +1839,7 @@ void to_json(BasicJsonType& j, const std::pair<Args...>& p)
// for https://github.com/nlohmann/json/pull/1134
template
<
typename
BasicJsonType
,
typename
T
,
enable_if_t
<
std
::
is_same
<
T
,
typename
iteration_proxy
<
typename
BasicJsonType
::
iterator
>
::
iteration_proxy_internal
>
::
value
,
int
>
=
0
>
void
to_json
(
BasicJsonType
&
j
,
T
b
)
noexcept
void
to_json
(
BasicJsonType
&
j
,
const
T
&
b
)
{
j
=
{{
b
.
key
(),
b
.
value
()}};
}
...
...
@@ -2976,7 +2976,7 @@ class lexer
locale's decimal point is used instead of `.` to work with the
locale-dependent converters.
*/
token_type
scan_number
()
token_type
scan_number
()
// lgtm [cpp/use-of-goto]
{
// reset token_buffer to store the number's bytes
reset
();
...
...
@@ -10157,7 +10157,7 @@ class serializer
return
;
}
const
bool
is_negative
=
not
(
x
>=
0
);
// see issue #755
const
bool
is_negative
=
std
::
is_same
<
NumberType
,
number_integer_t
>::
value
and
not
(
x
>=
0
);
// see issue #755
std
::
size_t
i
=
0
;
while
(
x
!=
0
)
...
...
@@ -10922,11 +10922,11 @@ class json_pointer
std
::
size_t
slash
=
reference_string
.
find_first_of
(
'/'
,
1
),
// set the beginning of the first reference token
start
=
1
;
// we can stop if start ==
string::npos+1 = 0
// we can stop if start ==
0 (if slash == std::string::npos)
start
!=
0
;
// set the beginning of the next reference token
// (will eventually be 0 if slash == std::string::npos)
start
=
slash
+
1
,
start
=
(
slash
==
std
::
string
::
npos
)
?
0
:
slash
+
1
,
// find next slash
slash
=
reference_string
.
find_first_of
(
'/'
,
start
))
{
...
...
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