At 7:44 PM +0200 12/28/99, Vadim Chekan wrote:
>Hi!
>
>In process of recovering "prefix" search method I foung 2 bugs:
>Strings::lowercase(),Strings::uppercase() didn't support national chars:
>fix commited, and List::Get_Next() don't change current_index.
>
>List::Start_Get:
>void               Start_Get(ListCursor& cursor) const { cursor.current
>= head; cursor.current_index = -1;}
>
>  >From List::Get_Next()
>        if (cursor.current_index >= 0)
>             cursor.current_index++;
>
>        ^^^^^ this code never executes because current_index == -1
>
>My preposition:
>  1. start current_index counting from 0, not from -1.
>  2. remove check cursor.current_index >= 0. Anyone know what for it is?

I think I can answer #2: It ensures Get_Next() doesn't work unless 
you've performed a Start_Get().

I can't think of a good reason not to do #1, but we could just as well add:

else (cursor.current_index == -1)
        cursor.current_index = 0;

-Geoff


------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] 
You will receive a message to confirm this. 

Reply via email to