summaryrefslogtreecommitdiff
path: root/src/mbgl/text
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-01-06 13:26:58 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-01-10 10:15:22 -0800
commitea4c0b77c39926c770b0003097509e36dc26621d (patch)
treecd84e61a2905e878b3f0ca04570d053047678059 /src/mbgl/text
parent40051fb68ec710c5d83795740d0e3e8c75bb3cb3 (diff)
downloadqtlocation-mapboxgl-ea4c0b77c39926c770b0003097509e36dc26621d.tar.gz
[core] Replace FeatureIndex::collisionTile with a method parameter
This reduces state and simplifies the test added in the prior commit.
Diffstat (limited to 'src/mbgl/text')
-rw-r--r--src/mbgl/text/collision_tile.cpp2
-rw-r--r--src/mbgl/text/collision_tile.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/text/collision_tile.cpp b/src/mbgl/text/collision_tile.cpp
index 419ab31a79..368750c89f 100644
--- a/src/mbgl/text/collision_tile.cpp
+++ b/src/mbgl/text/collision_tile.cpp
@@ -168,7 +168,7 @@ Box CollisionTile::getTreeBox(const Point<float>& anchor, const CollisionBox& bo
};
}
-std::vector<IndexedSubfeature> CollisionTile::queryRenderedSymbols(const GeometryCoordinates& queryGeometry, float scale) {
+std::vector<IndexedSubfeature> CollisionTile::queryRenderedSymbols(const GeometryCoordinates& queryGeometry, float scale) const {
std::vector<IndexedSubfeature> result;
if (queryGeometry.empty() || (tree.empty() && ignoredTree.empty())) {
return result;
diff --git a/src/mbgl/text/collision_tile.hpp b/src/mbgl/text/collision_tile.hpp
index 186cd19d28..ea4324edaf 100644
--- a/src/mbgl/text/collision_tile.hpp
+++ b/src/mbgl/text/collision_tile.hpp
@@ -42,7 +42,7 @@ public:
float placeFeature(const CollisionFeature&, bool allowOverlap, bool avoidEdges);
void insertFeature(CollisionFeature&, float minPlacementScale, bool ignorePlacement);
- std::vector<IndexedSubfeature> queryRenderedSymbols(const GeometryCoordinates&, float scale);
+ std::vector<IndexedSubfeature> queryRenderedSymbols(const GeometryCoordinates&, float scale) const;
const PlacementConfig config;