mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
([OrderedCollection -putObject:atIndex:]): Return type changed from id
to void. Use NSException, not error:. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1274 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5aae0eafb3
commit
7f329b4714
1 changed files with 4 additions and 3 deletions
|
@ -230,7 +230,7 @@
|
||||||
// OVERRIDE SOME KEYED COLLECTION METHODS;
|
// OVERRIDE SOME KEYED COLLECTION METHODS;
|
||||||
|
|
||||||
/* Semantics: You can "put" an element only at index "count" or less */
|
/* Semantics: You can "put" an element only at index "count" or less */
|
||||||
- putObject: newObject atIndex: (unsigned)index
|
- (void) putObject: newObject atIndex: (unsigned)index
|
||||||
{
|
{
|
||||||
unsigned c = [self count];
|
unsigned c = [self count];
|
||||||
|
|
||||||
|
@ -239,8 +239,9 @@
|
||||||
else if (index == c)
|
else if (index == c)
|
||||||
[self appendObject: newObject];
|
[self appendObject: newObject];
|
||||||
else
|
else
|
||||||
[self error:"in %s, can't put an element at index beyond [self count]"];
|
[NSException
|
||||||
return self;
|
raise: NSRangeException
|
||||||
|
format: @"in %s, can't put an element at index beyond [self count]"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- putObject: newObject atKey: index
|
- putObject: newObject atKey: index
|
||||||
|
|
Loading…
Reference in a new issue