Merge branch 'develop' of https://github.com/nlohmann/json into issue2824
This commit is contained in:
12 files changed
+59
-7
No files matched your search
@@ -1525,6 +1525,8 @@ class binary_writer
|
||||
|
||||
void write_compact_float(const number_float_t n, detail::input_format_t format)
|
||||
{
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wfloat-equal"
|
||||
if (static_cast<double>(n) >= static_cast<double>(std::numeric_limits<float>::lowest()) &&
|
||||
static_cast<double>(n) <= static_cast<double>((std::numeric_limits<float>::max)()) &&
|
||||
static_cast<double>(static_cast<float>(n)) == static_cast<double>(n))
|
||||
@@ -1541,6 +1543,7 @@ class binary_writer
|
||||
: get_msgpack_float_prefix(n));
|
||||
write_number(n);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in new issue
Block a user