Cleaner code using nil messaging

pull/16190/head
Muxi Yan 6 years ago
parent 29bf3864d1
commit 395fc1226f
  1. 2
      src/objective-c/GRPCClient/private/GRPCHost.m

@ -143,10 +143,8 @@ static NSMutableDictionary *gHostCache;
GRPCCallOptions *callOptions = nil; GRPCCallOptions *callOptions = nil;
@synchronized(gHostCache) { @synchronized(gHostCache) {
if ([gHostCache objectForKey:host]) {
callOptions = [gHostCache[host] callOptions]; callOptions = [gHostCache[host] callOptions];
} }
}
if (callOptions == nil) { if (callOptions == nil) {
callOptions = [[GRPCCallOptions alloc] init]; callOptions = [[GRPCCallOptions alloc] init];
} }

Loading…
Cancel
Save