diff options
Diffstat (limited to 'src/mbgl')
-rw-r--r-- | src/mbgl/annotation/shape_annotation_impl.hpp | 1 | ||||
-rw-r--r-- | src/mbgl/layout/symbol_layout.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/style/parser.cpp | 1 | ||||
-rw-r--r-- | src/mbgl/style/sources/geojson_source_impl.cpp | 6 | ||||
-rw-r--r-- | src/mbgl/text/glyph_set.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/tile/geojson_tile.cpp | 1 | ||||
-rw-r--r-- | src/mbgl/util/dtoa.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/util/http_header.cpp | 2 |
8 files changed, 14 insertions, 4 deletions
diff --git a/src/mbgl/annotation/shape_annotation_impl.hpp b/src/mbgl/annotation/shape_annotation_impl.hpp index 800b4ec313..f257ead69d 100644 --- a/src/mbgl/annotation/shape_annotation_impl.hpp +++ b/src/mbgl/annotation/shape_annotation_impl.hpp @@ -1,5 +1,6 @@ #pragma once +#include <mbgl/util/string.hpp> #include <mapbox/geojsonvt.hpp> #include <mbgl/annotation/annotation.hpp> diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp index eaa0332995..7e523eb9ec 100644 --- a/src/mbgl/layout/symbol_layout.cpp +++ b/src/mbgl/layout/symbol_layout.cpp @@ -484,7 +484,7 @@ void SymbolLayout::addSymbols(Buffer &buffer, const SymbolQuads &symbols, float uint16_t index = segment.vertexLength; // Encode angle of glyph - uint8_t glyphAngle = std::round((symbol.glyphAngle / (M_PI * 2)) * 256); + uint8_t glyphAngle = ::round((symbol.glyphAngle / (M_PI * 2)) * 256); // coordinates (2 triangles) buffer.vertices.emplace_back(SymbolAttributes::vertex(anchorPoint, tl, tex.x, tex.y, diff --git a/src/mbgl/style/parser.cpp b/src/mbgl/style/parser.cpp index c6c6e50dd7..c45daa7b44 100644 --- a/src/mbgl/style/parser.cpp +++ b/src/mbgl/style/parser.cpp @@ -7,6 +7,7 @@ #include <mbgl/util/logging.hpp> +#include <mbgl/util/string.hpp> #include <mapbox/geojsonvt.hpp> #include <rapidjson/document.h> diff --git a/src/mbgl/style/sources/geojson_source_impl.cpp b/src/mbgl/style/sources/geojson_source_impl.cpp index 3f3bc879f7..29eff1e244 100644 --- a/src/mbgl/style/sources/geojson_source_impl.cpp +++ b/src/mbgl/style/sources/geojson_source_impl.cpp @@ -6,6 +6,7 @@ #include <mbgl/tile/geojson_tile.hpp> #include <mbgl/util/rapidjson.hpp> +#include <mbgl/util/string.hpp> #include <mapbox/geojson.hpp> #include <mapbox/geojson/rapidjson.hpp> #include <mapbox/geojsonvt.hpp> @@ -14,6 +15,7 @@ #include <rapidjson/error/en.h> +#include <cmath> #include <sstream> namespace mbgl { @@ -69,7 +71,7 @@ void GeoJSONSource::Impl::_setGeoJSON(const GeoJSON& geoJSON) { mapbox::supercluster::Options clusterOptions; clusterOptions.maxZoom = options.clusterMaxZoom; clusterOptions.extent = util::EXTENT; - clusterOptions.radius = std::round(scale * options.clusterRadius); + clusterOptions.radius = ::round(scale * options.clusterRadius); const auto& features = geoJSON.get<mapbox::geometry::feature_collection<double>>(); geoJSONOrSupercluster = @@ -78,7 +80,7 @@ void GeoJSONSource::Impl::_setGeoJSON(const GeoJSON& geoJSON) { mapbox::geojsonvt::Options vtOptions; vtOptions.maxZoom = options.maxzoom; vtOptions.extent = util::EXTENT; - vtOptions.buffer = std::round(scale * options.buffer); + vtOptions.buffer = ::round(scale * options.buffer); vtOptions.tolerance = scale * options.tolerance; geoJSONOrSupercluster = std::make_unique<mapbox::geojsonvt::GeoJSONVT>(geoJSON, vtOptions); } diff --git a/src/mbgl/text/glyph_set.cpp b/src/mbgl/text/glyph_set.cpp index f9a90f9bb0..493cce61b8 100644 --- a/src/mbgl/text/glyph_set.cpp +++ b/src/mbgl/text/glyph_set.cpp @@ -7,6 +7,7 @@ #include <algorithm> #include <cassert> +#include <cmath> namespace mbgl { @@ -111,7 +112,7 @@ float GlyphSet::determineAverageLineWidth(const std::u16string& logicalInput, } } - int32_t targetLineCount = std::fmax(1, std::ceil(totalWidth / maxWidth)); + int32_t targetLineCount = ::fmax(1, std::ceil(totalWidth / maxWidth)); return totalWidth / targetLineCount; } diff --git a/src/mbgl/tile/geojson_tile.cpp b/src/mbgl/tile/geojson_tile.cpp index 61437b79b1..a2f453f03d 100644 --- a/src/mbgl/tile/geojson_tile.cpp +++ b/src/mbgl/tile/geojson_tile.cpp @@ -1,6 +1,7 @@ #include <mbgl/tile/geojson_tile.hpp> #include <mbgl/tile/geometry_tile_data.hpp> +#include <mbgl/util/string.hpp> #include <mapbox/geojsonvt.hpp> #include <supercluster.hpp> diff --git a/src/mbgl/util/dtoa.cpp b/src/mbgl/util/dtoa.cpp index 578f844c72..737b121b97 100644 --- a/src/mbgl/util/dtoa.cpp +++ b/src/mbgl/util/dtoa.cpp @@ -1,5 +1,7 @@ #include "dtoa.hpp" +#include <mbgl/util/string.hpp> + // Clang on Windows 64-bits can't parse rapidjson's dtoa #if !defined(_WINDOWS) #include <rapidjson/internal/dtoa.h> diff --git a/src/mbgl/util/http_header.cpp b/src/mbgl/util/http_header.cpp index e337d4c8ab..cad029567e 100644 --- a/src/mbgl/util/http_header.cpp +++ b/src/mbgl/util/http_header.cpp @@ -1,5 +1,7 @@ #include <mbgl/util/http_header.hpp> +#include <mbgl/util/string.hpp> + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunknown-pragmas" #pragma GCC diagnostic ignored "-Wunused-parameter" |