mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
documentation added and a couple of tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24009 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b4a0ecdac3
commit
ff1421c20a
5 changed files with 67 additions and 16 deletions
|
@ -43,15 +43,21 @@
|
|||
- (NSComparisonResult) compareObject: (id) object1 toObject: (id) object2
|
||||
{
|
||||
NSComparisonResult result;
|
||||
id comparedKey1 = [object1 valueForKeyPath: _key],
|
||||
comparedKey2 = [object2 valueForKeyPath: _key];
|
||||
id comparedKey1 = [object1 valueForKeyPath: _key];
|
||||
id comparedKey2 = [object2 valueForKeyPath: _key];
|
||||
|
||||
result = (NSComparisonResult) [comparedKey1 performSelector: _selector
|
||||
withObject: comparedKey2];
|
||||
|
||||
if (_ascending != YES)
|
||||
if (_ascending == NO)
|
||||
{
|
||||
result = -result;
|
||||
if (result == NSOrderedAscending)
|
||||
{
|
||||
result = NSOrderedDescending;
|
||||
}
|
||||
else if (result == NSOrderedDescending)
|
||||
{
|
||||
result = NSOrderedAscending;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue