Skip to content

Commit adf4315

Browse files
author
Ben Chatelain
committed
GTFilterSource nullability
1 parent 6fc47db commit adf4315

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

ObjectiveGit/GTFilterSource.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ typedef NS_ENUM(NSInteger, GTFilterSourceMode) {
2222
GTFilterSourceModeClean = GIT_FILTER_CLEAN,
2323
};
2424

25+
NS_ASSUME_NONNULL_BEGIN
26+
2527
/// A source item for a filter.
2628
@interface GTFilterSource : NSObject
2729

@@ -33,7 +35,7 @@ typedef NS_ENUM(NSInteger, GTFilterSourceMode) {
3335

3436
/// The OID of the source. Will be nil if the source doesn't exist in the object
3537
/// database.
36-
@property (nonatomic, readonly, strong) GTOID *OID;
38+
@property (nonatomic, readonly, strong, nullable) GTOID *OID;
3739

3840
/// The filter mode.
3941
@property (nonatomic, readonly, assign) GTFilterSourceMode mode;
@@ -43,6 +45,8 @@ typedef NS_ENUM(NSInteger, GTFilterSourceMode) {
4345
/// source - The filter source. Cannot be NULL.
4446
///
4547
/// Returns the initialized object.
46-
- (id)initWithGitFilterSource:(const git_filter_source *)source NS_DESIGNATED_INITIALIZER;
48+
- (nullable instancetype)initWithGitFilterSource:(const git_filter_source *)source NS_DESIGNATED_INITIALIZER;
4749

4850
@end
51+
52+
NS_ASSUME_NONNULL_END

ObjectiveGit/GTFilterSource.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ @implementation GTFilterSource
1616

1717
#pragma mark Lifecycle
1818

19-
- (id)initWithGitFilterSource:(const git_filter_source *)source {
19+
- (instancetype)initWithGitFilterSource:(const git_filter_source *)source {
2020
NSParameterAssert(source != NULL);
2121

2222
self = [super init];

0 commit comments

Comments
 (0)