Skip to content

Commit

Permalink
Fix YYModel Issue: Xcode Warning: This block declaration is not a pro…
Browse files Browse the repository at this point in the history
…totype.

See: <ibireme/YYModel#251>
  • Loading branch information
Andy0570 committed Jul 27, 2021
1 parent 378e5a8 commit 826c825
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions YYKit/Base/Foundation/NSString+YYAdd.h
Expand Up @@ -292,6 +292,8 @@ NS_ASSUME_NONNULL_BEGIN

/**
Trim blank characters (space and newline) in head and tail.
修剪头部和尾部的空白字符(空格和换行)。
@return the trimmed string.
*/
- (NSString *)stringByTrim;
Expand Down
4 changes: 2 additions & 2 deletions YYKit/Model/NSObject+YYModel.m
Expand Up @@ -1062,9 +1062,9 @@ static void ModelSetValueForProperty(__unsafe_unretained id model,

case YYEncodingTypeBlock: {
if (isNull) {
((void (*)(id, SEL, void (^)()))(void *) objc_msgSend)((id)model, meta->_setter, (void (^)())NULL);
((void (*)(id, SEL, void (^)(void)))(void *) objc_msgSend)((id)model, meta->_setter, (void (^)(void))NULL);
} else if ([value isKindOfClass:YYNSBlockClass()]) {
((void (*)(id, SEL, void (^)()))(void *) objc_msgSend)((id)model, meta->_setter, (void (^)())value);
((void (*)(id, SEL, void (^)(void)))(void *) objc_msgSend)((id)model, meta->_setter, (void (^)(void))value);
}
} break;

Expand Down

0 comments on commit 826c825

Please sign in to comment.