diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-01-08 12:14:39 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-01-08 12:14:39 +0100 |
commit | bc309d84d77a5719a332f2dffdf24006d8610f97 (patch) | |
tree | 44cc87134e9eb59c3a259482cfdca50c84b287d6 /src/mbgl/util/mapbox.cpp | |
parent | b6fca670896e6351a03916fd9fb646e1970d3ebe (diff) | |
download | qtlocation-mapboxgl-bc309d84d77a5719a332f2dffdf24006d8610f97.tar.gz |
[core] unify URL prefix detection (asset:// and mapbox://)
Diffstat (limited to 'src/mbgl/util/mapbox.cpp')
-rw-r--r-- | src/mbgl/util/mapbox.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/util/mapbox.cpp b/src/mbgl/util/mapbox.cpp index 0798607467..7bcfa7322c 100644 --- a/src/mbgl/util/mapbox.cpp +++ b/src/mbgl/util/mapbox.cpp @@ -13,7 +13,7 @@ const std::string protocol = "mapbox://"; const std::string baseURL = "https://api.mapbox.com/"; bool isMapboxURL(const std::string& url) { - return url.compare(0, protocol.length(), protocol) == 0; + return std::equal(protocol.begin(), protocol.end(), url.begin()); } std::vector<std::string> getMapboxURLPathname(const std::string& url) { |