move to shared pointers for queried layers passed to buckets

This commit is contained in:
Justin R. Miller
2015-03-08 16:12:44 -07:00
committed by John Firebaugh
parent a45ae199cf
commit 7361f8566b
7 changed files with 28 additions and 44 deletions

View File

@@ -119,6 +119,14 @@ VectorTile& VectorTile::operator=(VectorTile&& other) {
return *this;
}
const util::ptr<const GeometryTileLayer> VectorTile::getLayer(const std::string& name) const {
auto layer_it = layers.find(name);
if (layer_it != layers.end()) {
return std::make_shared<const VectorTileLayer>(layer_it->second);
}
return nullptr;
}
VectorTileLayer::VectorTileLayer(pbf layer_pbf)
: feature_pbf(layer_pbf) {
while (layer_pbf.next()) {