Martin Vermeer wrote:

>     350 #warning CHECK! Are we comparing last_paste to the wrong list
> here? (Lgb)
>     351     if (boost::next(last_paste) != pars.end() &&
>     352         paste_the_end) {
> 
> This remark looks valid to me...wrong comparison.

Not to me.

> What is doubleplusunnice about this, it that *usually*, by pure
> chance, the inequality will hold. So any malfunctioning due to this
> will be very sporadic.

If it's the wrong list, then the inequality would always hold (giving
crashes etc). I'd bet it's correct.

> Isn't the healthy thing to remove the inequality test and see if we
> can get some *clear* malfunctioning? And if nothing happens, leave it
> at that...

Not very healthy, as we have things like
boost::next(last_paste)->makeSameLayout etc. So I'd say the check it's
needed.

A few lines above we have:

        pars.splice(past_pit, simple_cut_clone);
        ParagraphList::iterator last_paste = boost::prior(past_pit);

so past_pit is an iterator of pars
so last_paste also


Alfredo


Reply via email to