Apply patch by Patrick Laurent and tidy a bit.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39411 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2016-02-24 07:41:20 +00:00
parent 28c824a78a
commit a51249a65d
4 changed files with 67 additions and 47 deletions

View file

@ -914,9 +914,9 @@ static SEL rlSel;
return nil;
}
- (id) objectAtIndexedSubscript: (size_t)anIndex
- (id) objectAtIndexedSubscript: (NSUInteger)anIndex
{
return [self objectAtIndex: (NSUInteger)anIndex];
return [self objectAtIndex: anIndex];
}
- (NSArray *) objectsAtIndexes: (NSIndexSet *)indexes
@ -2055,9 +2055,16 @@ compare(id elem1, id elem2, void* context)
[self subclassResponsibility: _cmd];
}
- (void) setObject: (id)anObject atIndexedSubscript: (size_t)anIndex
- (void) setObject: (id)anObject atIndexedSubscript: (NSUInteger)anIndex
{
[self replaceObjectAtIndex: (NSUInteger)anIndex withObject: anObject];
if ([self count] == anIndex)
{
[self addObject: anObject];
}
else
{
[self replaceObjectAtIndex: anIndex withObject: anObject];
}
}
/** Replaces the values in the receiver at the locations given by the