Skip to content

Commit 264f596

Browse files
committed
More __kindof macro fixes!
1 parent 2e1fe1d commit 264f596

File tree

5 files changed

+15
-23
lines changed

5 files changed

+15
-23
lines changed

FirebaseUI/API/FirebaseCollectionViewDataSource.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
* datasource.
103103
*/
104104
@property(strong, nonatomic, __NON_NULL) void (^populateCell)
105-
(__KINDOF(UICollectionViewCell *) __NON_NULL_PTR cell,
106-
__KINDOF(NSObject *) __NON_NULL_PTR object);
105+
(__KINDOF(UICollectionViewCell) __NON_NULL_PTR cell,
106+
__KINDOF(NSObject) __NON_NULL_PTR object);
107107

108108
/**
109109
* Initialize an instance of FirebaseCollectionViewDataSource that populates
@@ -271,10 +271,8 @@
271271
* subclass) and the
272272
* corresponding object to populate the cell with.
273273
*/
274-
// clang-format off
275274
- (void)populateCellWithBlock:
276-
(__NON_NULL void (^)(__KINDOF(UICollectionViewCell *) __NON_NULL_PTR cell,
277-
__KINDOF(NSObject *) __NON_NULL_PTR object))callback;
278-
// clang-format on
275+
(__NON_NULL void (^)(__KINDOF(UICollectionViewCell)__NON_NULL_PTR cell,
276+
__KINDOF(NSObject)__NON_NULL_PTR object))callback;
279277

280278
@end

FirebaseUI/API/FirebaseTableViewDataSource.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989
* provided by the datasource.
9090
*/
9191
@property(strong, nonatomic, __NON_NULL) void (^populateCell)
92-
(__KINDOF(UITableViewCell *) __NON_NULL_PTR cell,
93-
__KINDOF(NSObject *) __NON_NULL_PTR object);
92+
(__KINDOF(UITableViewCell) __NON_NULL_PTR cell,
93+
__KINDOF(NSObject) __NON_NULL_PTR object);
9494

9595
/**
9696
* Initialize an instance of FirebaseTableViewDataSource that populates
@@ -250,10 +250,8 @@
250250
* subclass) and the
251251
* corresponding object to populate the cell with.
252252
*/
253-
// clang-format off
254253
- (void)populateCellWithBlock:
255-
(nonnull void (^)(__KINDOF(UITableViewCell *)__NON_NULL_PTR cell,
256-
__KINDOF(NSObject *)__NON_NULL_PTR object))callback;
257-
// clang-format on
254+
(__NON_NULL void (^)(__KINDOF(UITableViewCell)__NON_NULL_PTR cell,
255+
__KINDOF(NSObject)__NON_NULL_PTR object))callback;
258256

259257
@end

FirebaseUI/Implementation/FirebaseCollectionViewDataSource.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,10 @@ - (NSInteger)collectionView:(nonnull UICollectionView *)collectionView
224224
return [self.array count];
225225
}
226226

227-
// clang-format off
228227
- (void)populateCellWithBlock:
229-
(__NON_NULL void (^)(__KINDOF(UICollectionViewCell *) __NON_NULL_PTR cell,
230-
__KINDOF(NSObject *) __NON_NULL_PTR object))callback {
228+
(__NON_NULL void (^)(__KINDOF(UICollectionViewCell)__NON_NULL_PTR cell,
229+
__KINDOF(NSObject)__NON_NULL_PTR object))callback {
231230
self.populateCell = callback;
232231
}
233-
// clang-format on
234232

235233
@end

FirebaseUI/Implementation/FirebaseTableViewDataSource.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,10 @@ - (NSInteger)tableView:(UITableView *)tableView
227227
return [self.array count];
228228
}
229229

230-
// clang-format off
231230
- (void)populateCellWithBlock:
232-
(nonnull void (^)(__KINDOF(UITableViewCell *) __NON_NULL_PTR cell,
233-
__KINDOF(NSObject *) __NON_NULL_PTR object))callback {
231+
(__NON_NULL void (^)(__KINDOF(UITableViewCell)__NON_NULL_PTR cell,
232+
__KINDOF(NSObject)__NON_NULL_PTR object))callback {
234233
self.populateCell = callback;
235234
}
236-
// clang-format on
237235

238236
@end

FirebaseUI/XCodeMacros.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31-
// clang-format ongit
31+
// clang-format on
3232

3333
#ifndef XCodeMacros_h
3434
#define XCodeMacros_h
@@ -56,9 +56,9 @@
5656
#endif
5757

5858
#if defined(__has_feature) && __has_feature(objc_kindof)
59-
#define __KINDOF(class) __kindof class
59+
#define __KINDOF(cls) __kindof cls *
6060
#else
61-
#define __KINDOF id
61+
#define __KINDOF(cls) id
6262
#endif
6363

6464
#endif

0 commit comments

Comments
 (0)