On 8/30/05, Adam Fedor <[EMAIL PROTECTED]> wrote:
> [...] 
> Log message:
>         New implementation of NSSortDescriptor.
> 

In NSSortDescriptor.m, there is this method:

- (NSArray *) sortedArrayUsingDescriptors: (NSArray *) sortDescriptors
{
  NSMutableArray * sortedArray = [NSMutableArray arrayWithArray: self];

  [sortedArray sortUsingDescriptors: sortDescriptors];

  return [[sortedArray copy] autorelease];
}

Wouldn't it be better if the last line was (to spare a copy):
  return [sortedArray makeImmutableCopyOnFail:NO];

Benhur


_______________________________________________
Gnustep-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to