Stephen Leake <[EMAIL PROTECTED]> writes:

> In roster_merge.cc
> roster_merge_result::resolve_duplicate_name_conflicts, I have a loop
> like this:
>
>   std::vector<duplicate_name_conflict>::iterator i = 
> duplicate_name_conflicts.begin();
>   while (i != duplicate_name_conflicts.end())
>     {
>       ... handle conflict
>
>       duplicate_name_conflicts.erase(i);
>
>       // no 'i++' needed; erase does that by side effect. 
>       // FIXME: is this proper std library usage?
>
>     } // end while

Of course, as soon as I posted this, I saw the answer; call clear
_after_ the loop. Sorry for the noise.

-- 
-- Stephe


_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to