Skip to content

Commit 8c37f46

Browse files
author
Ben Chatelain
committed
Add NS_DESIGNATED_INITIALIZER macro to init methds
1 parent 13c32cb commit 8c37f46

23 files changed

+24
-24
lines changed

ObjectiveGit/GTBlame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@interface GTBlame : NSObject
1717

1818
/// Designated initializer.
19-
- (instancetype)initWithGitBlame:(git_blame *)blame;
19+
- (instancetype)initWithGitBlame:(git_blame *)blame NS_DESIGNATED_INITIALIZER;
2020

2121
/// Get all the hunks in the blame. A convenience wrapper around `enumerateHunksUsingBlock:`
2222
@property (nonatomic, strong, readonly) NSArray *hunks;

ObjectiveGit/GTBlameHunk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/// A `GTBlameHunk` is an object that provides authorship info for a set of lines in a `GTBlame`.
1616
@interface GTBlameHunk : NSObject
1717

18-
- (instancetype)initWithGitBlameHunk:(git_blame_hunk)hunk;
18+
- (instancetype)initWithGitBlameHunk:(git_blame_hunk)hunk NS_DESIGNATED_INITIALIZER;
1919

2020
/// A NSRange where `location` is the (1 based) starting line number,
2121
/// and `length` is the number of lines in the hunk.

ObjectiveGit/GTBranch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ typedef NS_ENUM(NSInteger, GTBranchType) {
5252
+ (NSString *)localNamePrefix;
5353
+ (NSString *)remoteNamePrefix;
5454

55-
- (id)initWithReference:(GTReference *)ref repository:(GTRepository *)repo;
55+
- (id)initWithReference:(GTReference *)ref repository:(GTRepository *)repo NS_DESIGNATED_INITIALIZER;
5656
+ (id)branchWithReference:(GTReference *)ref repository:(GTRepository *)repo;
5757

5858
/// Get the target commit for this branch

ObjectiveGit/GTConfiguration+Private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
/// repository - The repository in which the config resides. May be nil.
1919
///
2020
/// Returns the initialized object.
21-
- (id)initWithGitConfig:(git_config *)config repository:(GTRepository *)repository;
21+
- (id)initWithGitConfig:(git_config *)config repository:(GTRepository *)repository NS_DESIGNATED_INITIALIZER;
2222

2323
@end

ObjectiveGit/GTEnumerator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ typedef NS_OPTIONS(unsigned int, GTEnumeratorOptions) {
6666
/// error - If not NULL, set to any error that occurs.
6767
///
6868
/// Returns an initialized enumerator, or nil if an error occurs.
69-
- (id)initWithRepository:(GTRepository *)repo error:(NSError **)error;
69+
- (id)initWithRepository:(GTRepository *)repo error:(NSError **)error NS_DESIGNATED_INITIALIZER;
7070

7171
/// Marks a commit to start traversal from.
7272
///

ObjectiveGit/GTFetchHeadEntry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
/// remoteURLString - URL String where this was originally fetched from. Cannot be nil.
3434
/// targetOID - Target OID. Cannot be nil.
3535
/// merge - Indicates if this is pending a merge.
36-
- (instancetype)initWithReference:(GTReference *)reference remoteURLString:(NSString *)remoteURLString targetOID:(GTOID *)targetOID isMerge:(BOOL)merge;
36+
- (instancetype)initWithReference:(GTReference *)reference remoteURLString:(NSString *)remoteURLString targetOID:(GTOID *)targetOID isMerge:(BOOL)merge NS_DESIGNATED_INITIALIZER;
3737

3838
@end

ObjectiveGit/GTFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extern const NSInteger GTFilterErrorNameAlreadyRegistered;
4545
/// applyBlock - The block to use to apply the filter. Cannot be nil.
4646
///
4747
/// Returns the initialized object.
48-
- (id)initWithName:(NSString *)name attributes:(NSString *)attributes applyBlock:(NSData * (^)(void **payload, NSData *from, GTFilterSource *source, BOOL *applied))applyBlock;
48+
- (id)initWithName:(NSString *)name attributes:(NSString *)attributes applyBlock:(NSData * (^)(void **payload, NSData *from, GTFilterSource *source, BOOL *applied))applyBlock NS_DESIGNATED_INITIALIZER;
4949

5050
/// Look up a filter based on its name.
5151
///

ObjectiveGit/GTFilterList.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ typedef NS_OPTIONS(NSInteger, GTFilterListOptions) {
2626
/// filterList - The filter list to wrap and take ownership of. This filter list
2727
/// will be automatically disposed when the receiver deallocates.
2828
/// Must not be NULL.
29-
- (instancetype)initWithGitFilterList:(git_filter_list *)filterList;
29+
- (instancetype)initWithGitFilterList:(git_filter_list *)filterList NS_DESIGNATED_INITIALIZER;
3030

3131
/// Returns the underlying `git_filter_list`.
3232
- (git_filter_list *)git_filter_list __attribute__((objc_returns_inner_pointer));

ObjectiveGit/GTFilterSource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ typedef NS_ENUM(NSInteger, GTFilterSourceMode) {
4343
/// source - The filter source. Cannot be NULL.
4444
///
4545
/// Returns the initialized object.
46-
- (id)initWithGitFilterSource:(const git_filter_source *)source;
46+
- (id)initWithGitFilterSource:(const git_filter_source *)source NS_DESIGNATED_INITIALIZER;
4747

4848
@end

ObjectiveGit/GTIndex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
/// repository - The repository in which the index resides. Cannot be nil.
7777
///
7878
/// Returns the initialized index.
79-
- (instancetype)initWithGitIndex:(git_index *)index repository:(GTRepository *)repository;
79+
- (instancetype)initWithGitIndex:(git_index *)index repository:(GTRepository *)repository NS_DESIGNATED_INITIALIZER;
8080

8181
/// The underlying `git_index` object.
8282
- (git_index *)git_index __attribute__((objc_returns_inner_pointer));

0 commit comments

Comments
 (0)