summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-06-06 23:43:07 -0700
committerKonstantin Käfer <mail@kkaefer.com>2016-06-10 12:42:14 +0200
commitca8b26bbf669905ef73aa0b27c753e5f18dd26e6 (patch)
treec89925728b9f8ba23be285f6c235e1fc6c176d8d
parent49120b1974edf744939f7801068dde612d79a4d7 (diff)
downloadqtlocation-mapboxgl-ca8b26bbf669905ef73aa0b27c753e5f18dd26e6.tar.gz
[core] Inline TileSource::isRequired, remove unused isOptional
-rw-r--r--src/mbgl/tile/tile_source.hpp8
-rw-r--r--src/mbgl/tile/tile_source_impl.hpp4
2 files changed, 2 insertions, 10 deletions
diff --git a/src/mbgl/tile/tile_source.hpp b/src/mbgl/tile/tile_source.hpp
index 69688241fd..f1a0a1c922 100644
--- a/src/mbgl/tile/tile_source.hpp
+++ b/src/mbgl/tile/tile_source.hpp
@@ -44,14 +44,6 @@ public:
}
private:
- bool isOptional() const {
- return necessity == Necessity::Optional;
- }
-
- bool isRequired() const {
- return necessity == Necessity::Required;
- }
-
// called when the tile is one of the ideal tiles that we want to show definitely. the tile source
// should try to make every effort (e.g. fetch from internet, or revalidate existing resources).
void makeRequired();
diff --git a/src/mbgl/tile/tile_source_impl.hpp b/src/mbgl/tile/tile_source_impl.hpp
index 8d5caeb829..b5a48a97bb 100644
--- a/src/mbgl/tile/tile_source_impl.hpp
+++ b/src/mbgl/tile/tile_source_impl.hpp
@@ -34,7 +34,7 @@ TileSource<T>::TileSource(T& tileData_,
} else {
// When the FileSource doesn't support optional requests, we do nothing until the
// data is definitely required.
- if (isRequired()) {
+ if (necessity == Necessity::Required) {
loadRequired();
} else {
// We're using this field to check whether the pending request is optional or required.
@@ -62,7 +62,7 @@ void TileSource<T>::loadOptional() {
loadedData(res);
}
- if (isRequired()) {
+ if (necessity == Necessity::Required) {
loadRequired();
}
});