Clang warning.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-01-27 11:37:55 +02:00
parent c49f97d695
commit 252e6a1368
2 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ int QmuParserTester::IsHexVal ( const QString &a_szExpr, int *a_iPos, qreal *a_f
Q_UNUSED(locale) Q_UNUSED(locale)
Q_UNUSED(decimal) Q_UNUSED(decimal)
Q_UNUSED(thousand) Q_UNUSED(thousand)
if ( a_szExpr.data()[1] == 0 || ( a_szExpr.data()[0] != '0' || a_szExpr.data()[1] != 'x' ) ) if ( a_szExpr.size() <= 2 || ( a_szExpr.at(0) != '0' || a_szExpr.at(1) != 'x' ) )
{ {
return 0; return 0;
} }

View File

@ -221,7 +221,7 @@ QmuParserTokenReader::token_type QmuParserTokenReader::ReadNextToken(const QLoca
token_type tok; token_type tok;
// Ignore all non printable characters when reading the expression // Ignore all non printable characters when reading the expression
while (m_strFormula.at(m_iPos) > QChar() && m_strFormula.at(m_iPos) <= QChar(0x20)) while (m_strFormula.size() > m_iPos && m_strFormula.at(m_iPos) <= QChar(0x20))
{ {
++m_iPos; ++m_iPos;
} }