diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-10-09 12:59:27 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-10-12 17:58:03 +0200 |
commit | 78ea88d757ecf3a0a75b786ae343d746617ba46b (patch) | |
tree | 10efd5d389ce7290526e58b393a4c11b73ce3fe0 /src/mbgl/annotation | |
parent | 56446c5d17ac74aa9bf39bdd3c8d1e9629d8fd41 (diff) | |
download | qtlocation-mapboxgl-78ea88d757ecf3a0a75b786ae343d746617ba46b.tar.gz |
[core] make forcing cache/network only more explicit
Previously, we used the existence of a `prior*` field in the Resource object as an indication for whether we should consult the cache or not. However, this is prone to error, since a failed cache lookup won't set any prior fields. Therefore, we manually set `priorExpires` to 0. This in turn triggered another bug where generated wrong expiration timestamps when the server response we got was expired (or expired between sending and receiving).
This commit changes the flags so that we can now explicitly request CacheOnly/NetworkOnly (or All) loading methods, rather than the implicit Optional/Required naming scheme.
Diffstat (limited to 'src/mbgl/annotation')
-rw-r--r-- | src/mbgl/annotation/annotation_tile.cpp | 3 | ||||
-rw-r--r-- | src/mbgl/annotation/annotation_tile.hpp | 2 |
2 files changed, 0 insertions, 5 deletions
diff --git a/src/mbgl/annotation/annotation_tile.cpp b/src/mbgl/annotation/annotation_tile.cpp index 0596d60f4f..d405418a45 100644 --- a/src/mbgl/annotation/annotation_tile.cpp +++ b/src/mbgl/annotation/annotation_tile.cpp @@ -19,9 +19,6 @@ AnnotationTile::~AnnotationTile() { annotationManager.removeTile(*this); } -void AnnotationTile::setNecessity(Necessity) { -} - class AnnotationTileFeatureData { public: AnnotationTileFeatureData(const AnnotationID id_, diff --git a/src/mbgl/annotation/annotation_tile.hpp b/src/mbgl/annotation/annotation_tile.hpp index 88505c50e3..a4d1e66802 100644 --- a/src/mbgl/annotation/annotation_tile.hpp +++ b/src/mbgl/annotation/annotation_tile.hpp @@ -14,8 +14,6 @@ public: AnnotationTile(const OverscaledTileID&, const TileParameters&); ~AnnotationTile() override; - void setNecessity(Necessity) final; - private: AnnotationManager& annotationManager; }; |