objective c - iOS compare NSUInteger to NSInteger -
I am trying to compare each other with numerical values but compare me with the "integer comparison of different signals" (Aka 'inti') and 'nsuentengar' (aka 'unsigned' int).
Which is rational, I do this;) But how can I correct this warning? This is the code that warns:
if (page> = self.controllers.count || page & lt; 0) returns;
Page -1 can therefore be an NSInteger but is counted on an NSUntiger. Instead of using NSINtegaer for page and -1, use NSUInteger and NSNotFound where you - 1.
Then you are comparing the same type.
Return (page & gt; = self.controllers.count || page = = NSNotFound);
Comments
Post a Comment