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
721a1a0b
Unverified
Commit
721a1a0b
authored
Apr 20, 2020
by
Niels Lohmann
Committed by
GitHub
Apr 20, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2051 from nlohmann/clang10warnings
Fix Clang compiler warnings
parents
f14a7d8a
4fb0795e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
include/nlohmann/detail/conversions/to_chars.hpp
include/nlohmann/detail/conversions/to_chars.hpp
+2
-2
include/nlohmann/detail/output/serializer.hpp
include/nlohmann/detail/output/serializer.hpp
+1
-2
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+3
-4
test/src/unit-deserialization.cpp
test/src/unit-deserialization.cpp
+1
-1
No files found.
include/nlohmann/detail/conversions/to_chars.hpp
View file @
721a1a0b
...
...
@@ -1006,7 +1006,7 @@ inline char* format_buffer(char* buf, int len, int decimal_exponent,
std
::
memmove
(
buf
+
(
static_cast
<
size_t
>
(
n
)
+
1
),
buf
+
n
,
static_cast
<
size_t
>
(
k
)
-
static_cast
<
size_t
>
(
n
));
buf
[
n
]
=
'.'
;
return
buf
+
(
static_cast
<
size_t
>
(
k
)
+
1
);
return
buf
+
(
static_cast
<
size_t
>
(
k
)
+
1
U
);
}
if
(
min_exp
<
n
and
n
<=
0
)
...
...
@@ -1018,7 +1018,7 @@ inline char* format_buffer(char* buf, int len, int decimal_exponent,
buf
[
0
]
=
'0'
;
buf
[
1
]
=
'.'
;
std
::
memset
(
buf
+
2
,
'0'
,
static_cast
<
size_t
>
(
-
n
));
return
buf
+
(
2
+
static_cast
<
size_t
>
(
-
n
)
+
k
);
return
buf
+
(
2
U
+
static_cast
<
size_t
>
(
-
n
)
+
static_cast
<
size_t
>
(
k
)
);
}
if
(
k
==
1
)
...
...
include/nlohmann/detail/output/serializer.hpp
View file @
721a1a0b
...
...
@@ -259,8 +259,7 @@ class serializer
{
dump_integer
(
*
i
);
o
->
write_character
(
','
);
int
index
=
i
-
val
.
m_value
.
binary
->
cbegin
();
if
(
index
%
16
==
0
)
if
(
std
::
distance
(
val
.
m_value
.
binary
->
cbegin
(),
i
)
%
16
==
0
)
{
o
->
write_character
(
'\n'
);
}
...
...
single_include/nlohmann/json.hpp
View file @
721a1a0b
...
...
@@ -14543,7 +14543,7 @@ inline char* format_buffer(char* buf, int len, int decimal_exponent,
std
::
memmove
(
buf
+
(
static_cast
<
size_t
>
(
n
)
+
1
),
buf
+
n
,
static_cast
<
size_t
>
(
k
)
-
static_cast
<
size_t
>
(
n
));
buf
[
n
]
=
'.'
;
return
buf
+
(
static_cast
<
size_t
>
(
k
)
+
1
);
return
buf
+
(
static_cast
<
size_t
>
(
k
)
+
1
U
);
}
if
(
min_exp
<
n
and
n
<=
0
)
...
...
@@ -14555,7 +14555,7 @@ inline char* format_buffer(char* buf, int len, int decimal_exponent,
buf
[
0
]
=
'0'
;
buf
[
1
]
=
'.'
;
std
::
memset
(
buf
+
2
,
'0'
,
static_cast
<
size_t
>
(
-
n
));
return
buf
+
(
2
+
static_cast
<
size_t
>
(
-
n
)
+
k
);
return
buf
+
(
2
U
+
static_cast
<
size_t
>
(
-
n
)
+
static_cast
<
size_t
>
(
k
)
);
}
if
(
k
==
1
)
...
...
@@ -14892,8 +14892,7 @@ class serializer
{
dump_integer
(
*
i
);
o
->
write_character
(
','
);
int
index
=
i
-
val
.
m_value
.
binary
->
cbegin
();
if
(
index
%
16
==
0
)
if
(
std
::
distance
(
val
.
m_value
.
binary
->
cbegin
(),
i
)
%
16
==
0
)
{
o
->
write_character
(
'\n'
);
}
...
...
test/src/unit-deserialization.cpp
View file @
721a1a0b
...
...
@@ -76,7 +76,7 @@ struct SaxEventLogger : public nlohmann::json_sax<json>
return
true
;
}
bool
binary
(
std
::
vector
<
std
::
uint8_t
>&
val
)
bool
binary
(
std
::
vector
<
std
::
uint8_t
>&
val
)
override
{
std
::
string
binary_contents
=
"binary("
;
std
::
string
comma_space
=
""
;
...
...
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