From c39232a89f1feb18454d88f2908f5cbef306b065 Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Mon, 13 Nov 2017 11:12:03 -0800 Subject: [core] Cleanup in response to review comments. --- src/mbgl/layout/symbol_instance.cpp | 2 +- src/mbgl/layout/symbol_layout.cpp | 4 ++-- src/mbgl/layout/symbol_projection.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/mbgl/layout') diff --git a/src/mbgl/layout/symbol_instance.cpp b/src/mbgl/layout/symbol_instance.cpp index d0398fcd30..6e152349ca 100644 --- a/src/mbgl/layout/symbol_instance.cpp +++ b/src/mbgl/layout/symbol_instance.cpp @@ -32,7 +32,7 @@ SymbolInstance::SymbolInstance(Anchor& anchor_, // Create the collision features that will be used to check whether this symbol instance can be placed textCollisionFeature(line_, anchor, shapedTextOrientations.first, textBoxScale, textPadding, textPlacement, indexedFeature, overscaling), - iconCollisionFeature(line_, anchor, shapedIcon, iconBoxScale, iconPadding, SymbolPlacementType::Point, indexedFeature), + iconCollisionFeature(line_, anchor, shapedIcon, iconBoxScale, iconPadding, indexedFeature), featureIndex(featureIndex_), textOffset(textOffset_), iconOffset(iconOffset_), diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp index d84b74d42a..fc1ede56ff 100644 --- a/src/mbgl/layout/symbol_layout.cpp +++ b/src/mbgl/layout/symbol_layout.cpp @@ -293,7 +293,7 @@ void SymbolLayout::addFeature(const std::size_t index, const float textRepeatDistance = symbolSpacing / 2; IndexedSubfeature indexedFeature(feature.index, sourceLayer->getName(), bucketName, symbolInstances.size(), - sourceID, tileID.canonical.z, tileID.canonical.x, tileID.canonical.y); + sourceID, tileID.canonical); auto addSymbolInstance = [&] (const GeometryCoordinates& line, Anchor& anchor) { // https://github.com/mapbox/vector-tile-spec/tree/master/2.1#41-layers @@ -320,7 +320,7 @@ void SymbolLayout::addFeature(const std::size_t index, symbolInstances.size(), textBoxScale, textPadding, textPlacement, textOffset, iconBoxScale, iconPadding, iconOffset, - glyphPositionMap, indexedFeature, index, feature.text ? *feature.text : std::u16string{}, overscaling); + glyphPositionMap, indexedFeature, index, feature.text.value_or(std::u16string()), overscaling); } }; diff --git a/src/mbgl/layout/symbol_projection.cpp b/src/mbgl/layout/symbol_projection.cpp index b8c399d857..ee6385c93c 100644 --- a/src/mbgl/layout/symbol_projection.cpp +++ b/src/mbgl/layout/symbol_projection.cpp @@ -294,7 +294,7 @@ namespace mbgl { std::vector placedGlyphs; if (symbol.glyphOffsets.size() > 1) { - const optional> firstAndLastGlyph = + const optional> firstAndLastGlyph = placeFirstAndLastGlyph(fontScale, lineOffsetX, lineOffsetY, flip, projectedAnchorPoint, symbol.anchorPoint, symbol, labelPlaneMatrix, false); if (!firstAndLastGlyph) { return PlacementResult::NotEnoughRoom; -- cgit v1.2.1