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
609a0046
Unverified
Commit
609a0046
authored
Jul 11, 2020
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
♻
replace further alternative operators
parent
d7a2956b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
input_adapters.hpp
include/nlohmann/detail/input/input_adapters.hpp
+2
-2
lexer.hpp
include/nlohmann/detail/input/lexer.hpp
+1
-1
json.hpp
single_include/nlohmann/json.hpp
+3
-3
No files found.
include/nlohmann/detail/input/input_adapters.hpp
View file @
609a0046
...
@@ -260,7 +260,7 @@ struct wide_string_input_helper<BaseInputAdapter, 2>
...
@@ -260,7 +260,7 @@ struct wide_string_input_helper<BaseInputAdapter, 2>
}
}
else
else
{
{
if
(
JSON_HEDLEY_UNLIKELY
(
not
input
.
empty
()))
if
(
JSON_HEDLEY_UNLIKELY
(
!
input
.
empty
()))
{
{
const
auto
wc2
=
static_cast
<
unsigned
int
>
(
input
.
get_character
());
const
auto
wc2
=
static_cast
<
unsigned
int
>
(
input
.
get_character
());
const
auto
charcode
=
0x10000u
+
(((
static_cast
<
unsigned
int
>
(
wc
)
&
0x3FFu
)
<<
10u
)
|
(
wc2
&
0x3FFu
));
const
auto
charcode
=
0x10000u
+
(((
static_cast
<
unsigned
int
>
(
wc
)
&
0x3FFu
)
<<
10u
)
|
(
wc2
&
0x3FFu
));
...
@@ -404,7 +404,7 @@ using contiguous_bytes_input_adapter = decltype(input_adapter(std::declval<const
...
@@ -404,7 +404,7 @@ using contiguous_bytes_input_adapter = decltype(input_adapter(std::declval<const
template
<
typename
CharT
,
template
<
typename
CharT
,
typename
std
::
enable_if
<
typename
std
::
enable_if
<
std
::
is_pointer
<
CharT
>::
value
&&
std
::
is_pointer
<
CharT
>::
value
&&
not
std
::
is_array
<
CharT
>::
value
&&
!
std
::
is_array
<
CharT
>::
value
&&
std
::
is_integral
<
typename
std
::
remove_pointer
<
CharT
>::
type
>::
value
&&
std
::
is_integral
<
typename
std
::
remove_pointer
<
CharT
>::
type
>::
value
&&
sizeof
(
typename
std
::
remove_pointer
<
CharT
>::
type
)
==
1
,
sizeof
(
typename
std
::
remove_pointer
<
CharT
>::
type
)
==
1
,
int
>::
type
=
0
>
int
>::
type
=
0
>
...
...
include/nlohmann/detail/input/lexer.hpp
View file @
609a0046
...
@@ -1513,7 +1513,7 @@ scan_number_done:
...
@@ -1513,7 +1513,7 @@ scan_number_done:
// ignore comments
// ignore comments
if
(
ignore_comments
&&
current
==
'/'
)
if
(
ignore_comments
&&
current
==
'/'
)
{
{
if
(
not
scan_comment
())
if
(
!
scan_comment
())
{
{
return
token_type
::
parse_error
;
return
token_type
::
parse_error
;
}
}
...
...
single_include/nlohmann/json.hpp
View file @
609a0046
...
@@ -4688,7 +4688,7 @@ struct wide_string_input_helper<BaseInputAdapter, 2>
...
@@ -4688,7 +4688,7 @@ struct wide_string_input_helper<BaseInputAdapter, 2>
}
}
else
else
{
{
if
(
JSON_HEDLEY_UNLIKELY
(
not
input
.
empty
()))
if
(
JSON_HEDLEY_UNLIKELY
(
!
input
.
empty
()))
{
{
const
auto
wc2
=
static_cast
<
unsigned
int
>
(
input
.
get_character
());
const
auto
wc2
=
static_cast
<
unsigned
int
>
(
input
.
get_character
());
const
auto
charcode
=
0x10000u
+
(((
static_cast
<
unsigned
int
>
(
wc
)
&
0x3FFu
)
<<
10u
)
|
(
wc2
&
0x3FFu
));
const
auto
charcode
=
0x10000u
+
(((
static_cast
<
unsigned
int
>
(
wc
)
&
0x3FFu
)
<<
10u
)
|
(
wc2
&
0x3FFu
));
...
@@ -4832,7 +4832,7 @@ using contiguous_bytes_input_adapter = decltype(input_adapter(std::declval<const
...
@@ -4832,7 +4832,7 @@ using contiguous_bytes_input_adapter = decltype(input_adapter(std::declval<const
template
<
typename
CharT
,
template
<
typename
CharT
,
typename
std
::
enable_if
<
typename
std
::
enable_if
<
std
::
is_pointer
<
CharT
>::
value
&&
std
::
is_pointer
<
CharT
>::
value
&&
not
std
::
is_array
<
CharT
>::
value
&&
!
std
::
is_array
<
CharT
>::
value
&&
std
::
is_integral
<
typename
std
::
remove_pointer
<
CharT
>::
type
>::
value
&&
std
::
is_integral
<
typename
std
::
remove_pointer
<
CharT
>::
type
>::
value
&&
sizeof
(
typename
std
::
remove_pointer
<
CharT
>::
type
)
==
1
,
sizeof
(
typename
std
::
remove_pointer
<
CharT
>::
type
)
==
1
,
int
>::
type
=
0
>
int
>::
type
=
0
>
...
@@ -9584,7 +9584,7 @@ scan_number_done:
...
@@ -9584,7 +9584,7 @@ scan_number_done:
// ignore comments
// ignore comments
if
(
ignore_comments
&&
current
==
'/'
)
if
(
ignore_comments
&&
current
==
'/'
)
{
{
if
(
not
scan_comment
())
if
(
!
scan_comment
())
{
{
return
token_type
::
parse_error
;
return
token_type
::
parse_error
;
}
}
...
...
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