Merge branches 'binary_type' and 'develop' of https://github.com/nlohmann/json into binary_type

This commit is contained in:
Niels Lohmann committed 2020-05-17 12:27:58 +02:00
commit ab6e76dd05
18 files changed
+96 -38

No files matched your search

@@ -194,9 +194,9 @@ class binary_writer
}
else
{
if (j.m_value.number_float >= std::numeric_limits<float>::lowest() and
j.m_value.number_float <= std::numeric_limits<float>::max() and
static_cast<double>(static_cast<float>(j.m_value.number_float)) == j.m_value.number_float)
if (static_cast<double>(j.m_value.number_float) >= static_cast<double>(std::numeric_limits<float>::lowest()) and
static_cast<double>(j.m_value.number_float) <= static_cast<double>(std::numeric_limits<float>::max()) and
static_cast<double>(static_cast<float>(j.m_value.number_float)) == static_cast<double>(j.m_value.number_float))
{
oa->write_character(get_cbor_float_prefix(static_cast<float>(j.m_value.number_float)));
write_number(static_cast<float>(j.m_value.number_float));