monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] resolving name conflicts; code style


From: Stephen Leake
Subject: Re: [Monotone-devel] resolving name conflicts; code style
Date: Fri, 09 May 2008 05:23:55 -0400
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (windows-nt)

Stephen Leake <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]