summaryrefslogtreecommitdiff
path: root/include/mbgl/style
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-08-25 17:44:44 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-08-26 10:30:55 -0700
commitd2abb1b6d5cc129acaadab15152ae286b989d9ba (patch)
tree05528dfb620931cda49b044c2d8fbbcc4da67232 /include/mbgl/style
parent50ae6c738a3ed1da14c73ce507071385bbc441b0 (diff)
downloadqtlocation-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 'include/mbgl/style')
-rw-r--r--include/mbgl/style/sources/geojson_source.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/mbgl/style/sources/geojson_source.hpp b/include/mbgl/style/sources/geojson_source.hpp
index 306a330252..e633e6efba 100644
--- a/include/mbgl/style/sources/geojson_source.hpp
+++ b/include/mbgl/style/sources/geojson_source.hpp
@@ -2,6 +2,7 @@
#include <mbgl/style/source.hpp>
#include <mbgl/util/geojson.hpp>
+#include <mbgl/util/optional.hpp>
#include <mapbox/geojson.hpp>
@@ -42,7 +43,7 @@ public:
void setURL(const std::string& url);
void setGeoJSON(const GeoJSON&);
- std::string getURL();
+ optional<std::string> getURL();
// Private implementation