🚑 fixed compilation error

This commit is contained in:
Niels Lohmann 2018-10-07 21:34:40 +02:00
parent 3abb788139
commit 6e49d9f5ff
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
3 changed files with 18 additions and 22 deletions

View file

@ -104,9 +104,9 @@ class lexer
// delete because of pointer members
lexer(const lexer&) = delete;
lexer(lexer&&) noexcept = default;
lexer(lexer&&) = delete;
lexer& operator=(lexer&) = delete;
lexer& operator=(lexer&&) noexcept = default;
lexer& operator=(lexer&&) = delete;
~lexer() = default;
private:

View file

@ -53,8 +53,8 @@ class serializer
// delete because of pointer members
serializer(const serializer&) = delete;
serializer& operator=(const serializer&) = delete;
serializer(serializer&&) noexcept = default;
serializer& operator=(serializer&&) noexcept = default;
serializer(serializer&&) = delete;
serializer& operator=(serializer&&) = delete;
~serializer() = default;
/*!

View file

@ -2373,9 +2373,9 @@ class lexer
// delete because of pointer members
lexer(const lexer&) = delete;
lexer(lexer&&) noexcept = default;
lexer(lexer&&) = delete;
lexer& operator=(lexer&) = delete;
lexer& operator=(lexer&&) noexcept = default;
lexer& operator=(lexer&&) = delete;
~lexer() = default;
private:
@ -8510,23 +8510,21 @@ class binary_writer
{
return 'i';
}
else if ((std::numeric_limits<uint8_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<uint8_t>::max)())
if ((std::numeric_limits<uint8_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<uint8_t>::max)())
{
return 'U';
}
else if ((std::numeric_limits<int16_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<int16_t>::max)())
if ((std::numeric_limits<int16_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<int16_t>::max)())
{
return 'I';
}
else if ((std::numeric_limits<int32_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<int32_t>::max)())
if ((std::numeric_limits<int32_t>::min)() <= j.m_value.number_integer and j.m_value.number_integer <= (std::numeric_limits<int32_t>::max)())
{
return 'l';
}
else // no check and assume int64_t (see note above)
{
// no check and assume int64_t (see note above)
return 'L';
}
}
case value_t::number_unsigned:
{
@ -8534,23 +8532,21 @@ class binary_writer
{
return 'i';
}
else if (j.m_value.number_unsigned <= (std::numeric_limits<uint8_t>::max)())
if (j.m_value.number_unsigned <= (std::numeric_limits<uint8_t>::max)())
{
return 'U';
}
else if (j.m_value.number_unsigned <= (std::numeric_limits<int16_t>::max)())
if (j.m_value.number_unsigned <= (std::numeric_limits<int16_t>::max)())
{
return 'I';
}
else if (j.m_value.number_unsigned <= (std::numeric_limits<int32_t>::max)())
if (j.m_value.number_unsigned <= (std::numeric_limits<int32_t>::max)())
{
return 'l';
}
else // no check and assume int64_t (see note above)
{
// no check and assume int64_t (see note above)
return 'L';
}
}
case value_t::number_float:
return get_ubjson_float_prefix(j.m_value.number_float);
@ -9765,8 +9761,8 @@ class serializer
// delete because of pointer members
serializer(const serializer&) = delete;
serializer& operator=(const serializer&) = delete;
serializer(serializer&&) noexcept = default;
serializer& operator=(serializer&&) noexcept = default;
serializer(serializer&&) = delete;
serializer& operator=(serializer&&) = delete;
~serializer() = default;
/*!