[core] make Tile::getBucket const

This commit is contained in:
Ivo van Dongen
2017-04-12 16:34:15 +03:00
committed by Ivo van Dongen
parent 935cf531e4
commit d752235ec7
5 changed files with 5 additions and 5 deletions

View File

@@ -158,7 +158,7 @@ void GeometryTile::getIcons(IconDependencyMap iconDependencyMap) {
}
}
Bucket* GeometryTile::getBucket(const Layer& layer) {
Bucket* GeometryTile::getBucket(const Layer& layer) const {
const auto& buckets = layer.is<SymbolLayer>() ? symbolBuckets : nonSymbolBuckets;
const auto it = buckets.find(layer.baseImpl->id);
if (it == buckets.end()) {

View File

@@ -46,7 +46,7 @@ public:
void getGlyphs(GlyphDependencies);
void getIcons(IconDependencyMap);
Bucket* getBucket(const style::Layer&) override;
Bucket* getBucket(const style::Layer&) const override;
void queryRenderedFeatures(
std::unordered_map<std::string, std::vector<Feature>>& result,

View File

@@ -51,7 +51,7 @@ void RasterTile::onError(std::exception_ptr err) {
observer->onTileError(*this, err);
}
Bucket* RasterTile::getBucket(const style::Layer&) {
Bucket* RasterTile::getBucket(const style::Layer&) const {
return bucket.get();
}

View File

@@ -29,7 +29,7 @@ public:
optional<Timestamp> expires_);
void cancel() override;
Bucket* getBucket(const style::Layer&) override;
Bucket* getBucket(const style::Layer&) const override;
void onParsed(std::unique_ptr<Bucket> result);
void onError(std::exception_ptr);

View File

@@ -47,7 +47,7 @@ public:
// Mark this tile as no longer needed and cancel any pending work.
virtual void cancel() = 0;
virtual Bucket* getBucket(const style::Layer&) = 0;
virtual Bucket* getBucket(const style::Layer&) const = 0;
virtual void setPlacementConfig(const PlacementConfig&) {}
virtual void redoLayout() {}