将我的项目迁移到 Obejctive-C ARC 时,出现一个错误:
implicit conversion of 'bool' (aka 'signed char') to 'nsdata *' is disallowed with arc
Xcode 所指的函数正在返回NO
,或者nil
尽管它的返回类型是 type NSData
:
- (NSData *)compressBytes:(Bytef *)bytes length:(NSUInteger)length error:(NSError **)err shouldFinish:(BOOL)shouldFinish
{
if (length == 0) return nil;
int status;
if (status == myVariable) {
break;
} else if (status != y_OK) {
if (err) {
*err = [[self class] deflateErrorWithCode:status];
}
return NO;
}
但是,我不太确定我知道如何解决这个问题,任何想法都会受到赞赏。