From 84a6aa6d7371f8e592eb2fb9740ded50eaf2146a Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Thu, 7 Sep 2017 14:40:50 -0700 Subject: [PATCH] Use std::isinf() and std::isnan() instead of the C versions According to https://github.com/mapbox/tippecanoe/issues/464 this is necessary for g++-5 on Linux --- milo/dtoa_milo.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/milo/dtoa_milo.h b/milo/dtoa_milo.h index 697fcec..d6821ed 100644 --- a/milo/dtoa_milo.h +++ b/milo/dtoa_milo.h @@ -1,6 +1,7 @@ #pragma once #include #include +#include #if defined(_MSC_VER) #include "msinttypes/stdint.h" @@ -379,10 +380,10 @@ inline void Prettify(std::string &buffer, int length, int k) { inline std::string dtoa_milo(double value) { std::string buffer; - if (isnan(value)) { + if (std::isnan(value)) { return "nan"; } - if (isinf(value)) { + if (std::isinf(value)) { if (value < 0) { return "-inf"; } else {