mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
implement missing method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31984 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
425773be2d
commit
dc8136dbc5
3 changed files with 38 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2011-02-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSPointerArray.m: ([-allObjects]) implement missing method.
|
||||||
|
|
||||||
2011-01-29 Stefan Bidigaray <stefanbidi@gmail.com>
|
2011-01-29 Stefan Bidigaray <stefanbidi@gmail.com>
|
||||||
|
|
||||||
* Source/NSCalendar.m: Handle current calendar updates.
|
* Source/NSCalendar.m: Handle current calendar updates.
|
||||||
|
|
|
@ -63,7 +63,7 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
- (NSUInteger) count;
|
- (NSUInteger) count;
|
||||||
|
|
||||||
/** Initialises the receiver with the spefieifd options.
|
/** Initialises the receiver with the specified options.
|
||||||
*/
|
*/
|
||||||
- (id) initWithOptions: (NSPointerFunctionsOptions)options;
|
- (id) initWithOptions: (NSPointerFunctionsOptions)options;
|
||||||
|
|
||||||
|
|
|
@ -233,6 +233,39 @@ static Class concreteClass = Nil;
|
||||||
[exception raise];
|
[exception raise];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSArray*) allObjects
|
||||||
|
{
|
||||||
|
NSUInteger i;
|
||||||
|
NSUInteger c = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < _count; i++)
|
||||||
|
{
|
||||||
|
if (_contents[i] != 0)
|
||||||
|
{
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 == c)
|
||||||
|
{
|
||||||
|
return [NSArray array];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GSMutableArray *a = [GSMutableArray arrayWithCapacity: c];
|
||||||
|
|
||||||
|
for (i = 0; i < _count; i++)
|
||||||
|
{
|
||||||
|
if (_contents[i] != 0)
|
||||||
|
{
|
||||||
|
[a addObject: (id)_contents[i]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[a makeImmutableCopyOnFail: NO];
|
||||||
|
return a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void) compact
|
- (void) compact
|
||||||
{
|
{
|
||||||
NSUInteger i = _count;
|
NSUInteger i = _count;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue