[Libreoffice] Question about iterator management in sw/source/core/fields/cellfml.cxx

Stephan Bergmann sbergman at redhat.com
Thu Feb 2 02:47:02 PST 2012


On 02/02/2012 11:26 AM, Lubos Lunak wrote:
>   I agree with all the points, but in Julien's defense, I remember exactly this
> same approach was pushed in recently as a fix to the same issue elsewhere.

Might well be, I probably didn't notice.  And this is in no way meant to 
criticize Julien -- but I assume that's clear, anyway.

> Perhaps we should agree on what the recommended way is? I personally think

Don't think its worth to go any more formal here.  I occasionally notice 
things and give comments, trying to give rationales as well.  But in the 
end, all those kinds of code are good and fine, anyway.

> the simplest and most elegant solution is to go with 'it = container.erase(
> it );" and move the "++it" out of for()'s parentheses to an else block of the

it = erase(it) is unfortunately only C++11

Stephan


More information about the LibreOffice mailing list