File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,7 @@ - (NSMutableDictionary*) dictionary {
237237 NSMutableDictionary *dictionary = [NSMutableDictionary dictionary ];
238238
239239 #define assign (x ) \
240- do { if (self.x ) { dictionary[@#x] = self.x ; } } while (0 )
240+ do { if (self.x != nil ) { dictionary[@#x] = self.x ; } } while (0 )
241241
242242 assign (sku);
243243 assign (name);
Original file line number Diff line number Diff line change 149149 }
150150
151151 #define addNumber (field , name ) { \
152- if (self.field) { \
152+ if (self.field != nil ) { \
153153 dictionary[@#name] = self.field; \
154154 } \
155155 }
Original file line number Diff line number Diff line change @@ -801,7 +801,7 @@ - (BOOL)readBoolFromDefaults:(NSString *)key {
801801- (NSInteger )readIntegerFromDefaults : (NSString *)key {
802802 @synchronized (self) {
803803 NSNumber *number = self.persistenceDict [key];
804- if (number) {
804+ if (number != nil ) {
805805 return [number integerValue ];
806806 }
807807 return NSNotFound ;
Original file line number Diff line number Diff line change 3333#pragma mark - BNCNetworkService
3434
3535@interface BNCNetworkService : NSObject <BNCNetworkServiceProtocol>
36- + (id <BNCNetworkServiceProtocol> ) new ;
36+ + (instancetype ) new ;
3737
3838- (void ) cancelAllOperations ;
3939
4040- (BNCNetworkOperation*) networkOperationWithURLRequest : (NSMutableURLRequest *)request
41- completion : (void (^)(BNCNetworkOperation* operation))completion ;
41+ completion : (void (^)(id <BNCNetworkOperationProtocol> operation))completion ;
4242
4343- (NSError *) pinSessionToPublicSecKeyRefs : (NSArray /* *<SecKeyRef>*/ *)publicKeys ;
4444
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ - (NSString*) stringFromResponseData {
7575
7676@implementation BNCNetworkService
7777
78- + (id <BNCNetworkServiceProtocol> ) new {
78+ + (instancetype ) new {
7979 return [[self alloc ] init ];
8080}
8181
@@ -173,7 +173,7 @@ - (BOOL) operationsAreSuspended {
173173#pragma mark - Operations
174174
175175- (BNCNetworkOperation*) networkOperationWithURLRequest : (NSMutableURLRequest *)request
176- completion : (void (^)(BNCNetworkOperation* operation))completion {
176+ completion : (void (^)(id <BNCNetworkOperationProtocol> operation))completion {
177177
178178 BNCNetworkOperation *operation = [BNCNetworkOperation new ];
179179 if (![request isKindOfClass: [NSMutableURLRequest class ]]) {
You can’t perform that action at this time.
0 commit comments