diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-30 15:10:09 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-30 23:37:44 +0300 |
commit | 31975e608326247ba9dd4974c21bd9ce91e7827e (patch) | |
tree | 71f354cedb09f5c2b70e4ffe9e7edc658f0876bd /src/mbgl/tile | |
parent | 879a906efaeeb4ee1db5a799cc35f9843485e3f7 (diff) | |
download | qtlocation-mapboxgl-31975e608326247ba9dd4974c21bd9ce91e7827e.tar.gz |
[core] Fix bugprone-integer-division errors
As reported by clang-tidy-8.too_small
Diffstat (limited to 'src/mbgl/tile')
-rw-r--r-- | src/mbgl/tile/custom_geometry_tile.cpp | 5 |
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; |