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
b17440c1
Unverified
Commit
b17440c1
authored
Jul 12, 2019
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fix compiler warnings
parent
104c5c19
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
11 deletions
+37
-11
include/nlohmann/detail/iterators/iter_impl.hpp
include/nlohmann/detail/iterators/iter_impl.hpp
+14
-1
include/nlohmann/detail/output/binary_writer.hpp
include/nlohmann/detail/output/binary_writer.hpp
+4
-4
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+18
-5
test/src/unit-regression.cpp
test/src/unit-regression.cpp
+1
-1
No files found.
include/nlohmann/detail/iterators/iter_impl.hpp
View file @
b17440c1
...
...
@@ -128,6 +128,19 @@ class iter_impl
iter_impl
(
const
iter_impl
<
const
BasicJsonType
>&
other
)
noexcept
:
m_object
(
other
.
m_object
),
m_it
(
other
.
m_it
)
{}
/*!
@brief converting assignment
@param[in] other const iterator to copy from
@return const/non-const iterator
@note It is not checked whether @a other is initialized.
*/
iter_impl
&
operator
=
(
const
iter_impl
<
const
BasicJsonType
>&
other
)
noexcept
{
m_object
=
other
.
m_object
;
m_it
=
other
.
m_it
;
return
*
this
;
}
/*!
@brief converting constructor
@param[in] other non-const iterator to copy from
...
...
@@ -138,7 +151,7 @@ class iter_impl
/*!
@brief converting assignment
@param[in
,out
] other non-const iterator to copy from
@param[in] other non-const iterator to copy from
@return const/non-const iterator
@note It is not checked whether @a other is initialized.
*/
...
...
include/nlohmann/detail/output/binary_writer.hpp
View file @
b17440c1
...
...
@@ -1204,19 +1204,19 @@ class binary_writer
case
value_t
:
:
number_unsigned
:
{
if
(
j
.
m_value
.
number_unsigned
<=
(
std
::
numeric_limits
<
std
::
int8_t
>::
max
)(
))
if
(
j
.
m_value
.
number_unsigned
<=
static_cast
<
std
::
uint64_t
>
((
std
::
numeric_limits
<
std
::
int8_t
>::
max
)()
))
{
return
'i'
;
}
if
(
j
.
m_value
.
number_unsigned
<=
(
std
::
numeric_limits
<
std
::
uint8_t
>::
max
)(
))
if
(
j
.
m_value
.
number_unsigned
<=
static_cast
<
std
::
uint64_t
>
((
std
::
numeric_limits
<
std
::
uint8_t
>::
max
)()
))
{
return
'U'
;
}
if
(
j
.
m_value
.
number_unsigned
<=
(
std
::
numeric_limits
<
std
::
int16_t
>::
max
)(
))
if
(
j
.
m_value
.
number_unsigned
<=
static_cast
<
std
::
uint64_t
>
((
std
::
numeric_limits
<
std
::
int16_t
>::
max
)()
))
{
return
'I'
;
}
if
(
j
.
m_value
.
number_unsigned
<=
(
std
::
numeric_limits
<
std
::
int32_t
>::
max
)(
))
if
(
j
.
m_value
.
number_unsigned
<=
static_cast
<
std
::
uint64_t
>
((
std
::
numeric_limits
<
std
::
int32_t
>::
max
)()
))
{
return
'l'
;
}
...
...
single_include/nlohmann/json.hpp
View file @
b17440c1
...
...
@@ -7831,6 +7831,19 @@ class iter_impl
iter_impl
(
const
iter_impl
<
const
BasicJsonType
>&
other
)
noexcept
:
m_object
(
other
.
m_object
),
m_it
(
other
.
m_it
)
{}
/*!
@brief converting assignment
@param[in] other const iterator to copy from
@return const/non-const iterator
@note It is not checked whether @a other is initialized.
*/
iter_impl
&
operator
=
(
const
iter_impl
<
const
BasicJsonType
>&
other
)
noexcept
{
m_object
=
other
.
m_object
;
m_it
=
other
.
m_it
;
return
*
this
;
}
/*!
@brief converting constructor
@param[in] other non-const iterator to copy from
...
...
@@ -7841,7 +7854,7 @@ class iter_impl
/*!
@brief converting assignment
@param[in
,out
] other non-const iterator to copy from
@param[in] other non-const iterator to copy from
@return const/non-const iterator
@note It is not checked whether @a other is initialized.
*/
...
...
@@ -10872,19 +10885,19 @@ class binary_writer
case
value_t
:
:
number_unsigned
:
{
if
(
j
.
m_value
.
number_unsigned
<=
(
std
::
numeric_limits
<
std
::
int8_t
>::
max
)(
))
if
(
j
.
m_value
.
number_unsigned
<=
static_cast
<
std
::
uint64_t
>
((
std
::
numeric_limits
<
std
::
int8_t
>::
max
)()
))
{
return
'i'
;
}
if
(
j
.
m_value
.
number_unsigned
<=
(
std
::
numeric_limits
<
std
::
uint8_t
>::
max
)(
))
if
(
j
.
m_value
.
number_unsigned
<=
static_cast
<
std
::
uint64_t
>
((
std
::
numeric_limits
<
std
::
uint8_t
>::
max
)()
))
{
return
'U'
;
}
if
(
j
.
m_value
.
number_unsigned
<=
(
std
::
numeric_limits
<
std
::
int16_t
>::
max
)(
))
if
(
j
.
m_value
.
number_unsigned
<=
static_cast
<
std
::
uint64_t
>
((
std
::
numeric_limits
<
std
::
int16_t
>::
max
)()
))
{
return
'I'
;
}
if
(
j
.
m_value
.
number_unsigned
<=
(
std
::
numeric_limits
<
std
::
int32_t
>::
max
)(
))
if
(
j
.
m_value
.
number_unsigned
<=
static_cast
<
std
::
uint64_t
>
((
std
::
numeric_limits
<
std
::
int32_t
>::
max
)()
))
{
return
'l'
;
}
...
...
test/src/unit-regression.cpp
View file @
b17440c1
...
...
@@ -1808,4 +1808,4 @@ template <typename T> class object {};
template
<
typename
T
>
class
string
{};
template
<
typename
T
>
class
number_integer
{};
template
<
typename
T
>
class
number_unsigned
{};
template
<
typename
T
>
class
number_float
{};
\ No newline at end of file
template
<
typename
T
>
class
number_float
{};
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