mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Minor api consistency improvement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12645 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f40d164193
commit
29821cab66
4 changed files with 17 additions and 7 deletions
|
@ -739,7 +739,8 @@ static SEL eqSel;
|
|||
* if it is greater, and NSOrderedSame if it is equal.
|
||||
*/
|
||||
- (unsigned) insertionPosition: (id)item
|
||||
usingFunction: (NSComparisonResult (*)(id, id))sorter
|
||||
usingFunction: (NSComparisonResult (*)(id, id, void *))sorter
|
||||
context: (void *)context
|
||||
{
|
||||
unsigned upper = _count;
|
||||
unsigned lower = 0;
|
||||
|
@ -763,7 +764,7 @@ static SEL eqSel;
|
|||
{
|
||||
NSComparisonResult comparison;
|
||||
|
||||
comparison = (*sorter)(item, _contents_array[index]);
|
||||
comparison = (*sorter)(item, _contents_array[index], context);
|
||||
if (comparison == NSOrderedAscending)
|
||||
{
|
||||
upper = index;
|
||||
|
@ -782,7 +783,7 @@ static SEL eqSel;
|
|||
* items that are equal to the new one.
|
||||
*/
|
||||
while (index < _count
|
||||
&& (*sorter)(item, _contents_array[index]) != NSOrderedAscending)
|
||||
&& (*sorter)(item, _contents_array[index], context) != NSOrderedAscending)
|
||||
{
|
||||
index++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue