Refactoring: use more specific conditions instead of std::isupper. Only the A-Z are interesting. This also fixes compiler errors.

This commit is contained in:
Daniel Marjamäki 2010-04-10 09:46:50 +02:00
parent b4e9185177
commit 21717e05cd
1 changed files with 1 additions and 3 deletions

View File

@ -1571,9 +1571,7 @@ void CheckClass::checkConst()
for (std::string::size_type pos = 0; pos < s.size(); ++pos)
{
unsigned char ch = s[pos];
if (ch != '_' &&
!std::isupper(ch) &&
!std::isdigit(ch))
if (!(ch == '_' || (ch >= 'A' && ch <= 'Z')))
{
allupper = false;
break;