From 40def6ddac0b7487de9fea56ee0720c73d8cf8b0 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Mon, 30 Mar 2020 15:10:09 +0300 Subject: [core] Fix bugprone-integer-division errors As reported by clang-tidy-8.too_small --- src/mbgl/tile/custom_geometry_tile.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mbgl/tile/custom_geometry_tile.cpp b/src/mbgl/tile/custom_geometry_tile.cpp index e13b16a4f1..68e120750d 100644 --- a/src/mbgl/tile/custom_geometry_tile.cpp +++ b/src/mbgl/tile/custom_geometry_tile.cpp @@ -8,6 +8,8 @@ #include #include + +#include #include namespace mbgl { @@ -32,7 +34,8 @@ void CustomGeometryTile::setTileData(const GeoJSON& geoJSON) { auto featureData = mapbox::feature::feature_collection(); if (geoJSON.is() && !geoJSON.get().empty()) { - const double scale = util::EXTENT / options->tileSize; + auto scale = util::EXTENT / options->tileSize; + assert(util::EXTENT % options->tileSize == 0); mapbox::geojsonvt::TileOptions vtOptions; vtOptions.extent = util::EXTENT; -- cgit v1.2.1