IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12317 for trunk/psLib


Ignore:
Timestamp:
Mar 8, 2007, 10:38:30 AM (19 years ago)
Author:
Paul Price
Message:

Fixing bug in psListSort --- iterators weren't being made to point at the new list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psList.c

    r12314 r12317  
    77 *  @author Joshua Hoblitt, University of Hawaii
    88 *
    9  *  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2007-03-08 19:51:59 $
     9 *  @version $Revision: 1.67 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2007-03-08 20:38:30 $
    1111 *
    1212 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    553553    psFree(arr);
    554554
    555     // sorting should invalidate all iterator positions.
     555    // Invalidate all iterator positions.
     556    // Also need to point them to the new list.
    556557    for (int i = 0; i < iterators->n; i++) {
    557         ((psListIterator*)iterators->data[i])->cursor = NULL;
     558        psListIterator *iterator = iterators->data[i]; // Iterator of interest
     559        iterator->list = list;
     560        iterator->cursor = NULL;
    558561    }
    559562
Note: See TracChangeset for help on using the changeset viewer.