mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Convert alloc/init to new to please linter
This commit is contained in:
@@ -115,11 +115,11 @@ RCT_EXPORT_MODULE()
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
|
||||
_locationManager = [[CLLocationManager alloc] init];
|
||||
_locationManager = [CLLocationManager new];
|
||||
_locationManager.distanceFilter = RCT_DEFAULT_LOCATION_ACCURACY;
|
||||
_locationManager.delegate = self;
|
||||
|
||||
_pendingRequests = [[NSMutableArray alloc] init];
|
||||
_pendingRequests = [NSMutableArray new];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ RCT_EXPORT_METHOD(getCurrentPosition:(RCTLocationOptions)options
|
||||
}
|
||||
|
||||
// Create request
|
||||
RCTLocationRequest *request = [[RCTLocationRequest alloc] init];
|
||||
RCTLocationRequest *request = [RCTLocationRequest new];
|
||||
request.successBlock = successBlock;
|
||||
request.errorBlock = errorBlock ?: ^(NSArray *args){};
|
||||
request.options = options;
|
||||
|
||||
Reference in New Issue
Block a user