diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2017-03-19 16:26:40 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2017-03-20 03:03:21 +0000 |
commit | fdbf7aa4f04c66ab84b7069c04534ed789db25d6 (patch) | |
tree | 3fe74bf4a93506f4297d30c317836b3011d45515 /starmath/source/parse.cxx | |
parent | 8fd7b49308e296097355c38922fbb766d439fa74 (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/parse.cxx')
-rw-r--r-- | starmath/source/parse.cxx | 5 |
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 || |