summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordante <dante19031999@gmail.com>2021-02-08 23:07:49 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-02-14 20:46:51 +0100
commit197f3a97842a9fb75788ba891de652591edd73d4 (patch)
tree45cd41b1b9f70b935665d06158b75cf2aa99e401
parent8957cf1cc041839d7d1e96b4d2617a82777692d4 (diff)
Simplify code for starmath operator symbol parsing
Change-Id: I4fb05191e1d027f9809ac2324299ff2e2861fd73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110600 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--starmath/source/parse.cxx17
1 files changed, 3 insertions, 14 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 80922cfdf6e3..3a9ad138e409 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1889,20 +1889,9 @@ std::unique_ptr<SmNode> SmParser::DoOper()
case TLIM :
case TLIMSUP :
case TLIMINF :
- {
- const char* pLim = nullptr;
- switch (eType)
- {
- case TLIM : pLim = "lim"; break;
- case TLIMSUP : pLim = "lim sup"; break;
- case TLIMINF : pLim = "lim inf"; break;
- default:
- break;
- }
- if( pLim )
- m_aCurToken.aText = OUString::createFromAscii(pLim);
- pNode.reset(new SmTextNode(m_aCurToken, FNT_TEXT));
- }
+ m_aCurToken.aText = eType == TLIMSUP ? u"lim sup"
+ : eType == TLIMINF ? u"lim inf" : u"lim";
+ pNode.reset(new SmTextNode(m_aCurToken, FNT_TEXT));
break;
case TOPER :