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.hpp | |
parent | 040bdb1994106516a27edfef8c83c8d6aea3ec87 (diff) | |
download | qtlocation-mapboxgl-36bef2157595e1455aa55c64c6c526f096dd1c8e.tar.gz |
[core] Eliminate duplicate Necessity types
Diffstat (limited to 'src/mbgl/tile/tile.hpp')
-rw-r--r-- | src/mbgl/tile/tile.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mbgl/tile/tile.hpp b/src/mbgl/tile/tile.hpp index 931317463a..65f3aaa245 100644 --- a/src/mbgl/tile/tile.hpp +++ b/src/mbgl/tile/tile.hpp @@ -8,6 +8,7 @@ #include <mbgl/renderer/bucket.hpp> #include <mbgl/text/placement_config.hpp> #include <mbgl/tile/geometry_tile_data.hpp> +#include <mbgl/storage/resource.hpp> #include <string> #include <memory> @@ -32,10 +33,12 @@ public: void setObserver(TileObserver* observer); - enum class Necessity : bool { - Optional = false, - Required = true, - }; + // Tiles 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) + using Necessity = Resource::Necessity; virtual void setNecessity(Necessity) = 0; |