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) for (std::string::size_type pos = 0; pos < s.size(); ++pos)
{ {
unsigned char ch = s[pos]; unsigned char ch = s[pos];
if (ch != '_' && if (!(ch == '_' || (ch >= 'A' && ch <= 'Z')))
!std::isupper(ch) &&
!std::isdigit(ch))
{ {
allupper = false; allupper = false;
break; break;