On 10/2/20 11:10 AM, Jean-Marc Lasgouttes wrote:
> Le 02/10/2020 à 15:46, Richard Kimberly Heck a écrit :
>>> @@ -972,7 +972,7 @@ MathClass MathData::lastMathClass() const
>>>       for (MathAtom const & at : *this) {
>>>           MathClass mc = at->mathClass();
>>>           if (mc != MC_UNKNOWN)
>>> -            return res = mc;
>>> +            res = mc;
>>>       }
>>>       return res;
>>
>> This is actually fine. Assignment returns a reference to the thing on
>> the left, at least by default. That is why
>>
>>      a = b =c
>>
>> does what you expect.
>
> Well, in this case it did not do what I wanted. I did not want the
> early return (the code returns the last math class that is not
> MC_UNKNOWN).

Oh, I see!

Riki


-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to