mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Merge 0.6.6 branch into main.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7187 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a6a395487a
commit
7b0f402b1c
71 changed files with 4888 additions and 5571 deletions
|
@ -1332,16 +1332,31 @@ static BOOL deallocNotifications = NO;
|
|||
double_release_check_enabled = enable;
|
||||
}
|
||||
|
||||
- (int) compare: (id)anotherObject;
|
||||
- (int) compare: (id)anotherObject
|
||||
{
|
||||
if ([self isEqual:anotherObject])
|
||||
return 0;
|
||||
if (anotherObject == self)
|
||||
{
|
||||
return NSOrderedSame;
|
||||
}
|
||||
if (anotherObject == nil)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"nil argument for compare:"];
|
||||
}
|
||||
if ([self isEqual: anotherObject])
|
||||
{
|
||||
return NSOrderedSame;
|
||||
}
|
||||
// Ordering objects by their address is pretty useless,
|
||||
// so subclasses should override this is some useful way.
|
||||
else if (self > anotherObject)
|
||||
return 1;
|
||||
if (self > anotherObject)
|
||||
{
|
||||
return NSOrderedDescending;
|
||||
}
|
||||
else
|
||||
return -1;
|
||||
{
|
||||
return NSOrderedAscending;
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL) isMetaClass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue