【发布时间】:2011-06-15 15:50:30
【问题描述】:
NSNotFound定义为NSIntegerMax,LONG_MAX定义为。
NSRange.location 被定义为NSUInteger。
一些 Foundation 方法返回一个NSRange,其位置值为NSNotFound。
所以,人们经常做这样的比较:
if (aRange.location == NSNotFound)
但这不是应该产生警告的有符号和无符号整数之间的比较吗?
【问题讨论】: