isChannelOptionsEqualTo->hasChannelOptionsEqualTo

pull/16190/head
Muxi Yan 6 years ago
parent 35f6ab959e
commit cc58524994
  1. 2
      src/objective-c/GRPCClient/GRPCCallOptions.h
  2. 2
      src/objective-c/GRPCClient/GRPCCallOptions.m
  3. 2
      src/objective-c/GRPCClient/private/GRPCChannelPool.m

@ -199,7 +199,7 @@ typedef NS_ENUM(NSInteger, GRPCTransportType) {
/**
* Return if the channel options are equal to another object.
*/
- (BOOL)isChannelOptionsEqualTo:(GRPCCallOptions *)callOptions;
- (BOOL)hasChannelOptionsEqualTo:(GRPCCallOptions *)callOptions;
/**
* Hash for channel options.

@ -229,7 +229,7 @@ static const NSUInteger kDefaultChannelID = 0;
return newOptions;
}
- (BOOL)isChannelOptionsEqualTo:(GRPCCallOptions *)callOptions {
- (BOOL)hasChannelOptionsEqualTo:(GRPCCallOptions *)callOptions {
if (!(callOptions.userAgentPrefix == _userAgentPrefix ||
[callOptions.userAgentPrefix isEqualToString:_userAgentPrefix]))
return NO;

@ -150,7 +150,7 @@ extern const char *kCFStreamVarName;
NSAssert([object isKindOfClass:[GRPCChannelConfiguration class]], @"Illegal :isEqual");
GRPCChannelConfiguration *obj = (GRPCChannelConfiguration *)object;
if (!(obj.host == _host || [obj.host isEqualToString:_host])) return NO;
if (!(obj.callOptions == _callOptions || [obj.callOptions isChannelOptionsEqualTo:_callOptions]))
if (!(obj.callOptions == _callOptions || [obj.callOptions hasChannelOptionsEqualTo:_callOptions]))
return NO;
return YES;

Loading…
Cancel
Save