MathLib(isInt): formatted and get rid of tabs.
No functional change.
This commit is contained in:
parent
8659c4828c
commit
32c8ba526b
|
@ -90,9 +90,18 @@ bool MathLib::isInt(const std::string & s)
|
||||||
while (isspace(s[n])) ++n;
|
while (isspace(s[n])) ++n;
|
||||||
|
|
||||||
// determine type
|
// determine type
|
||||||
if (s.find("E", 0) != std::string::npos) Mode = eScientific;
|
if (s.find("E", 0) != std::string::npos)
|
||||||
else if (s.find("0x", n, 2) != std::string::npos) Mode = eHex;
|
{
|
||||||
else if (s.find("0", n, 1) != std::string::npos && isdigit(s[n+1])) Mode = eOctal;
|
Mode = eScientific;
|
||||||
|
}
|
||||||
|
else if (s.find("0x", n, 2) != std::string::npos)
|
||||||
|
{
|
||||||
|
Mode = eHex;
|
||||||
|
}
|
||||||
|
else if (s.find("0", n, 1) != std::string::npos && isdigit(s[n+1]))
|
||||||
|
{
|
||||||
|
Mode = eOctal;
|
||||||
|
}
|
||||||
|
|
||||||
// check sign
|
// check sign
|
||||||
if (s[n] == '-' || s[n] == '+') ++n;
|
if (s[n] == '-' || s[n] == '+') ++n;
|
||||||
|
|
Loading…
Reference in New Issue