diff options
Diffstat (limited to 'cpp/src/IcePatch2/Calc.cpp')
-rw-r--r-- | cpp/src/IcePatch2/Calc.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/src/IcePatch2/Calc.cpp b/cpp/src/IcePatch2/Calc.cpp index 9ed422548da..0adb2a2394a 100644 --- a/cpp/src/IcePatch2/Calc.cpp +++ b/cpp/src/IcePatch2/Calc.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. @@ -43,7 +43,7 @@ struct IFileInfoPathEqual: public binary_function<const FileInfo&, const FileInf for(string::size_type i = 0; i < lhs.path.size(); ++i) { - if(::tolower(lhs.path[i]) != ::tolower(rhs.path[i])) + if(::tolower(static_cast<unsigned char>(lhs.path[i])) != ::tolower(static_cast<unsigned char>(rhs.path[i]))) { return false; } @@ -60,11 +60,12 @@ struct IFileInfoPathLess: public binary_function<const FileInfo&, const FileInfo { for(string::size_type i = 0; i < lhs.path.size() && i < rhs.path.size(); ++i) { - if(::tolower(lhs.path[i]) < ::tolower(rhs.path[i])) + if(::tolower(static_cast<unsigned char>(lhs.path[i])) < ::tolower(static_cast<unsigned char>(rhs.path[i]))) { return true; } - else if(::tolower(lhs.path[i]) > ::tolower(rhs.path[i])) + else if(::tolower(static_cast<unsigned char>(lhs.path[i])) > + ::tolower(static_cast<unsigned char>(rhs.path[i]))) { return false; } |