Don't use const on value-type returns
This commit is contained in:
@@ -38,12 +38,12 @@ public:
|
||||
class GeometryTileLayer : public mbgl::util::noncopyable {
|
||||
public:
|
||||
virtual std::size_t featureCount() const = 0;
|
||||
virtual const util::ptr<const GeometryTileFeature> feature(std::size_t i) const = 0;
|
||||
virtual util::ptr<const GeometryTileFeature> feature(std::size_t i) const = 0;
|
||||
};
|
||||
|
||||
class GeometryTile : public mbgl::util::noncopyable {
|
||||
public:
|
||||
virtual const util::ptr<const GeometryTileLayer> getLayer(const std::string&) const = 0;
|
||||
virtual util::ptr<const GeometryTileLayer> getLayer(const std::string&) const = 0;
|
||||
};
|
||||
|
||||
class GeometryTileFeatureExtractor {
|
||||
|
||||
@@ -101,7 +101,7 @@ VectorTile::VectorTile(pbf tile_pbf) {
|
||||
}
|
||||
}
|
||||
|
||||
const util::ptr<const GeometryTileLayer> VectorTile::getLayer(const std::string& name) const {
|
||||
util::ptr<const GeometryTileLayer> VectorTile::getLayer(const std::string& name) const {
|
||||
auto layer_it = layers.find(name);
|
||||
if (layer_it != layers.end()) {
|
||||
return layer_it->second;
|
||||
@@ -127,6 +127,6 @@ VectorTileLayer::VectorTileLayer(pbf layer_pbf) {
|
||||
}
|
||||
}
|
||||
|
||||
const util::ptr<const GeometryTileFeature> VectorTileLayer::feature(std::size_t i) const {
|
||||
util::ptr<const GeometryTileFeature> VectorTileLayer::feature(std::size_t i) const {
|
||||
return std::make_shared<VectorTileFeature>(features.at(i), *this);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
VectorTileLayer(pbf);
|
||||
|
||||
virtual std::size_t featureCount() const { return features.size(); }
|
||||
virtual const util::ptr<const GeometryTileFeature> feature(std::size_t) const;
|
||||
virtual util::ptr<const GeometryTileFeature> feature(std::size_t) const;
|
||||
|
||||
private:
|
||||
friend class VectorTile;
|
||||
@@ -45,7 +45,7 @@ class VectorTile : public GeometryTile {
|
||||
public:
|
||||
VectorTile(pbf);
|
||||
|
||||
virtual const util::ptr<const GeometryTileLayer> getLayer(const std::string&) const;
|
||||
virtual util::ptr<const GeometryTileLayer> getLayer(const std::string&) const;
|
||||
|
||||
private:
|
||||
std::map<std::string, util::ptr<const GeometryTileLayer>> layers;
|
||||
|
||||
Reference in New Issue
Block a user