diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-13 14:24:26 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-13 14:24:26 -0700 |
commit | 36bef2157595e1455aa55c64c6c526f096dd1c8e (patch) | |
tree | 908c2ff48dc5a5a9957f8675e9c18f8b7a03c598 /src/mbgl/tile/tile_loader.hpp | |
parent | 040bdb1994106516a27edfef8c83c8d6aea3ec87 (diff) | |
download | qtlocation-mapboxgl-36bef2157595e1455aa55c64c6c526f096dd1c8e.tar.gz |
[core] Eliminate duplicate Necessity types
Diffstat (limited to 'src/mbgl/tile/tile_loader.hpp')
-rw-r--r-- | src/mbgl/tile/tile_loader.hpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/mbgl/tile/tile_loader.hpp b/src/mbgl/tile/tile_loader.hpp index cab1907741..1086f4ed33 100644 --- a/src/mbgl/tile/tile_loader.hpp +++ b/src/mbgl/tile/tile_loader.hpp @@ -2,6 +2,7 @@ #include <mbgl/util/noncopyable.hpp> #include <mbgl/storage/resource.hpp> +#include <mbgl/tile/tile.hpp> namespace mbgl { @@ -17,21 +18,13 @@ class UpdateParameters; template <typename T> class TileLoader : private util::noncopyable { public: - // TileSources can have two states: optional or required. - // - optional means that only low-cost actions should be taken to obtain the data - // (e.g. load from cache, but accept stale data) - // - required means that every effort should be taken to obtain the data (e.g. load - // from internet and keep the data fresh if it expires) - enum class Necessity : bool { - Optional = false, - Required = true, - }; - TileLoader(T&, const OverscaledTileID&, const style::UpdateParameters&, const Tileset&); + using Necessity = Resource::Necessity; + void setNecessity(Necessity newNecessity) { if (newNecessity != necessity) { necessity = newNecessity; |