mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
Convert alloc/init to new to please linter
This commit is contained in:
@@ -142,7 +142,7 @@ static JSValueRef RCTConsoleProfile(JSContextRef context, __unused JSObjectRef o
|
||||
{
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
profiles = [[NSMutableArray alloc] init];
|
||||
profiles = [NSMutableArray new];
|
||||
});
|
||||
|
||||
static int profileCounter = 1;
|
||||
|
||||
@@ -66,10 +66,10 @@ RCT_EXPORT_MODULE()
|
||||
- (void)setUp
|
||||
{
|
||||
if (!_webView) {
|
||||
_webView = [[UIWebView alloc] init];
|
||||
_webView = [UIWebView new];
|
||||
}
|
||||
|
||||
_objectsToInject = [[NSMutableDictionary alloc] init];
|
||||
_objectsToInject = [NSMutableDictionary new];
|
||||
_commentsRegex = [NSRegularExpression regularExpressionWithPattern:@"(^ *?\\/\\/.*?$|\\/\\*\\*[\\s\\S]*?\\*\\/)" options:NSRegularExpressionAnchorsMatchLines error:NULL],
|
||||
_scriptTagsRegex = [NSRegularExpression regularExpressionWithPattern:@"<(\\/?script[^>]*?)>" options:0 error:NULL],
|
||||
_webView.delegate = self;
|
||||
|
||||
Reference in New Issue
Block a user