[LyX/2.4.x] Cleanup MathMLStream

Enrico Forestieri forenr at lyx.org
Tue Jul 23 09:55:42 UTC 2024


On Tue, Jul 23, 2024 at 12:18:08AM +0200, Jean-Marc Lasgouttes wrote:
>Le 22/07/2024 à 22:40, Enrico Forestieri a écrit :
>>>diff --git a/src/mathed/InsetMathChar.cpp b/src/mathed/InsetMathChar.cpp
>>>index 199982a5f7..82d0b63f1e 100644
>>>--- a/src/mathed/InsetMathChar.cpp
>>>+++ b/src/mathed/InsetMathChar.cpp
>>>@@ -248,7 +248,7 @@ void InsetMathChar::mathmlize(MathMLStream & 
>>>ms) const
>>>
>>>    if (ms.inText()) {
>>>        if (entity.empty())
>>>-            ms.os().put(char_);
>>>+            ms << char_;
>>>        else
>>>            ms << from_ascii(entity);
>>>        return;
>
>Note that this operator is like
>
> MathMLStream & operator<<(MathMLStream & ms, char_type c)
> {
>-       ms.os().put(c);
>+       ms << docstring(1,c);
>        return ms;
> }
>
>Is it wrong? Is it better to use put() like it was?

Using docstring(1,c) is OK. So, this should not matter. Sorry for the 
noise.

-- 
Enrico


More information about the lyx-devel mailing list