Re: [ROOT] TObjArray Sort method

From: Vincent Régnard (regnard@ganil.fr)
Date: Mon Nov 18 2002 - 02:02:40 MET


Le Sunday 17 November 2002 21:43, Vincent Régnard a tapoté sur son clavier :
> Hello everybody,
> I am using a TObjArray to store Objects and am mainly concentrating on the
> TObjArray::Sort() method. I defined a class derivating from TObject with
> Compare() an IsSortable() method. When sorting the objects in the
> TObjArray, everything appears to work fine : almost all but the last object
> are sorted according to appropriate (increasing mass) sorting criterion.
> Has anyone of you encountered a similar problem or did I missed something ?
> Thanks for your help

Please excuse me for the mistake, the error was my fault in fact. In the sort 
method of my class (calling TObjArray::Sort()) I used GetLast() instead of 
GetLast() + 1 as argument of Sort().
Sorry about it this is a really basic mistake.
Vincent

-- 
  ,           ,
 /             \
((__-^^-,-^^-__))
 `-_---' `---_-'
  `--|o` 'o|--'
     \  `  /
      ): :(
      :o_o:	   http://www.calvix.org
       "-"   http://www.gnu.org



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:18 MET