summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-11-25 17:50:19 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-11-26 15:13:14 -0800
commit41e90b4150ba8302c0c6f9bec0f53059483fea9e (patch)
tree1febc0cc25c4663ccc49debff79757a751271c4a /include
parent23b61f808cca8d926c11bbb738f384522e41dbbd (diff)
downloadqtlocation-mapboxgl-41e90b4150ba8302c0c6f9bec0f53059483fea9e.tar.gz
Pass SourceInfo as reference
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/map/raster_tile_data.hpp2
-rw-r--r--include/mbgl/map/source.hpp4
-rw-r--r--include/mbgl/map/tile_data.hpp4
-rw-r--r--include/mbgl/map/vector_tile_data.hpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/include/mbgl/map/raster_tile_data.hpp b/include/mbgl/map/raster_tile_data.hpp
index c3bd2fbe3a..cbbd864aae 100644
--- a/include/mbgl/map/raster_tile_data.hpp
+++ b/include/mbgl/map/raster_tile_data.hpp
@@ -16,7 +16,7 @@ class RasterTileData : public TileData {
friend class TileParser;
public:
- RasterTileData(Tile::ID const& id, Texturepool&, const util::ptr<SourceInfo> &source);
+ RasterTileData(Tile::ID const& id, Texturepool&, const SourceInfo&);
~RasterTileData();
virtual void parse();
diff --git a/include/mbgl/map/source.hpp b/include/mbgl/map/source.hpp
index 6356238790..299c7accac 100644
--- a/include/mbgl/map/source.hpp
+++ b/include/mbgl/map/source.hpp
@@ -32,7 +32,7 @@ struct box;
class Source : public std::enable_shared_from_this<Source>, private util::noncopyable {
public:
- Source(const util::ptr<SourceInfo>& info);
+ Source(SourceInfo&);
void load(Map&, FileSource&);
bool update(Map&, uv::worker&,
@@ -78,7 +78,7 @@ private:
double getZoom(const TransformState &state) const;
- util::ptr<SourceInfo> info;
+ SourceInfo& info;
bool loaded = false;
// Stores the time when this source was most recently updated.
diff --git a/include/mbgl/map/tile_data.hpp b/include/mbgl/map/tile_data.hpp
index 7fbb5d5068..c8a13b83de 100644
--- a/include/mbgl/map/tile_data.hpp
+++ b/include/mbgl/map/tile_data.hpp
@@ -46,7 +46,7 @@ public:
};
public:
- TileData(Tile::ID const& id, const util::ptr<SourceInfo> &source);
+ TileData(Tile::ID const& id, const SourceInfo&);
~TileData();
void request(uv::worker&, FileSource&, float pixelRatio, std::function<void ()> callback);
@@ -69,7 +69,7 @@ public:
std::atomic<State> state;
public:
- util::ptr<SourceInfo> source;
+ const SourceInfo& source;
protected:
std::unique_ptr<Request> req;
diff --git a/include/mbgl/map/vector_tile_data.hpp b/include/mbgl/map/vector_tile_data.hpp
index 53dbb7eeb1..0a0569f2ee 100644
--- a/include/mbgl/map/vector_tile_data.hpp
+++ b/include/mbgl/map/vector_tile_data.hpp
@@ -36,7 +36,7 @@ public:
GlyphAtlas&, GlyphStore&,
SpriteAtlas&, util::ptr<Sprite>,
Texturepool&,
- const util::ptr<SourceInfo>&);
+ const SourceInfo&);
~VectorTileData();
virtual void parse();