diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-08-03 15:01:35 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-08-04 14:08:19 +0200 |
commit | 78ec33320ff5837f23e85e336716692f63fd0254 (patch) | |
tree | de48fe425d31e2378cc02544d97e981600c4dc61 /src/mbgl/util/tile_cover.cpp | |
parent | ab7456075c7744c8528c2b86cfa77f80d6a04ef1 (diff) | |
download | qtlocation-mapboxgl-78ec33320ff5837f23e85e336716692f63fd0254.tar.gz |
don't use certain STL functions
some functions defined in <cmath>, as well as std::to_string aren't available on GNU's STL for some platforms, e.g. Android
Diffstat (limited to 'src/mbgl/util/tile_cover.cpp')
-rw-r--r-- | src/mbgl/util/tile_cover.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/util/tile_cover.cpp b/src/mbgl/util/tile_cover.cpp index f410b8e813..9e444fec12 100644 --- a/src/mbgl/util/tile_cover.cpp +++ b/src/mbgl/util/tile_cover.cpp @@ -27,8 +27,8 @@ typedef const std::function<void(int32_t x0, int32_t x1, int32_t y)> ScanLine; // scan-line conversion static void scanSpans(edge e0, edge e1, int32_t ymin, int32_t ymax, ScanLine scanLine) { - double y0 = std::fmax(ymin, std::floor(e1.y0)); - double y1 = std::fmin(ymax, std::ceil(e1.y1)); + double y0 = ::fmax(ymin, std::floor(e1.y0)); + double y1 = ::fmin(ymax, std::ceil(e1.y1)); // sort edges by x-coordinate if ((e0.x0 == e1.x0 && e0.y0 == e1.y0) ? @@ -43,8 +43,8 @@ static void scanSpans(edge e0, edge e1, int32_t ymin, int32_t ymax, ScanLine sca double d0 = e0.dx > 0; // use y + 1 to compute x0 double d1 = e1.dx < 0; // use y + 1 to compute x1 for (int32_t y = y0; y < y1; y++) { - double x0 = m0 * std::fmax(0, std::fmin(e0.dy, y + d0 - e0.y0)) + e0.x0; - double x1 = m1 * std::fmax(0, std::fmin(e1.dy, y + d1 - e1.y0)) + e1.x0; + double x0 = m0 * ::fmax(0, ::fmin(e0.dy, y + d0 - e0.y0)) + e0.x0; + double x1 = m1 * ::fmax(0, ::fmin(e1.dy, y + d1 - e1.y0)) + e1.x0; scanLine(std::floor(x1), std::ceil(x0), y); } } |