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

Commit

Permalink
fix Linux narrow warning by using correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
incanus committed Dec 14, 2015
1 parent 7f07974 commit 30239c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mbgl/map/tile_worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void TileWorker::parseLayer(const StyleLayer* layer, const GeometryTile& geometr
if (layer->isInteractive) {
for (std::size_t i = 0; i < geometryLayer->featureCount(); i++) {
const auto feature = geometryLayer->getFeature(i);
FeatureBox featureBox = {{ extent, extent }, { -1, -1 }};
FeatureBox featureBox = {{ int16_t(extent), int16_t(extent) }, { -1, -1 }};
const auto geometries = feature->getGeometries();
for (std::size_t j = 0; j < geometries.size(); j++) {
const auto geometry = geometries.at(j);
Expand Down

1 comment on commit 30239c2

@incanus
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not crazy about this, as it works fine for 4096 extent but isn't future proof. @kkaefer @jfirebaugh Can you recommend a better approach here, given that FeatureBox needs to be made of int16_t but extent is most properly defined as uint16_t?

Please sign in to comment.