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
16c5bfea
Unverified
Commit
16c5bfea
authored
Apr 02, 2018
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
👌
fixed compiler warnings #1031
parent
727dd466
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
include/nlohmann/detail/input/input_adapters.hpp
include/nlohmann/detail/input/input_adapters.hpp
+4
-7
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+4
-7
No files found.
include/nlohmann/detail/input/input_adapters.hpp
View file @
16c5bfea
...
...
@@ -168,9 +168,6 @@ class input_buffer_adapter : public input_adapter_protocol
template
<
typename
WideStringType
>
class
wide_string_input_adapter
:
public
input_adapter_protocol
{
private:
using
char_t
=
typename
WideStringType
::
value_type
;
public:
wide_string_input_adapter
(
const
WideStringType
&
w
)
:
str
(
w
)
{}
...
...
@@ -186,7 +183,7 @@ class wide_string_input_adapter : public input_adapter_protocol
// check if buffer needs to be filled
if
(
utf8_bytes_index
==
utf8_bytes_filled
)
{
if
(
sizeof
(
char_t
)
==
2
)
if
(
sizeof
(
typename
WideStringType
::
value_type
)
==
2
)
{
fill_buffer_utf16
();
}
...
...
@@ -223,7 +220,7 @@ class wide_string_input_adapter : public input_adapter_protocol
else
{
// get the current character
const
char_t
wc
=
str
[
current_wchar
++
]
;
const
int
wc
=
static_cast
<
int
>
(
str
[
current_wchar
++
])
;
// UTF-16 to UTF-8 encoding
if
(
wc
<
0x80
)
...
...
@@ -248,7 +245,7 @@ class wide_string_input_adapter : public input_adapter_protocol
{
if
(
current_wchar
<
str
.
size
())
{
const
char_t
wc2
=
str
[
current_wchar
++
]
;
const
int
wc2
=
static_cast
<
int
>
(
str
[
current_wchar
++
])
;
const
int
charcode
=
0x10000
+
(((
wc
&
0x3FF
)
<<
10
)
|
(
wc2
&
0x3FF
));
utf8_bytes
[
0
]
=
0xf0
|
(
charcode
>>
18
);
utf8_bytes
[
1
]
=
0x80
|
((
charcode
>>
12
)
&
0x3F
);
...
...
@@ -279,7 +276,7 @@ class wide_string_input_adapter : public input_adapter_protocol
else
{
// get the current character
const
char_t
wc
=
str
[
current_wchar
++
]
;
const
int
wc
=
static_cast
<
int
>
(
str
[
current_wchar
++
])
;
// UTF-32 to UTF-8 encoding
if
(
wc
<
0x80
)
...
...
single_include/nlohmann/json.hpp
View file @
16c5bfea
...
...
@@ -1741,9 +1741,6 @@ class input_buffer_adapter : public input_adapter_protocol
template
<
typename
WideStringType
>
class
wide_string_input_adapter
:
public
input_adapter_protocol
{
private:
using
char_t
=
typename
WideStringType
::
value_type
;
public:
wide_string_input_adapter
(
const
WideStringType
&
w
)
:
str
(
w
)
{}
...
...
@@ -1759,7 +1756,7 @@ class wide_string_input_adapter : public input_adapter_protocol
// check if buffer needs to be filled
if
(
utf8_bytes_index
==
utf8_bytes_filled
)
{
if
(
sizeof
(
char_t
)
==
2
)
if
(
sizeof
(
typename
WideStringType
::
value_type
)
==
2
)
{
fill_buffer_utf16
();
}
...
...
@@ -1796,7 +1793,7 @@ class wide_string_input_adapter : public input_adapter_protocol
else
{
// get the current character
const
char_t
wc
=
str
[
current_wchar
++
]
;
const
int
wc
=
static_cast
<
int
>
(
str
[
current_wchar
++
])
;
// UTF-16 to UTF-8 encoding
if
(
wc
<
0x80
)
...
...
@@ -1821,7 +1818,7 @@ class wide_string_input_adapter : public input_adapter_protocol
{
if
(
current_wchar
<
str
.
size
())
{
const
char_t
wc2
=
str
[
current_wchar
++
]
;
const
int
wc2
=
static_cast
<
int
>
(
str
[
current_wchar
++
])
;
const
int
charcode
=
0x10000
+
(((
wc
&
0x3FF
)
<<
10
)
|
(
wc2
&
0x3FF
));
utf8_bytes
[
0
]
=
0xf0
|
(
charcode
>>
18
);
utf8_bytes
[
1
]
=
0x80
|
((
charcode
>>
12
)
&
0x3F
);
...
...
@@ -1852,7 +1849,7 @@ class wide_string_input_adapter : public input_adapter_protocol
else
{
// get the current character
const
char_t
wc
=
str
[
current_wchar
++
]
;
const
int
wc
=
static_cast
<
int
>
(
str
[
current_wchar
++
])
;
// UTF-32 to UTF-8 encoding
if
(
wc
<
0x80
)
...
...
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