> Can't you use std::remove multiple times and then perform only one erase?
> Should be much more efficient, no?
I don't know. For me the most efficient way would be to reset the "what" char pointer to the
beginning after running the for loop in the void "handle_opt". The I don't need the "delete_opt"
void. But I failed to do this.
(My solution is surely not the one with the shortest code, but easy to understand and working
correctly now. I'm technically too limited to come up with a better one, but of course a shorter
code would be appreciated.)
> Better still, use a predicate that itself loops over the what. Why are you
> using a c-string anyway? It's been a long time (and I get lost with pointers
> to pointers),
I'm also confused by the pointer to pointer stuff, but this has been used in tex2lyx before I
started my work, so I decided not to touch things I don't understand.
> but I think that the code below, or something like it should do
> the trick. Minimal re-working of your opts vector...
I'm still a bloody C++ beginner and lost when looking into your code. The best thing would be to
provide a patch tho make the void "handle_opt" work without the need to have a "delete_void" called
afterwards.
best regards
Uwe