mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 12:45:37 +08:00
Ran Convert > To Modern Objective C Syntax
This commit is contained in:
@@ -60,7 +60,7 @@ static RCTAssertFunction RCTGetLocalAssertFunction()
|
||||
{
|
||||
NSMutableDictionary *threadDictionary = [NSThread currentThread].threadDictionary;
|
||||
NSArray *functionStack = threadDictionary[RCTAssertFunctionStack];
|
||||
RCTAssertFunction assertFunction = [functionStack lastObject];
|
||||
RCTAssertFunction assertFunction = functionStack.lastObject;
|
||||
if (assertFunction) {
|
||||
return assertFunction;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ void RCTPerformBlockWithAssertFunction(void (^block)(void), RCTAssertFunction as
|
||||
NSString *RCTCurrentThreadName(void)
|
||||
{
|
||||
NSThread *thread = [NSThread currentThread];
|
||||
NSString *threadName = [thread isMainThread] ? @"main" : thread.name;
|
||||
NSString *threadName = thread.isMainThread ? @"main" : thread.name;
|
||||
if (threadName.length == 0) {
|
||||
const char *label = dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL);
|
||||
if (label && strlen(label) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user