[core] make Tile::getBucket const
This commit is contained in:
committed by
Ivo van Dongen
parent
935cf531e4
commit
d752235ec7
@@ -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()) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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() {}
|
||||
|
||||
Reference in New Issue
Block a user