summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/StringExtras.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/StringExtras.h')
-rw-r--r--include/llvm/ADT/StringExtras.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h
index e4c941007d..3bfd3f5c72 100644
--- a/include/llvm/ADT/StringExtras.h
+++ b/include/llvm/ADT/StringExtras.h
@@ -126,7 +126,7 @@ static inline std::string UppercaseString(const std::string &S) {
static inline bool StringsEqualNoCase(const std::string &LHS,
const std::string &RHS) {
if (LHS.size() != RHS.size()) return false;
- for (unsigned i = 0, e = LHS.size(); i != e; ++i)
+ for (unsigned i = 0, e = static_cast<unsigned>(LHS.size()); i != e; ++i)
if (tolower(LHS[i]) != tolower(RHS[i])) return false;
return true;
}
@@ -135,7 +135,7 @@ static inline bool StringsEqualNoCase(const std::string &LHS,
/// case.
static inline bool StringsEqualNoCase(const std::string &LHS,
const char *RHS) {
- for (unsigned i = 0, e = LHS.size(); i != e; ++i) {
+ for (unsigned i = 0, e = static_cast<unsigned>(LHS.size()); i != e; ++i) {
if (RHS[i] == 0) return false; // RHS too short.
if (tolower(LHS[i]) != tolower(RHS[i])) return false;
}