diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-05-27 13:43:02 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-05-28 16:30:49 +0300 |
commit | 33ee7e23de24bd3c076eafef819029cf45451d23 (patch) | |
tree | 159d3e49dc44cda1b5133be1d663cca89efb2e79 /include | |
parent | cc26ef17d52367a768a134140c6c95cb2b880733 (diff) | |
download | qtlocation-mapboxgl-33ee7e23de24bd3c076eafef819029cf45451d23.tar.gz |
[core] Remove priority from the constructor
Make the constructor less verbose and set good defaults.
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/storage/resource.hpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/include/mbgl/storage/resource.hpp b/include/mbgl/storage/resource.hpp index d828877e10..40c4c836b1 100644 --- a/include/mbgl/storage/resource.hpp +++ b/include/mbgl/storage/resource.hpp @@ -54,12 +54,10 @@ public: Resource(Kind kind_, std::string url_, - Priority priority_ = Resource::Priority::Regular, optional<TileData> tileData_ = {}, LoadingMethod loadingMethod_ = LoadingMethod::All) : kind(kind_), loadingMethod(loadingMethod_), - priority(priority_), url(std::move(url_)), tileData(std::move(tileData_)) { } @@ -69,28 +67,26 @@ public: bool hasLoadingMethod(LoadingMethod method); - static Resource style(const std::string& url, const Priority priority = Resource::Priority::Regular); - static Resource source(const std::string& url, const Priority priority = Resource::Priority::Regular); + static Resource style(const std::string& url); + static Resource source(const std::string& url); static Resource tile(const std::string& urlTemplate, float pixelRatio, int32_t x, int32_t y, int8_t z, Tileset::Scheme scheme, - const Priority priority = Resource::Priority::Regular, LoadingMethod = LoadingMethod::All); static Resource glyphs(const std::string& urlTemplate, const FontStack& fontStack, - const std::pair<uint16_t, uint16_t>& glyphRange, - const Priority priority = Resource::Priority::Regular); - static Resource spriteImage(const std::string& base, float pixelRatio, const Priority priority = Resource::Priority::Regular); - static Resource spriteJSON(const std::string& base, float pixelRatio, const Priority priority = Resource::Priority::Regular); - static Resource image(const std::string& url, const Priority priority = Resource::Priority::Regular); + const std::pair<uint16_t, uint16_t>& glyphRange); + static Resource spriteImage(const std::string& base, float pixelRatio); + static Resource spriteJSON(const std::string& base, float pixelRatio); + static Resource image(const std::string& url); Kind kind; LoadingMethod loadingMethod; Usage usage{ Usage::Online }; - Priority priority; + Priority priority{ Priority::Regular }; std::string url; // Includes auxiliary data if this is a tile request. |