mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 12:15:37 +08:00
Convert alloc/init to new to please linter
This commit is contained in:
@@ -78,7 +78,7 @@ RCT_EXPORT_MODULE()
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
_paused = YES;
|
||||
_timers = [[RCTSparseArray alloc] init];
|
||||
_timers = [RCTSparseArray new];
|
||||
|
||||
for (NSString *name in @[UIApplicationWillResignActiveNotification,
|
||||
UIApplicationDidEnterBackgroundNotification,
|
||||
@@ -134,7 +134,7 @@ RCT_EXPORT_MODULE()
|
||||
|
||||
- (void)didUpdateFrame:(__unused RCTFrameUpdate *)update
|
||||
{
|
||||
NSMutableArray *timersToCall = [[NSMutableArray alloc] init];
|
||||
NSMutableArray *timersToCall = [NSMutableArray new];
|
||||
for (RCTTimer *timer in _timers.allObjects) {
|
||||
if ([timer updateFoundNeedsJSUpdate]) {
|
||||
[timersToCall addObject:timer.callbackID];
|
||||
|
||||
Reference in New Issue
Block a user