[PATCH v5 1/4] shell32/autocomplete: Implement a cache and sort the enumerated strings for proper behavior

Huw Davies huw at codeweavers.com
Fri Nov 2 08:34:47 CDT 2018


On Fri, Nov 02, 2018 at 03:28:00PM +0200, Gabriel Ivăncescu wrote:
> On Fri, Nov 2, 2018 at 1:45 PM Huw Davies <huw at codeweavers.com> wrote:
> >
> > Missed this before, but this is an unnecessary change.
> > Let's also have a blank line between variable declarations and code.
> >
> Ok.
> 
> >
> > I mentioned the variable names in this function last time.  'i' and
> > 'k' would be ok for loops, but here they're not used in that way;
> > 'start' and 'end' would be much better choices.  And like I said, then
> > you really don't need 'cnt' at all.
> >
> But then I'd still need an 'i' to iterate through when inserting the
> strings, if I don't use cnt (since it's needed for show_listbox
> below). I won't be able to do end - start there if I change start...
> 
> So net effect isn't really better compared to cnt (same amount of
> variables; instead of cnt, start, end we'll need i, start, end),
> though renaming the vars sounds like a good idea.

Right, sorry, I missed that you use cnt in show_listbox().  So yeah,
rename i -> start, k -> end, then either use cnt and increment start
in the loop, or use a i in the loop without cnt.  I don't mind either
way.

Huw.



More information about the wine-devel mailing list