Skip to content

Commit 0ffd414

Browse files
author
featherless
authored
Fix nullability annotations in NITableViewModel (jverkoey#701)
These were failing with the following error: ``` nimbus/src/models/src/NITableViewModel.m:61:16: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull] return [self initWithDelegate:nil]; ```
1 parent c78cc48 commit 0ffd414

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/models/src/NITableViewModel.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ typedef enum {
5454
#pragma mark Creating Table View Models
5555

5656
// Designated initializer.
57-
- (nonnull id)initWithDelegate:(nonnull id<NITableViewModelDelegate>)delegate;
58-
- (nonnull id)initWithListArray:(nonnull NSArray *)sectionedArray delegate:(nonnull id<NITableViewModelDelegate>)delegate;
57+
- (nonnull id)initWithDelegate:(nullable id<NITableViewModelDelegate>)delegate NS_DESIGNATED_INITIALIZER;
58+
- (nonnull id)initWithListArray:(nonnull NSArray *)sectionedArray delegate:(nullable id<NITableViewModelDelegate>)delegate;
5959
// Each NSString in the array starts a new section. Any other object is a new row (with exception of certain model-specific objects).
60-
- (nonnull id)initWithSectionedArray:(nonnull NSArray *)sectionedArray delegate:(nonnull id<NITableViewModelDelegate>)delegate;
60+
- (nonnull id)initWithSectionedArray:(nonnull NSArray *)sectionedArray delegate:(nullable id<NITableViewModelDelegate>)delegate;
6161

6262
#pragma mark Accessing Objects
6363

0 commit comments

Comments
 (0)