diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-03-10 10:32:25 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-03-10 10:32:25 -0700 |
commit | 05df041c15ba9e509bc98b043f5368c9a23fa688 (patch) | |
tree | 0e2ea4137da3c9decf00222b1bae9d3aa4629b16 /src/mbgl/map | |
parent | 5fa628bc001dd19cb84f816d3834a1ec126da089 (diff) | |
download | qtlocation-mapboxgl-05df041c15ba9e509bc98b043f5368c9a23fa688.tar.gz |
Don't use const on value-type returns
Diffstat (limited to 'src/mbgl/map')
-rw-r--r-- | src/mbgl/map/geometry_tile.hpp | 4 | ||||
-rw-r--r-- | src/mbgl/map/vector_tile.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/map/vector_tile.hpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/map/geometry_tile.hpp b/src/mbgl/map/geometry_tile.hpp index f94ce15d7c..f303a32bde 100644 --- a/src/mbgl/map/geometry_tile.hpp +++ b/src/mbgl/map/geometry_tile.hpp @@ -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 { diff --git a/src/mbgl/map/vector_tile.cpp b/src/mbgl/map/vector_tile.cpp index 9ea57f4f67..e9ae52e9ad 100644 --- a/src/mbgl/map/vector_tile.cpp +++ b/src/mbgl/map/vector_tile.cpp @@ -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); } diff --git a/src/mbgl/map/vector_tile.hpp b/src/mbgl/map/vector_tile.hpp index a7521cd327..b27f6bb397 100644 --- a/src/mbgl/map/vector_tile.hpp +++ b/src/mbgl/map/vector_tile.hpp @@ -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; |