wxList::insert() return value is wrong
|Reported by:||aldimond||Owned by:|
It returns the iterator you passed in instead of one to the new item.
I'm looking at 2.8 branch, current SVN. At include/wx/list.h:1043 is:
That decrements the iterator then returns old value. I thought using --itprev would work but in the case where you're inserting at the end of the list a totally different node is returned. It appears that the iterator types' operator-- doesn't work for this case. So that would have to be special-cased I guess.
It's probably not a good idea to fix this in the 2.8 branch, as it might break existing code depending on the old, incorrect behavior. I don't know if it's a problem in 2.9.