mirror of
https://github.com/nlohmann/json.git
synced 2025-07-28 12:02:00 +03:00
🚨 fix warning
This commit is contained in:
@ -162,7 +162,7 @@ struct static_const
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
inline constexpr std::array<T, sizeof...(Args)> make_array(Args&& ... args)
|
constexpr std::array<T, sizeof...(Args)> make_array(Args&& ... args)
|
||||||
{
|
{
|
||||||
return std::array<T, sizeof...(Args)> {{static_cast<T>(std::forward<Args>(args))...}};
|
return std::array<T, sizeof...(Args)> {{static_cast<T>(std::forward<Args>(args))...}};
|
||||||
}
|
}
|
||||||
|
@ -734,7 +734,7 @@ struct value_in_range_of_impl1<OfType, T, true>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename OfType, typename T>
|
template<typename OfType, typename T>
|
||||||
inline constexpr bool value_in_range_of(T val)
|
constexpr bool value_in_range_of(T val)
|
||||||
{
|
{
|
||||||
return value_in_range_of_impl1<OfType, T>::test(val);
|
return value_in_range_of_impl1<OfType, T>::test(val);
|
||||||
}
|
}
|
||||||
@ -750,7 +750,7 @@ namespace impl
|
|||||||
{
|
{
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline constexpr bool is_c_string()
|
constexpr bool is_c_string()
|
||||||
{
|
{
|
||||||
using TUnExt = typename std::remove_extent<T>::type;
|
using TUnExt = typename std::remove_extent<T>::type;
|
||||||
using TUnCVExt = typename std::remove_cv<TUnExt>::type;
|
using TUnCVExt = typename std::remove_cv<TUnExt>::type;
|
||||||
@ -778,7 +778,7 @@ namespace impl
|
|||||||
{
|
{
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline constexpr bool is_transparent()
|
constexpr bool is_transparent()
|
||||||
{
|
{
|
||||||
return is_detected<detect_is_transparent, T>::value;
|
return is_detected<detect_is_transparent, T>::value;
|
||||||
}
|
}
|
||||||
|
@ -643,7 +643,7 @@ class serializer
|
|||||||
@param[in] x unsigned integer number to count its digits
|
@param[in] x unsigned integer number to count its digits
|
||||||
@return number of decimal digits
|
@return number of decimal digits
|
||||||
*/
|
*/
|
||||||
inline unsigned int count_digits(number_unsigned_t x) noexcept
|
unsigned int count_digits(number_unsigned_t x) noexcept
|
||||||
{
|
{
|
||||||
unsigned int n_digits = 1;
|
unsigned int n_digits = 1;
|
||||||
for (;;)
|
for (;;)
|
||||||
@ -952,7 +952,7 @@ class serializer
|
|||||||
* absolute values of INT_MIN and INT_MAX are usually not the same. See
|
* absolute values of INT_MIN and INT_MAX are usually not the same. See
|
||||||
* #1708 for details.
|
* #1708 for details.
|
||||||
*/
|
*/
|
||||||
inline number_unsigned_t remove_sign(number_integer_t x) noexcept
|
number_unsigned_t remove_sign(number_integer_t x) noexcept
|
||||||
{
|
{
|
||||||
JSON_ASSERT(x < 0 && x < (std::numeric_limits<number_integer_t>::max)()); // NOLINT(misc-redundant-expression)
|
JSON_ASSERT(x < 0 && x < (std::numeric_limits<number_integer_t>::max)()); // NOLINT(misc-redundant-expression)
|
||||||
return static_cast<number_unsigned_t>(-(x + 1)) + 1;
|
return static_cast<number_unsigned_t>(-(x + 1)) + 1;
|
||||||
|
@ -3219,7 +3219,7 @@ struct static_const
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
inline constexpr std::array<T, sizeof...(Args)> make_array(Args&& ... args)
|
constexpr std::array<T, sizeof...(Args)> make_array(Args&& ... args)
|
||||||
{
|
{
|
||||||
return std::array<T, sizeof...(Args)> {{static_cast<T>(std::forward<Args>(args))...}};
|
return std::array<T, sizeof...(Args)> {{static_cast<T>(std::forward<Args>(args))...}};
|
||||||
}
|
}
|
||||||
@ -4147,7 +4147,7 @@ struct value_in_range_of_impl1<OfType, T, true>
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename OfType, typename T>
|
template<typename OfType, typename T>
|
||||||
inline constexpr bool value_in_range_of(T val)
|
constexpr bool value_in_range_of(T val)
|
||||||
{
|
{
|
||||||
return value_in_range_of_impl1<OfType, T>::test(val);
|
return value_in_range_of_impl1<OfType, T>::test(val);
|
||||||
}
|
}
|
||||||
@ -4163,7 +4163,7 @@ namespace impl
|
|||||||
{
|
{
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline constexpr bool is_c_string()
|
constexpr bool is_c_string()
|
||||||
{
|
{
|
||||||
using TUnExt = typename std::remove_extent<T>::type;
|
using TUnExt = typename std::remove_extent<T>::type;
|
||||||
using TUnCVExt = typename std::remove_cv<TUnExt>::type;
|
using TUnCVExt = typename std::remove_cv<TUnExt>::type;
|
||||||
@ -4191,7 +4191,7 @@ namespace impl
|
|||||||
{
|
{
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
inline constexpr bool is_transparent()
|
constexpr bool is_transparent()
|
||||||
{
|
{
|
||||||
return is_detected<detect_is_transparent, T>::value;
|
return is_detected<detect_is_transparent, T>::value;
|
||||||
}
|
}
|
||||||
@ -18652,7 +18652,7 @@ class serializer
|
|||||||
@param[in] x unsigned integer number to count its digits
|
@param[in] x unsigned integer number to count its digits
|
||||||
@return number of decimal digits
|
@return number of decimal digits
|
||||||
*/
|
*/
|
||||||
inline unsigned int count_digits(number_unsigned_t x) noexcept
|
unsigned int count_digits(number_unsigned_t x) noexcept
|
||||||
{
|
{
|
||||||
unsigned int n_digits = 1;
|
unsigned int n_digits = 1;
|
||||||
for (;;)
|
for (;;)
|
||||||
@ -18961,7 +18961,7 @@ class serializer
|
|||||||
* absolute values of INT_MIN and INT_MAX are usually not the same. See
|
* absolute values of INT_MIN and INT_MAX are usually not the same. See
|
||||||
* #1708 for details.
|
* #1708 for details.
|
||||||
*/
|
*/
|
||||||
inline number_unsigned_t remove_sign(number_integer_t x) noexcept
|
number_unsigned_t remove_sign(number_integer_t x) noexcept
|
||||||
{
|
{
|
||||||
JSON_ASSERT(x < 0 && x < (std::numeric_limits<number_integer_t>::max)()); // NOLINT(misc-redundant-expression)
|
JSON_ASSERT(x < 0 && x < (std::numeric_limits<number_integer_t>::max)()); // NOLINT(misc-redundant-expression)
|
||||||
return static_cast<number_unsigned_t>(-(x + 1)) + 1;
|
return static_cast<number_unsigned_t>(-(x + 1)) + 1;
|
||||||
|
Reference in New Issue
Block a user