summaryrefslogtreecommitdiff
path: root/platform/default/default_file_source.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-01-24 08:34:05 -0800
committerKonstantin Käfer <mail@kkaefer.com>2018-01-25 13:45:47 -0800
commitc148a7a0616568b0ae82ab8dc89c1c096af10537 (patch)
tree678bc978cb108a21f9ed22a6b88d33952b0083e7 /platform/default/default_file_source.cpp
parentda7759a273c096117e513b249741355865f9af8e (diff)
downloadqtlocation-mapboxgl-c148a7a0616568b0ae82ab8dc89c1c096af10537.tar.gz
[core] align implementations of local and asset file source
Diffstat (limited to 'platform/default/default_file_source.cpp')
-rw-r--r--platform/default/default_file_source.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/platform/default/default_file_source.cpp b/platform/default/default_file_source.cpp
index 608b782ab9..cb602995a4 100644
--- a/platform/default/default_file_source.cpp
+++ b/platform/default/default_file_source.cpp
@@ -14,16 +14,6 @@
#include <cassert>
-namespace {
-
-const std::string assetProtocol = "asset://";
-
-bool isAssetURL(const std::string& url) {
- return std::equal(assetProtocol.begin(), assetProtocol.end(), url.begin());
-}
-
-} // namespace
-
namespace mbgl {
class DefaultFileSource::Impl {
@@ -118,7 +108,7 @@ public:
ref.invoke(&FileSourceRequest::setResponse, res);
};
- if (isAssetURL(resource.url)) {
+ if (AssetFileSource::acceptsURL(resource.url)) {
//Asset request
tasks[req] = assetFileSource->request(resource, callback);
} else if (LocalFileSource::acceptsURL(resource.url)) {