Ok, I have a question on how to proceed now, after looking through and finishing the rework.
DeleteItem saves the item data & string at the beginning, *before* ResetContent. It has to.
If I special-case LBS_NODATA inside of it, I'll have to do it *twice* (one before saving, one after ResetContent), or duplicate ResetContent, which is pretty ugly.
So, with this in mind, should I still special case it inside of DeleteItem instead of RemoveItem? (or a helper inside RemoveItem, as per InsertItem).
This will also fix the O(n) issue. And in the end there will be the same amount of checks in the code. I think this is how I should proceed but I want to be sure before I send it in later if you don't want it.
Summary: there will be one check in RemoveItem's helper (like InsertItem) and one in ResetContent. Instead of having two checks in DeleteItem (and the O(n) thing).
Thoughts?