Commit 957b615b (Fix another crash with Grid pasting) breaks compilation with Visual C++ 2019

José Abílio Matos jamatos at lyx.org
Mon Aug 17 07:38:27 UTC 2020


On Monday, 17 August 2020 06.35.27 WEST Jürgen Spitzmüller wrote:
> Am Sonntag, den 16.08.2020, 21:26 +0100 schrieb José Abílio Matos:
> > What is wrong with
> > 
> > pos_type ipos = min(cur.pos(), cell(i).size());
> > 
> > it expresses intent better than the other code, no? :-)
> 
> This was my first choice, too. However, it triggers:
> 
> mathed/InsetMathGrid.cpp:1637:51: error: no matching function for call
> to ‘min(lyx::pos_type&, std::__cxx1998::vector<lyx::MathAtom,
> std::allocator<lyx::MathAtom> >::size_type)’
>  1637 |      pos_type ipos = min(cur.pos(), cell(i).size());
> 
> 
> pos() is pos_type (signed), size() is size_t (unsigned)
> 
> Jürgen


OK then what about

pos_type ipos = min(cur.pos(), pos_type(cell(i).size()));

-- 
José Abílio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200817/3d634211/attachment.html>


More information about the lyx-devel mailing list