Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit be37d80

Browse files
authored
[darwin] remove accountType check (#16449)
1 parent 296ca0d commit be37d80

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

platform/darwin/src/http_file_source.mm

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ void cancel() {
9393

9494
NSURLSession* session = nil;
9595
NSString* userAgent = nil;
96-
NSInteger accountType = 0;
9796

9897
private:
9998
NSString* getUserAgent() const;
@@ -196,12 +195,11 @@ BOOL isValidMapboxEndpoint(NSURL *url) {
196195
}
197196

198197
MGL_APPLE_EXPORT
199-
NSURL *resourceURLWithAccountType(const Resource& resource, NSInteger accountType) {
198+
NSURL *resourceURL(const Resource& resource) {
200199

201200
NSURL *url = [NSURL URLWithString:@(resource.url.c_str())];
202-
203-
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
204-
if (accountType == 0 && isValidMapboxEndpoint(url)) {
201+
202+
if (isValidMapboxEndpoint(url)) {
205203
NSURLComponents *components = [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO];
206204
NSMutableArray *queryItems = [NSMutableArray array];
207205

@@ -219,9 +217,6 @@ BOOL isValidMapboxEndpoint(NSURL *url) {
219217
components.queryItems = queryItems;
220218
url = components.URL;
221219
}
222-
#else
223-
(void)accountType;
224-
#endif
225220
return url;
226221
}
227222

@@ -230,7 +225,7 @@ BOOL isValidMapboxEndpoint(NSURL *url) {
230225
auto shared = request->shared; // Explicit copy so that it also gets copied into the completion handler block below.
231226

232227
@autoreleasepool {
233-
NSURL *url = resourceURLWithAccountType(resource, impl->accountType);
228+
NSURL *url = resourceURL(resource);
234229
[MGLNativeNetworkManager.sharedManager debugLog:@"Requesting URI: %@", url.relativePath];
235230

236231
NSMutableURLRequest *req = [NSMutableURLRequest requestWithURL:url];

0 commit comments

Comments
 (0)