Nice catch re wxString, just need to sort alphabetically for equal priority items?
The problem is,
CalcValue() (which is tries to nearly replicate/quantify the algorithm YCM designed) gives
wxString a worse value because its word boundary string is only "ws" (whereas
wxSTRING_REVERSE_ITERATOR for example is "wsri", more closely matching the input). (Items with equal priority *should* already be in alphabetical order, assuming my implementation works the way I think it does.)
Unfortunately, re-balancing the weighting algorithm would probably cause it to lose the benefit it gives in most other cases. (I am tempted to hardcode a small score boost for
wxString, because it is rather common in wxWidgets based code... but that could get even uglier if other similar problem tokens show up.)
Re threads, need to be careful about passing data that is constructed in the worker thread being deleted before it gets handled on the main thread. There are some posts about certain events being unsafe by (i think) ollydbg.
Thanks, I will look for those.