[core] unify URL prefix detection (asset:// and mapbox://)

This commit is contained in:
Konstantin Käfer
2016-01-08 12:14:39 +01:00
parent b6fca67089
commit bc309d84d7
6 changed files with 18 additions and 12 deletions

View File

@@ -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) {