Re: Problem with InsetMathSideset::dyb

2015-09-13 Thread Georg Baum
Jean-Marc Lasgouttes wrote:

> Coverity points out that in the code below, des is overwritten without
> being used. The same happens in dyt(). Georg, any comment?

This was the first attempt of calculating descend and ascent, which I 
abandoned by introducing dybt(). I forgot to remove the old code, and did 
not even notice later when I modified it. Thanks for pointing it out!

Georg




Problem with InsetMathSideset::dyb

2015-09-12 Thread Jean-Marc Lasgouttes


Coverity points out that in the code below, des is overwritten without 
being used. The same happens in dyt(). Georg, any comment?


JMarc

int InsetMathSideset::dyb(BufferView const & bv) const
128{
129int nd = ndes(bv);
130int des = 0;
131if (scriptl_ && scriptr_)
132des = max(bl().dimension(bv).ascent(), 
br().dimension(bv).ascent());

133else if (scriptl_)
134des = bl().dimension(bv).ascent();
135else if (scriptr_)
136des = br().dimension(bv).ascent();
137int na = nasc(bv);
138des = dybt(bv, na, nd, false);
139return des;
140}