Fix Cppcheck warning

This commit is contained in:
Daniel Marjamäki 2014-02-26 06:38:48 +01:00
parent 7dbfd67da3
commit dea4107245
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ bool MathLib::isFloat(const std::string &s)
if (s.empty())
return false;
enum {START, BASE_PLUSMINUS, BASE_DIGITS1, LEADING_DECIMAL, TRAILING_DECIMAL, BASE_DIGITS2, E, MANTISSA_PLUSMINUS, MANTISSA_DIGITS, F} state = START;
for (std::string::const_iterator it = s.begin(); it != s.end(); it++) {
for (std::string::const_iterator it = s.begin(); it != s.end(); ++it) {
switch (state) {
case START:
if (*it=='+' || *it=='-')