----- Original Message ----- From: "Markus Hitter" <[EMAIL PROTECTED]>
To: "Jeremy Bettis" <[EMAIL PROTECTED]>
Cc: <[email protected]>
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.


_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to