summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Kiley <jmkiley@users.noreply.github.com>2020-04-30 01:34:53 -0700
committerGitHub <noreply@github.com>2020-04-30 01:34:53 -0700
commitbe37d804b6c775cf2c73a8b7ea15dc4507d98e3a (patch)
treec28ec9301e531c06cf308f083ba72ba86ca64af6
parent296ca0d437d05d3ede17f8202c1f53bc9ee6bc3a (diff)
downloadqtlocation-mapboxgl-be37d804b6c775cf2c73a8b7ea15dc4507d98e3a.tar.gz
[darwin] remove accountType check (#16449)
-rw-r--r--platform/darwin/src/http_file_source.mm13
1 files changed, 4 insertions, 9 deletions
diff --git a/platform/darwin/src/http_file_source.mm b/platform/darwin/src/http_file_source.mm
index c69abccff9..b8ec501d57 100644
--- a/platform/darwin/src/http_file_source.mm
+++ b/platform/darwin/src/http_file_source.mm
@@ -93,7 +93,6 @@ public:
NSURLSession* session = nil;
NSString* userAgent = nil;
- NSInteger accountType = 0;
private:
NSString* getUserAgent() const;
@@ -196,12 +195,11 @@ BOOL isValidMapboxEndpoint(NSURL *url) {
}
MGL_APPLE_EXPORT
-NSURL *resourceURLWithAccountType(const Resource& resource, NSInteger accountType) {
+NSURL *resourceURL(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];
@@ -219,9 +217,6 @@ NSURL *resourceURLWithAccountType(const Resource& resource, NSInteger accountTyp
components.queryItems = queryItems;
url = components.URL;
}
-#else
- (void)accountType;
-#endif
return url;
}
@@ -230,7 +225,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 = resourceURL(resource);
[MGLNativeNetworkManager.sharedManager debugLog:@"Requesting URI: %@", url.relativePath];
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url];