NSNotFound
is defined as NSIntegerMax
, which is defined as LONG_MAX
.
NSRange.location
is defined as a NSUInteger
.
Some Foundation methods return an NSRange
whose location value is NSNotFound
.
So, one often does this comparison:
if (aRange.location == NSNotFound)
But isn't that a comparison between signed and unsigned integers that should generate a warning?