🚨 fix compiler warnings

parent 104c5c19
...@@ -128,6 +128,19 @@ class iter_impl ...@@ -128,6 +128,19 @@ class iter_impl
iter_impl(const iter_impl<const BasicJsonType>& other) noexcept iter_impl(const iter_impl<const BasicJsonType>& other) noexcept
: m_object(other.m_object), m_it(other.m_it) {} : 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 @brief converting constructor
@param[in] other non-const iterator to copy from @param[in] other non-const iterator to copy from
...@@ -138,7 +151,7 @@ class iter_impl ...@@ -138,7 +151,7 @@ class iter_impl
/*! /*!
@brief converting assignment @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 @return const/non-const iterator
@note It is not checked whether @a other is initialized. @note It is not checked whether @a other is initialized.
*/ */
......
...@@ -1204,19 +1204,19 @@ class binary_writer ...@@ -1204,19 +1204,19 @@ class binary_writer
case value_t::number_unsigned: 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'; 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'; 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'; 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'; return 'l';
} }
......
...@@ -7831,6 +7831,19 @@ class iter_impl ...@@ -7831,6 +7831,19 @@ class iter_impl
iter_impl(const iter_impl<const BasicJsonType>& other) noexcept iter_impl(const iter_impl<const BasicJsonType>& other) noexcept
: m_object(other.m_object), m_it(other.m_it) {} : 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 @brief converting constructor
@param[in] other non-const iterator to copy from @param[in] other non-const iterator to copy from
...@@ -7841,7 +7854,7 @@ class iter_impl ...@@ -7841,7 +7854,7 @@ class iter_impl
/*! /*!
@brief converting assignment @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 @return const/non-const iterator
@note It is not checked whether @a other is initialized. @note It is not checked whether @a other is initialized.
*/ */
...@@ -10872,19 +10885,19 @@ class binary_writer ...@@ -10872,19 +10885,19 @@ class binary_writer
case value_t::number_unsigned: 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'; 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'; 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'; 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'; return 'l';
} }
......
...@@ -1808,4 +1808,4 @@ template <typename T> class object {}; ...@@ -1808,4 +1808,4 @@ template <typename T> class object {};
template <typename T> class string {}; template <typename T> class string {};
template <typename T> class number_integer {}; template <typename T> class number_integer {};
template <typename T> class number_unsigned {}; template <typename T> class number_unsigned {};
template <typename T> class number_float {}; template <typename T> class number_float {};
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment