[LyX/master] Fixup f96b99dc: thinko
Richard Kimberly Heck
rikiheck at lyx.org
Fri Oct 2 20:32:56 UTC 2020
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
More information about the lyx-devel
mailing list