diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2016-06-29 14:54:09 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-06-29 14:45:46 +0000 |
commit | d5b05cafdec62209803e38010b3354660e3e67cd (patch) | |
tree | baa572bf822153496f8f1c94115431e6abdf0d9f /starmath | |
parent | 9742ee52a842653f7118c4ad8e38c02a6e43e97a (diff) |
starmath: Replace OSL_ENSURE with assert
as negative n would be undefined for OUString::copy(..., n).
Change-Id: I950ec60656142450a5d5f6804324f6080c9c4c2a
Reviewed-on: https://gerrit.libreoffice.org/26753
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/parse.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index b7a0cf0aeba2..a25b3a110a42 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -460,7 +460,7 @@ void SmParser::NextToken() --aRes.EndPos; } sal_Int32 n = aRes.EndPos - nRealStart; - OSL_ENSURE( n >= 0, "length < 0" ); + assert(n >= 0); m_aCurToken.eType = TNUMBER; m_aCurToken.cMathChar = '\0'; m_aCurToken.nGroup = TG::NONE; @@ -482,7 +482,7 @@ void SmParser::NextToken() else if (aRes.TokenType & KParseType::IDENTNAME) { sal_Int32 n = aRes.EndPos - nRealStart; - OSL_ENSURE( n >= 0, "length < 0" ); + assert(n >= 0); OUString aName( m_aBufferString.copy( nRealStart, n ) ); const SmTokenTableEntry *pEntry = GetTokenTableEntry( aName ); |