On 8/17/20 1:35 AM, 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)
I have been working from time to time about making pos_type be unsigned, but there are places where we use it as signed, so it's complicated. Riki -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel