Convert alloc/init to new to please linter

This commit is contained in:
Nick Lockwood
2015-08-17 07:35:34 -07:00
parent 869ff92dbc
commit 8d1e02b8bd
74 changed files with 172 additions and 172 deletions

View File

@@ -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;

View File

@@ -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;