diff options
Diffstat (limited to 'geography/osm2pgsql/patches/patch-node-persistent-cache.cpp')
-rw-r--r-- | geography/osm2pgsql/patches/patch-node-persistent-cache.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/geography/osm2pgsql/patches/patch-node-persistent-cache.cpp b/geography/osm2pgsql/patches/patch-node-persistent-cache.cpp new file mode 100644 index 00000000000..488c734ba3a --- /dev/null +++ b/geography/osm2pgsql/patches/patch-node-persistent-cache.cpp @@ -0,0 +1,35 @@ +$NetBSD: patch-node-persistent-cache.cpp,v 1.1 2015/06/10 01:48:49 wiedi Exp $ + +Use std namespace to find isnan + +--- node-persistent-cache.cpp.orig 2015-04-30 04:15:07.000000000 +0000 ++++ node-persistent-cache.cpp +@@ -450,7 +450,7 @@ int node_persistent_cache::set_append(os + block_id = load_block(block_offset); + + #ifdef FIXED_POINT +- if (isnan(lat) && isnan(lon)) ++ if (std::isnan(lat) && std::isnan(lon)) + { + readNodeBlockCache[block_id].nodes[id & READ_NODE_BLOCK_MASK].lat = + INT_MIN; +@@ -512,8 +512,8 @@ int node_persistent_cache::get(struct os + return 0; + } + #else +- if ((isnan(readNodeBlockCache[block_id].nodes[id & READ_NODE_BLOCK_MASK].lat)) && +- (isnan(readNodeBlockCache[block_id].nodes[id & READ_NODE_BLOCK_MASK].lon))) ++ if ((std::isnan(readNodeBlockCache[block_id].nodes[id & READ_NODE_BLOCK_MASK].lat)) && ++ (std::isnan(readNodeBlockCache[block_id].nodes[id & READ_NODE_BLOCK_MASK].lon))) + { + return 1; + } +@@ -547,7 +547,7 @@ int node_persistent_cache::get_list(node + + size_t wrtidx = 0; + for (size_t i = 0; i < nds.size(); i++) { +- if (isnan(out[i].lat) && isnan(out[i].lon)) { ++ if (std::isnan(out[i].lat) && std::isnan(out[i].lon)) { + if (get(&(out[wrtidx]), nds[i]) == 0) + wrtidx++; + } else { |