diff options
author | jmkiley <jordan.kiley@mapbox.com> | 2020-01-31 15:09:39 -0800 |
---|---|---|
committer | jmkiley <jordan.kiley@mapbox.com> | 2020-01-31 15:09:39 -0800 |
commit | e34d1bce9850a57808fb1b0b551641a07d2f626e (patch) | |
tree | f0c9d39722b213aaecba064293f24495dd2e24f2 | |
parent | d7c8104decbbea8203bd79a95c0647bc4e1a2196 (diff) | |
download | qtlocation-mapboxgl-e34d1bce9850a57808fb1b0b551641a07d2f626e.tar.gz |
[ios, macos] remove accountType check
-rw-r--r-- | platform/darwin/src/http_file_source.mm | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/platform/darwin/src/http_file_source.mm b/platform/darwin/src/http_file_source.mm index 6132ba7f9b..abd99d3c97 100644 --- a/platform/darwin/src/http_file_source.mm +++ b/platform/darwin/src/http_file_source.mm @@ -196,12 +196,11 @@ BOOL isValidMapboxEndpoint(NSURL *url) { } MGL_APPLE_EXPORT -NSURL *resourceURLWithAccountType(const Resource& resource, NSInteger accountType) { +NSURL *resourceURLWithAccountType(const Resource& resource) { NSURL *url = [NSURL URLWithString:@(resource.url.c_str())]; - -#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR - if (accountType == 0 && isValidMapboxEndpoint(url)) { + + if (isValidMapboxEndpoint(url)) { NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO]; NSMutableArray *queryItems = [NSMutableArray array]; @@ -218,9 +217,7 @@ NSURL *resourceURLWithAccountType(const Resource& resource, NSInteger accountTyp components.queryItems = queryItems; url = components.URL; } -#else - (void)accountType; -#endif + return url; } @@ -229,7 +226,7 @@ std::unique_ptr<AsyncRequest> HTTPFileSource::request(const Resource& resource, auto shared = request->shared; // Explicit copy so that it also gets copied into the completion handler block below. @autoreleasepool { - NSURL *url = resourceURLWithAccountType(resource, impl->accountType); + NSURL *url = resourceURLWithAccountType(resource); [MGLNativeNetworkManager.sharedManager debugLog:@"Requesting URI: %@", url.relativePath]; NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url]; |