mirror of
https://github.com/nlohmann/json.git
synced 2025-07-25 13:41:56 +03:00
🚨 removing compiler warnings #755
This commit is contained in:
@ -62,7 +62,7 @@ SOFTWARE.
|
||||
#if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400
|
||||
#error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers"
|
||||
#endif
|
||||
#elif defined(__GNUC__)
|
||||
#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER))
|
||||
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900
|
||||
#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
|
||||
#endif
|
||||
@ -6320,7 +6320,7 @@ class serializer
|
||||
*/
|
||||
static constexpr std::size_t bytes_following(const uint8_t u)
|
||||
{
|
||||
return ((0 <= u and u <= 127) ? 0
|
||||
return ((u <= 127) ? 0
|
||||
: ((192 <= u and u <= 223) ? 1
|
||||
: ((224 <= u and u <= 239) ? 2
|
||||
: ((240 <= u and u <= 247) ? 3 : std::string::npos))));
|
||||
@ -6660,7 +6660,7 @@ class serializer
|
||||
return;
|
||||
}
|
||||
|
||||
const bool is_negative = x < 0;
|
||||
const auto is_negative = std::signbit(x);
|
||||
std::size_t i = 0;
|
||||
|
||||
// spare 1 byte for '\0'
|
||||
@ -9759,7 +9759,7 @@ class basic_json
|
||||
, "incompatible pointer type");
|
||||
|
||||
// delegate the call to get_impl_ptr<>() const
|
||||
return get_impl_ptr(static_cast<const PointerType>(nullptr));
|
||||
return get_impl_ptr(static_cast<PointerType>(nullptr));
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Reference in New Issue
Block a user