🚨 fix compiler warnings
This commit is contained in:
parent
104c5c1996
commit
b17440c12f
4 changed files with 37 additions and 11 deletions
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue