Le 19/04/2020 à 17:39, Richard Kimberly Heck a écrit :
/cvs/lyx/lyx-devel/src/insets/InsetText.cpp:526: warning: implicit
conversion changes signedness:
'lyx::RandomAccessList<lyx::Paragraph>::size_type' (aka 'unsigned long')
to 'lyx::pit_type' (aka 'long')

It would be nice if pit_type could be unsigned instead. The justification I see is:

        // FIXME: should be unsigned as well.
        // however, simply changing it breaks a downward loop somewhere...

This seems like something we can avoid, isn't it?

One candidate is BufferView::updateMetrics


        // Redo paragraphs above anchor if necessary.
        int y1 = d->anchor_ypos_ - anchor_pm.ascent();
        // We are now just above the anchor paragraph.
        pit_type pit1 = d->anchor_pit_ - 1;
        for (; pit1 >= 0 && y1 >= 0; --pit1) {
                tm.redoParagraph(pit1);
                ParagraphMetrics & pm = tm.par_metrics_[pit1];
                y1 -= pm.descent();
                // Save the paragraph position in the cache.
                pm.setPosition(y1);
                tm.updatePosCache(pit1);
                y1 -= pm.ascent();
        }


JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to