summaryrefslogtreecommitdiff
path: root/starmath/source
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-03-19 16:26:40 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2017-03-20 03:03:21 +0000
commitfdbf7aa4f04c66ab84b7069c04534ed789db25d6 (patch)
tree3fe74bf4a93506f4297d30c317836b3011d45515 /starmath/source
parent8fd7b49308e296097355c38922fbb766d439fa74 (diff)
starmath: Assert a precondition of DoBlank()
Change-Id: I9e2d7dc5d209559b9cacb4315610431ebd1df717 Reviewed-on: https://gerrit.libreoffice.org/35419 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/source')
-rw-r--r--starmath/source/parse.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index dc557095decd..a4c390d87867 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1256,14 +1256,15 @@ void SmParser::DoPower()
SmBlankNode *SmParser::DoBlank()
{
- OSL_ENSURE(TokenInGroup(TG::Blank), "Sm : wrong token");
+ assert(TokenInGroup(TG::Blank));
std::unique_ptr<SmBlankNode> pBlankNode(new SmBlankNode(m_aCurToken));
- while (TokenInGroup(TG::Blank))
+ do
{
pBlankNode->IncreaseBy(m_aCurToken);
NextToken();
}
+ while (TokenInGroup(TG::Blank));
// Ignore trailing spaces, if corresponding option is set
if ( m_aCurToken.eType == TNEWLINE ||