Abdel,

we have a problem... are you sure the stuff you did with dimension and
coord cache is OK for InsetMathFrac? I see misrendering and crashes,
but the latter only for UNIT.

- Martin


On Sun, Sep 30, 2007 at 05:15:40PM +0200, Andre Poenitz wrote:
> On Sun, Sep 30, 2007 at 04:12:47PM +0300, Martin Vermeer wrote:
> > Problem: after compilation it doesn't work right anymore -- independent
> > of this patch. I can even get it to crash. My suspicion is Abdel's patch
> > 20465. This should be functionallly neutral, but is it? Was this patch
> > tested for frac?
> 
> How would I know?
> 
> Andre'

---
> On Sat, Sep 29, 2007 at 12:57:36PM +0200, Andre Poenitz wrote:
> >
> > Hi Martin.
> >
> > svn blames you for recent changes to InsetMathFrac
> >
> >
> > bool InsetMathFrac::idxRight(Cursor & cur) const
> > {
> >     InsetMath::idx_type target;
> >     if (kind_ == UNIT || (kind_ == UNITFRAC && nargs() == 3)) {
> >             if (nargs() == 3)
> >                     target = 0;
> >             else if (nargs() == 2)
> >                     target = 1;
> >     } else
> >             return false;
> >     if (cur.idx() == target)
> >             return false;
> >     cur.idx() = target;
> >     cur.pos() = cell(target).x2pos(cur.x_target());
> >     return true;
> > }
> >
> >
> > bool InsetMathFrac::idxLeft(Cursor & cur) const
> > {
> >     InsetMath::idx_type target;
> >     if (kind_ == UNIT || (kind_ == UNITFRAC && nargs() == 3)) {
> >             if (nargs() == 3)
> >                     target = 2;
> >             else if (nargs() == 2)
> >                     target = 0;
> >     } else
> >             return false;
> >     if (cur.idx() == target)
> >             return false;
> >     cur.idx() = target;
> >     cur.pos() = cell(target).x2pos(cur.x_target());
> >     return true;
> > }
> >
> > Now gcc complains about 'target' possibly used uninitialized. I
> > think it
> > has a point there.
>
> Hmm yes... UNIT and nargs() == 1. Could happen. I don't remember this
> warning.
>
> > Some more thoughts:
> >
> > - the 'return false' lines are intended by spaces, not tabs.
>
> OK, I'll fix that.

... more ...

> > Would be nice if you could do something about some of those point,
> > at least the gcc warning as this might be a real bug.
> >
> > Andre'

Reply via email to