MathLib(isInt): use std::tolower().

No functional change.
This commit is contained in:
Slava Semushin 2009-08-17 00:31:15 +07:00
parent a11089cb50
commit 8659c4828c
1 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ bool MathLib::isInt(const std::string & s)
while (isdigit(s[n])) ++n; while (isdigit(s[n])) ++n;
// check scientific notation // check scientific notation
if (s[n] == 'E' || s[n] == 'e') if (std::tolower(s[n]) == 'e')
{ {
++n; ++n;
// check positive exponent // check positive exponent
@ -133,7 +133,7 @@ bool MathLib::isInt(const std::string & s)
{ {
while (isdigit(s[n])) ++n; while (isdigit(s[n])) ++n;
// unsigned or long // unsigned or long
if (s[n] == 'u' || s[n] == 'U' || s[n] == 'l' || s[n] == 'L') ++n; if (std::tolower(s[n]) == 'u' || std::tolower(s[n]) == 'l') ++n;
} }
// eat up whitespace // eat up whitespace
while (isspace(s[n])) while (isspace(s[n]))