[core] Replace FeatureIndex::collisionTile with a method parameter

This reduces state and simplifies the test added in the prior commit.
This commit is contained in:
John Firebaugh
2017-01-06 13:26:58 -08:00
parent 40051fb68e
commit ea4c0b77c3
7 changed files with 13 additions and 23 deletions

View File

@@ -62,14 +62,6 @@ TEST(VectorTile, Issue7615) {
auto symbolBucket = std::make_shared<SymbolBucket>(
MapMode::Continuous, style::SymbolLayoutProperties::Evaluated(), false, false);
// First onLayout is required so that a non-null FeatureIndex is available.
tile.onLayout(GeometryTile::LayoutResult {
{},
std::make_unique<FeatureIndex>(),
nullptr,
0
});
// Simulate placement of a symbol layer.
tile.onPlacement(GeometryTile::PlacementResult {
{{
@@ -80,7 +72,7 @@ TEST(VectorTile, Issue7615) {
0
});
// Second onLayout should not cause the existing symbol bucket to be discarded.
// Subsequent onLayout should not cause the existing symbol bucket to be discarded.
tile.onLayout(GeometryTile::LayoutResult {
{},
nullptr,