mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-20 14:02:40 +02:00
style changes
This commit is contained in:
@@ -1139,11 +1139,10 @@ template <typename Stream>
|
||||
inline packer<Stream>& packer<Stream>::pack_float(float d)
|
||||
{
|
||||
if(d == d) { // check for nan
|
||||
// compare d to limits::max() to avoid undefined behaviour
|
||||
// compare d to limits to avoid undefined behaviour
|
||||
if(d >= 0 && d <= std::numeric_limits<uint64_t>::max() && d == uint64_t(d)) {
|
||||
pack_imp_uint64(uint64_t(d));
|
||||
return *this;
|
||||
|
||||
} else if(d >= std::numeric_limits<int64_t>::min() && d == int64_t(d)) {
|
||||
pack_imp_int64(int64_t(d));
|
||||
return *this;
|
||||
@@ -1162,11 +1161,10 @@ template <typename Stream>
|
||||
inline packer<Stream>& packer<Stream>::pack_double(double d)
|
||||
{
|
||||
if(d == d) { // check for nan
|
||||
// compare d to limits::max() to avoid undefined behaviour
|
||||
// compare d to limits to avoid undefined behaviour
|
||||
if(d >= 0 && d <= std::numeric_limits<uint64_t>::max() && d == uint64_t(d)) {
|
||||
pack_imp_uint64(uint64_t(d));
|
||||
return *this;
|
||||
|
||||
} else if(d >= std::numeric_limits<int64_t>::min() && d == int64_t(d)) {
|
||||
pack_imp_int64(int64_t(d));
|
||||
return *this;
|
||||
|
Reference in New Issue
Block a user