Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Fix bug (always true + incorrect calculation) in fill_extrusion_bucke…
Browse files Browse the repository at this point in the history
…t edgedistance check
  • Loading branch information
Lauren Budorick authored May 16, 2018
1 parent 5af104b commit d05fa40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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;
}

Expand Down

0 comments on commit d05fa40

Please sign in to comment.