mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +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
59bdeabe4b
commit
7bd047b3b1
4 changed files with 17 additions and 7 deletions
|
@ -1472,7 +1472,8 @@ static NSString *indentStrings[] = {
|
|||
* 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 count = [self count];
|
||||
unsigned upper = count;
|
||||
|
@ -1499,7 +1500,7 @@ static NSString *indentStrings[] = {
|
|||
{
|
||||
NSComparisonResult comparison;
|
||||
|
||||
comparison = (*sorter)(item, (*oai)(self, oaiSel, index));
|
||||
comparison = (*sorter)(item, (*oai)(self, oaiSel, index), context);
|
||||
if (comparison == NSOrderedAscending)
|
||||
{
|
||||
upper = index;
|
||||
|
@ -1518,7 +1519,7 @@ static NSString *indentStrings[] = {
|
|||
* items that are equal to the new one.
|
||||
*/
|
||||
while (index < count
|
||||
&& (*sorter)(item, (*oai)(self, oaiSel, index)) != NSOrderedAscending)
|
||||
&& (*sorter)(item, (*oai)(self, oaiSel, index), context) != NSOrderedAscending)
|
||||
{
|
||||
index++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue