[core] Inline TileSource::isRequired, remove unused isOptional

This commit is contained in:
John Firebaugh
2016-06-06 23:43:07 -07:00
committed by Konstantin Käfer
parent 49120b1974
commit ca8b26bbf6
2 changed files with 2 additions and 10 deletions

View File

@@ -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();

View File

@@ -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();
}
});