diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-13 13:41:20 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-14 11:25:45 -0700 |
commit | 14ab6661e03970b8b6d13d9cdf7a749690ea1843 (patch) | |
tree | 2042b80fa9bb08457cb3177f4c77be0b4e2256b7 /src | |
parent | cf7420a3c9ff4b0b3b79bade045cec59bf465990 (diff) | |
download | qtlocation-mapboxgl-14ab6661e03970b8b6d13d9cdf7a749690ea1843.tar.gz |
[core] Eliminate Source::isLoading
Source::load is already a no-op if the request is in progress, so it isn't necessary.
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/style/source.cpp | 4 | ||||
-rw-r--r-- | src/mbgl/style/source.hpp | 1 | ||||
-rw-r--r-- | src/mbgl/style/style.cpp | 2 |
3 files changed, 1 insertions, 6 deletions
diff --git a/src/mbgl/style/source.cpp b/src/mbgl/style/source.cpp index c3265a7b41..639c563a64 100644 --- a/src/mbgl/style/source.cpp +++ b/src/mbgl/style/source.cpp @@ -59,10 +59,6 @@ bool Source::isLoaded() const { return true; } -bool Source::isLoading() const { - return !loaded && req.operator bool(); -} - void Source::invalidateTiles() { tiles.clear(); renderTiles.clear(); diff --git a/src/mbgl/style/source.hpp b/src/mbgl/style/source.hpp index 193f73da4d..485f3446ca 100644 --- a/src/mbgl/style/source.hpp +++ b/src/mbgl/style/source.hpp @@ -43,7 +43,6 @@ public: bool loaded = false; virtual void load(FileSource&) = 0; - bool isLoading() const; bool isLoaded() const; const Tileset* getTileset() const { return tileset.get(); } diff --git a/src/mbgl/style/style.cpp b/src/mbgl/style/style.cpp index 2fe4810a5a..5dd00bd309 100644 --- a/src/mbgl/style/style.cpp +++ b/src/mbgl/style/style.cpp @@ -214,7 +214,7 @@ void Style::recalculate(float z, const TimePoint& timePoint, MapMode mode) { Source* source = getSource(layer->baseImpl->source); if (source && layer->baseImpl->needsRendering()) { source->enabled = true; - if (!source->loaded && !source->isLoading()) { + if (!source->loaded) { source->load(fileSource); } } |