summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-30 15:10:09 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-30 23:37:44 +0300
commit31975e608326247ba9dd4974c21bd9ce91e7827e (patch)
tree71f354cedb09f5c2b70e4ffe9e7edc658f0876bd
parent879a906efaeeb4ee1db5a799cc35f9843485e3f7 (diff)
downloadqtlocation-mapboxgl-31975e608326247ba9dd4974c21bd9ce91e7827e.tar.gz
[core] Fix bugprone-integer-division errors
As reported by clang-tidy-8.too_small
-rw-r--r--src/mbgl/tile/custom_geometry_tile.cpp5
1 files changed, 4 insertions, 1 deletions
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 <mbgl/style/custom_tile_loader.hpp>
#include <mapbox/geojsonvt.hpp>
+
+#include <cassert>
#include <utility>
namespace mbgl {
@@ -32,7 +34,8 @@ void CustomGeometryTile::setTileData(const GeoJSON& geoJSON) {
auto featureData = mapbox::feature::feature_collection<int16_t>();
if (geoJSON.is<FeatureCollection>() && !geoJSON.get<FeatureCollection>().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;