summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLauren Budorick <lauren@mapbox.com>2018-05-16 10:41:48 -0700
committerGitHub <noreply@github.com>2018-05-16 10:41:48 -0700
commitd05fa404a8b2d67c908c857cbebacd38f594052a (patch)
treebce75a212631b048c6a2f1dfd328221de0fbc82c /src
parent5af104bfa5bd7ebd55b05843a2d77d1df06ec93f (diff)
downloadqtlocation-mapboxgl-d05fa404a8b2d67c908c857cbebacd38f594052a.tar.gz
Fix bug (always true + incorrect calculation) in fill_extrusion_bucket edgedistance check
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp4
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;
}