Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[core] Inline TileSource::isRequired, remove unused isOptional
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh authored and kkaefer committed Jun 10, 2016
1 parent 49120b1 commit ca8b26b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/mbgl/tile/tile_source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ class TileSource : private util::noncopyable {
}

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();
Expand Down
4 changes: 2 additions & 2 deletions src/mbgl/tile/tile_source_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -62,7 +62,7 @@ void TileSource<T>::loadOptional() {
loadedData(res);
}

if (isRequired()) {
if (necessity == Necessity::Required) {
loadRequired();
}
});
Expand Down

0 comments on commit ca8b26b

Please sign in to comment.