mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-23 18:40:17 +00:00
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
This commit is contained in:
parent
c3d23675d1
commit
84a6aa6d73
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user