MathLib(isInt): use std::tolower().
No functional change.
This commit is contained in:
parent
a11089cb50
commit
8659c4828c
|
@ -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]))
|
||||||
|
|
Loading…
Reference in New Issue