diff options
author | Lauren Budorick <lauren@mapbox.com> | 2018-05-16 10:41:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-16 10:41:48 -0700 |
commit | d05fa404a8b2d67c908c857cbebacd38f594052a (patch) | |
tree | bce75a212631b048c6a2f1dfd328221de0fbc82c /src/mbgl | |
parent | 5af104bfa5bd7ebd55b05843a2d77d1df06ec93f (diff) | |
download | qtlocation-mapboxgl-d05fa404a8b2d67c908c857cbebacd38f594052a.tar.gz |
Fix bug (always true + incorrect calculation) in fill_extrusion_bucket edgedistance check
Diffstat (limited to 'src/mbgl')
-rw-r--r-- | src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp b/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp index 5e2c937091..4fcc761280 100644 --- a/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp +++ b/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp @@ -84,7 +84,7 @@ void FillExtrusionBucket::addFeature(const GeometryTileFeature& feature, if (nVertices == 0) continue; - auto edgeDistance = 0; + std::size_t edgeDistance = 0; for (uint32_t i = 0; i < nVertices; i++) { const auto& p1 = ring[i]; @@ -102,7 +102,7 @@ void FillExtrusionBucket::addFeature(const GeometryTileFeature& feature, const Point<double> perp = util::unit(util::perp(d1 - d2)); const auto dist = util::dist<int16_t>(d1, d2); - if (dist > std::numeric_limits<int16_t>::max()) { + if (edgeDistance + dist > std::numeric_limits<int16_t>::max()) { edgeDistance = 0; } |