commit 00229d695c9f9a688cc11d687bb22a4f1eccee15
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Sun Feb 16 19:35:20 2025 +0100

    Avoid a temporary variable (spotted by Coverity Scan)
---
 src/mathed/MathStream.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mathed/MathStream.cpp b/src/mathed/MathStream.cpp
index 158d9932a0..0c56fbd9ad 100644
--- a/src/mathed/MathStream.cpp
+++ b/src/mathed/MathStream.cpp
@@ -1169,12 +1169,12 @@ docstring convertDelimToXMLEscape(docstring const & 
name)
                else if (c == '}')
                        return from_ascii("&#125;");
        }
+
        MathWordList const & words = mathedWordList();
        MathWordList::const_iterator it = words.find(name);
-       if (it != words.end()) {
-               docstring const escape = it->second.xmlname;
-               return escape;
-       }
+       if (it != words.end())
+               return it->second.xmlname;
+
        LYXERR0("Unable to find `" << name <<"' in the mathWordList.");
        return name;
 }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to