|
From: | Jeremy Bettis |
Subject: | Re: isEqual: and hash in NSDate |
Date: | Fri, 22 Jul 2005 07:40:26 -0500 |
To: "Jeremy Bettis" <address@hidden> Cc: <address@hidden> Sent: Thursday, July 21, 2005 7:22 PM Subject: Re: isEqual: and hash in NSDate
- (BOOL) isEqual: (id)other { [...] if ([other isKindOfClass: abstractClass] && (int)(otherTime(self)+0.5) == (int)(otherTime(other)+0.5) )Any reason why you don't want to compare [self hash] to [other hash]?
otherTime() accesses the instance var directly when it can and looks as lightweight or lighter than calling -hash. Other than that, no reason.
[Prev in Thread] | Current Thread | [Next in Thread] |