On Sun, Sep 02, 2007 at 11:19:32PM +0200, Abdelrazak Younes wrote:
> Alfredo Braunstein wrote:
> >Abdelrazak Younes wrote:
> >
> >>>--- lyx-devel/trunk/src/TextMetrics.cpp (original)
> >>>+++ lyx-devel/trunk/src/TextMetrics.cpp Sun Sep  2 20:05:37 2007
> >>>@@ -155,7 +155,7 @@
> >>> Dimension const old_dim = dim_;
> >>> // reset dimension.
> >>> dim_ = Dimension();
> >>>-    size_t npar = text_->paragraphs().size();
> >>>+    pit_type const npar = text_->paragraphs().size();
> >>It's probably time to make pit_type unsigned...
> >
> >I don't know if I'd like that. The fact is that even if one want to store
> >non-negative values, one normally wants to have integer operations, not
> >operations in Z mod 2^{32}. Where you may get unexpected results like pit -
> >1 > pit, for no real apparent gain.
> 
> Well, all stl containers use unsigned size type... But Qt uses signed 
> index... As we use STL containers I think it  makes sense to use size_t.

The problem is that using 'unsigned' has a potential to break 'backwards
loop'.

Andre'

Reply via email to