Skip to content

Commit e172e9c

Browse files
committed
use ::hypot from libc instead of the STL version
1 parent 1b78d42 commit e172e9c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/mapbox/geojsonvt/clip.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class clipper {
112112
const double ak = get<I>(a);
113113
const double bk = get<I>(b);
114114

115-
if (lineMetrics) segLen = std::hypot((b.x - a.x), (b.y - a.y));
115+
if (lineMetrics) segLen = ::hypot((b.x - a.x), (b.y - a.y));
116116

117117
if (ak < k1) {
118118
if (bk > k2) { // ---|-----|-->

include/mapbox/geojsonvt/convert.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct project {
3939
for (size_t i = 0; i < len - 1; ++i) {
4040
const auto& a = result[i];
4141
const auto& b = result[i + 1];
42-
result.dist += std::hypot((b.x - a.x), (b.y - a.y));
42+
result.dist += ::hypot((b.x - a.x), (b.y - a.y));
4343
}
4444

4545
simplify(result, tolerance);

0 commit comments

Comments
 (0)