[PATCH v3 3/6] shell32/autocomplete: Implement a cache and sort the enumerated strings for proper behavior

Gabriel Ivăncescu gabrielopcode at gmail.com
Tue Oct 30 06:03:27 CDT 2018


On Tue, Oct 30, 2018 at 12:15 PM Huw Davies <huw at codeweavers.com> wrote:
>
> There are too many variables tracking size in this block which makes the whole
> thing confusing.  You should just need array_size, cur and n.   If you really
> need a boolean to break out of the outer loop then name that variable 'done'
> and change the for (;;) -> while (!done)
>
> Huw.

Yeah I can cull some variables. My reasoning for why I chose
curblock_size was to make it more flexible so that the "rate of
expansion" can be easily adjusted, should it be needed. If I make it
like array_size *= 2, then I'll have to hardcode for this when
calculating rem (or cur), unlike now where changing the rate of
expansion can be easily done by adjusting just the curblock_size =
array_size line (to literally any number, except zero).

I'll change it though, no problem.



More information about the wine-devel mailing list