diff options
Diffstat (limited to 'kpat/freecell-solver/pqueue.c')
-rw-r--r-- | kpat/freecell-solver/pqueue.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kpat/freecell-solver/pqueue.c b/kpat/freecell-solver/pqueue.c index 0e4df49b..086cce96 100644 --- a/kpat/freecell-solver/pqueue.c +++ b/kpat/freecell-solver/pqueue.c @@ -82,17 +82,17 @@ int freecell_solver_PQueuePush( PQUEUE *pq, void *item, pq_rating_t r) { - while( ( i==PTQ_FIRST_ENTRY ? + while( ( i==PQ_FIRST_ENTRY ? (PQUEUE_MaxRating) /* return biggest possible rating if first element */ : - (PGetRating(Elements[ PTQ_PARENT_INDEX(i) ]) ) + (PGetRating(Elements[ PQ_PARENT_INDEX(i) ]) ) ) < r ) { - Elements[ i ] = Elements[ PTQ_PARENT_INDEX(i) ]; + Elements[ i ] = Elements[ PQ_PARENT_INDEX(i) ]; - i = PTQ_PARENT_INDEX(i); + i = PQ_PARENT_INDEX(i); } } @@ -132,7 +132,7 @@ void *freecell_solver_PQueuePop( PQUEUE *pq) return NULL; } - pMaxElement = Elements[PTQ_FIRST_ENTRY]; + pMaxElement = Elements[PQ_FIRST_ENTRY]; /* get pointer to last element in tree */ pLastElement = Elements[ CurrentSize-- ]; @@ -143,7 +143,7 @@ void *freecell_solver_PQueuePop( PQUEUE *pq) /* UNTESTED */ - for( i=PTQ_FIRST_ENTRY; (child = PTQ_LEFT_CHILD_INDEX(i)) <= CurrentSize; i=child ) + for( i=PQ_FIRST_ENTRY; (child = PQ_LEFT_CHILD_INDEX(i)) <= CurrentSize; i=child ) { /* set child to the smaller of the two children... */ |