From fdbf7aa4f04c66ab84b7069c04534ed789db25d6 Mon Sep 17 00:00:00 2001 From: Takeshi Abe Date: Sun, 19 Mar 2017 16:26:40 +0900 Subject: starmath: Assert a precondition of DoBlank() Change-Id: I9e2d7dc5d209559b9cacb4315610431ebd1df717 Reviewed-on: https://gerrit.libreoffice.org/35419 Tested-by: Jenkins Reviewed-by: Takeshi Abe --- starmath/source/parse.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'starmath/source/parse.cxx') 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 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 || -- cgit