diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-06-21 14:44:00 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2018-09-11 11:43:54 +0200 |
commit | 4a3c4edb59b6881a30056531bc71e52295ab1cb0 (patch) | |
tree | b1c466667efc84cd5f7345d977032155f315ec76 /src/mbgl/util | |
parent | 30e570aae7d2ba5522feafb962b334ef3f35459e (diff) | |
download | qtlocation-mapboxgl-4a3c4edb59b6881a30056531bc71e52295ab1cb0.tar.gz |
[android] add support for gnustl
Diffstat (limited to 'src/mbgl/util')
-rw-r--r-- | src/mbgl/util/dtoa.hpp | 5 | ||||
-rw-r--r-- | src/mbgl/util/tile_cover.cpp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/mbgl/util/dtoa.hpp b/src/mbgl/util/dtoa.hpp index 4cb81a94be..e6b1659aa2 100644 --- a/src/mbgl/util/dtoa.hpp +++ b/src/mbgl/util/dtoa.hpp @@ -1,11 +1,16 @@ #pragma once #include <string> +#include <cstdlib> namespace mbgl { namespace util { std::string dtoa(double value); +inline double stod(const std::string& str) { + return ::strtod(str.c_str(), nullptr); +} + } // end namespace util } // end namespace mbgl diff --git a/src/mbgl/util/tile_cover.cpp b/src/mbgl/util/tile_cover.cpp index f58d1270bd..7979c550a9 100644 --- a/src/mbgl/util/tile_cover.cpp +++ b/src/mbgl/util/tile_cover.cpp @@ -131,7 +131,7 @@ std::vector<UnwrappedTileID> tileCover(const Point<double>& tl, } // namespace int32_t coveringZoomLevel(double zoom, style::SourceType type, uint16_t size) { - zoom += ::log2(util::tileSize / size); + zoom += util::log2(util::tileSize / size); if (type == style::SourceType::Raster || type == style::SourceType::Video) { return ::round(zoom); } else { |