diff options
Diffstat (limited to 'cpp/src/IceUtil/Options.cpp')
-rw-r--r-- | cpp/src/IceUtil/Options.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cpp/src/IceUtil/Options.cpp b/cpp/src/IceUtil/Options.cpp index 444c71d96cc..cd4efe0d166 100644 --- a/cpp/src/IceUtil/Options.cpp +++ b/cpp/src/IceUtil/Options.cpp @@ -1,6 +1,6 @@ // ********************************************************************** // -// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. @@ -455,7 +455,7 @@ IceUtilInternal::Options::split(const string& line) // case 'x': { - if(i < l.size() - 1 && !isxdigit(l[i + 1])) + if(i < l.size() - 1 && !isxdigit(static_cast<unsigned char>(l[i + 1]))) { arg.push_back('\\'); arg.push_back('x'); @@ -464,14 +464,15 @@ IceUtilInternal::Options::split(const string& line) Int64 ull = 0; string::size_type j; - for(j = i + 1; j < i + 3 && j < l.size() && isxdigit(c = l[j]); ++j) + for(j = i + 1; j < i + 3 && j < l.size() && + isxdigit(static_cast<unsigned char>(c = l[j])); ++j) { ull *= 16; - if(isdigit(c)) + if(isdigit(static_cast<unsigned char>(c))) { ull += c - '0'; } - else if(islower(c)) + else if(islower(static_cast<unsigned char>(c))) { ull += c - 'a' + 10; } @@ -491,9 +492,9 @@ IceUtilInternal::Options::split(const string& line) case 'c': { c = l[++i]; - if(isalpha(c) || c == '@' || (c >= '[' && c <= '_')) + if(isalpha(static_cast<unsigned char>(c)) || c == '@' || (c >= '[' && c <= '_')) { - arg.push_back(static_cast<char>(toupper(c) - '@')); + arg.push_back(static_cast<char>(toupper(static_cast<unsigned char>(c)) - '@')); } else { |