diff options
author | Willem Jan Palenstijn | 2012-02-21 11:33:32 -0800 |
---|---|---|
committer | Willem Jan Palenstijn | 2012-02-21 11:33:32 -0800 |
commit | 9ffe3e11d905b5af194dd3265e2fe11545bf5020 (patch) | |
tree | f9fb97d7eb2368d0123aa3bd9d91c560cded3315 /common/str.cpp | |
parent | 80b34398174973b6d70673fce94a8a1f670c3f4d (diff) | |
parent | 02ebd552141173775b9462f4414083d3b8d49a80 (diff) | |
download | scummvm-rg350-9ffe3e11d905b5af194dd3265e2fe11545bf5020.tar.gz scummvm-rg350-9ffe3e11d905b5af194dd3265e2fe11545bf5020.tar.bz2 scummvm-rg350-9ffe3e11d905b5af194dd3265e2fe11545bf5020.zip |
Merge pull request #182 from fingolfin/forbid-ctype
ALL: Avoid using is* macros from ctype.h
Diffstat (limited to 'common/str.cpp')
-rw-r--r-- | common/str.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/str.cpp b/common/str.cpp index 76c0ba2886..84805082ac 100644 --- a/common/str.cpp +++ b/common/str.cpp @@ -405,13 +405,13 @@ void String::trim() { makeUnique(); // Trim trailing whitespace - while (_size >= 1 && isspace(static_cast<unsigned char>(_str[_size - 1]))) + while (_size >= 1 && isSpace(_str[_size - 1])) --_size; _str[_size] = 0; // Trim leading whitespace char *t = _str; - while (isspace((unsigned char)*t)) + while (isSpace(*t)) t++; if (t != _str) { @@ -606,14 +606,14 @@ String operator+(const String &x, char y) { } char *ltrim(char *t) { - while (isspace(static_cast<unsigned char>(*t))) + while (isSpace(*t)) t++; return t; } char *rtrim(char *t) { int l = strlen(t) - 1; - while (l >= 0 && isspace(static_cast<unsigned char>(t[l]))) + while (l >= 0 && isSpace(t[l])) t[l--] = 0; return t; } |