diff --git a/src/mbgl/renderer/symbol_bucket.cpp b/src/mbgl/renderer/symbol_bucket.cpp index 404a62d374a..6530510e27f 100644 --- a/src/mbgl/renderer/symbol_bucket.cpp +++ b/src/mbgl/renderer/symbol_bucket.cpp @@ -60,7 +60,7 @@ SymbolBucket::SymbolBucket(uint32_t overscaling_, float zoom_, const MapMode mod : overscaling(overscaling_), zoom(zoom_), tileSize(util::tileSize * overscaling_), - tilePixelRatio(util::EXTENT / tileSize), + tilePixelRatio(float(util::EXTENT) / tileSize), mode(mode_) {} SymbolBucket::~SymbolBucket() { diff --git a/src/mbgl/text/get_anchors.cpp b/src/mbgl/text/get_anchors.cpp index 740ec288b3e..c55f238e528 100644 --- a/src/mbgl/text/get_anchors.cpp +++ b/src/mbgl/text/get_anchors.cpp @@ -3,6 +3,7 @@ #include #include +#include #include namespace mbgl { @@ -21,6 +22,8 @@ Anchors resample(const GeometryCoordinates &line, const float offset, const floa Anchors anchors; + assert(spacing > 0.0); + int i = 0; for (auto it = line.begin(), end = line.end() - 1; it != end; it++, i++) { const GeometryCoordinate &a = *(it);