From 07de2f5bc3a42b00812b1e5677548cbd45f6f203 Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Thu, 30 Oct 2008 13:58:03 -0230 Subject: Bug 3519 - fix isalpha, isprint, ... usage --- cpp/src/IcePatch2/Util.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cpp/src/IcePatch2/Util.cpp') diff --git a/cpp/src/IcePatch2/Util.cpp b/cpp/src/IcePatch2/Util.cpp index 2b572c27e57..f4f6c32ddf6 100644 --- a/cpp/src/IcePatch2/Util.cpp +++ b/cpp/src/IcePatch2/Util.cpp @@ -280,7 +280,8 @@ IcePatch2::simplify(const string& path) } if(result == "/." || - (result.size() == 4 && isalpha(result[0]) && result[1] == ':' && result[2] == '/' && result[3] == '.')) + (result.size() == 4 && isalpha(static_cast(result[0])) && result[1] == ':' && + result[2] == '/' && result[3] == '.')) { return result.substr(0, result.size() - 1); } @@ -290,7 +291,8 @@ IcePatch2::simplify(const string& path) result.erase(result.size() - 2, 2); } - if(result == "/" || (result.size() == 3 && isalpha(result[0]) && result[1] == ':' && result[2] == '/')) + if(result == "/" || (result.size() == 3 && isalpha(static_cast(result[0])) && result[1] == ':' && + result[2] == '/')) { return result; } @@ -313,7 +315,8 @@ IcePatch2::isRoot(const string& pa) { string path = simplify(pa); #ifdef _WIN32 - return path == "/" || path.size() == 3 && isalpha(path[0]) && path[1] == ':' && path[2] == '/'; + return path == "/" || path.size() == 3 && isalpha(static_cast(path[0])) && path[1] == ':' && + path[2] == '/'; #else return path == "/"; #endif -- cgit v1.2.3