MathLib: replaced isHexDigit function by isxdigit.
This commit is contained in:
parent
ed793793db
commit
71ee625aab
|
@ -240,13 +240,13 @@ bool MathLib::isHex(const std::string& s)
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case DIGIT:
|
case DIGIT:
|
||||||
if (isHexDigit(*it))
|
if (isxdigit(*it))
|
||||||
state = DIGITS;
|
state = DIGITS;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case DIGITS:
|
case DIGITS:
|
||||||
if (isHexDigit(*it))
|
if (isxdigit(*it))
|
||||||
state = DIGITS;
|
state = DIGITS;
|
||||||
else if (*it == 'u' || *it == 'U')
|
else if (*it == 'u' || *it == 'U')
|
||||||
state = SUFFIX_U;
|
state = SUFFIX_U;
|
||||||
|
@ -294,13 +294,6 @@ bool MathLib::isHex(const std::string& s)
|
||||||
|| (state == SUFFIX_ULL) || (state == SUFFIX_LLU);
|
|| (state == SUFFIX_ULL) || (state == SUFFIX_LLU);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MathLib::isHexDigit(char c)
|
|
||||||
{
|
|
||||||
return (c == '0' || c == '1' || c == '2' || c == '3' || c == '4' || c == '5' || c == '6' || c == '7' || c == '8' || c == '9'
|
|
||||||
|| c == 'A' || c == 'B' || c == 'C' || c == 'D' || c == 'E' || c == 'F'
|
|
||||||
|| c == 'a' || c == 'b' || c == 'c' || c == 'd' || c == 'e' || c == 'f');
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! \brief Does the string represent a binary number?
|
/*! \brief Does the string represent a binary number?
|
||||||
* In case leading or trailing white space is provided, the function
|
* In case leading or trailing white space is provided, the function
|
||||||
* returns false.
|
* returns false.
|
||||||
|
|
|
@ -74,13 +74,6 @@ public:
|
||||||
* @return true if given character is octal digit.
|
* @return true if given character is octal digit.
|
||||||
*/
|
*/
|
||||||
static bool isOctalDigit(char c);
|
static bool isOctalDigit(char c);
|
||||||
|
|
||||||
/**
|
|
||||||
* Return true if given character is 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F.
|
|
||||||
* @param c The character to check
|
|
||||||
* @return true if given character is hex digit.
|
|
||||||
*/
|
|
||||||
static bool isHexDigit(char c);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<> CPPCHECKLIB std::string MathLib::toString(double value); // Declare specialization to avoid linker problems
|
template<> CPPCHECKLIB std::string MathLib::toString(double value); // Declare specialization to avoid linker problems
|
||||||
|
|
Loading…
Reference in New Issue