diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-08-25 17:44:44 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-08-26 10:30:55 -0700 |
commit | d2abb1b6d5cc129acaadab15152ae286b989d9ba (patch) | |
tree | 05528dfb620931cda49b044c2d8fbbcc4da67232 /platform/default | |
parent | 50ae6c738a3ed1da14c73ce507071385bbc441b0 (diff) | |
download | qtlocation-mapboxgl-d2abb1b6d5cc129acaadab15152ae286b989d9ba.tar.gz |
[core] Change GeoJSONSource::getURL() to return an optional<std::string>
GeoJSON sources may have inline GeoJSON rather than a URL; returning an optional type ensures that consumers handle this case.
Diffstat (limited to 'platform/default')
-rw-r--r-- | platform/default/mbgl/storage/offline_download.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/default/mbgl/storage/offline_download.cpp b/platform/default/mbgl/storage/offline_download.cpp index 87534f222f..bf75989d25 100644 --- a/platform/default/mbgl/storage/offline_download.cpp +++ b/platform/default/mbgl/storage/offline_download.cpp @@ -205,8 +205,8 @@ void OfflineDownload::activateDownload() { style::GeoJSONSource::Impl* geojsonSource = static_cast<style::GeoJSONSource::Impl*>(source->baseImpl.get()); - if (!geojsonSource->loaded) { - ensureResource(Resource::source(geojsonSource->getURL())); + if (geojsonSource->getURL()) { + ensureResource(Resource::source(*geojsonSource->getURL())); } break; } |