[core] Inline TileSource::isRequired, remove unused isOptional
This commit is contained in:
committed by
Konstantin Käfer
parent
49120b1974
commit
ca8b26bbf6
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user