diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-05-05 18:30:58 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-05-05 18:30:58 +0000 |
commit | 34cd4a484e532cc463fd5a4bf59b88d13c5467c1 (patch) | |
tree | eefdfb1d225da0317e7f7912079c430b5c3ed92c /include/llvm/ADT/StringExtras.h | |
parent | b61bfdb56e1c018f10a2c1c9fb49d7e2a78ed24e (diff) | |
download | llvm-34cd4a484e532cc463fd5a4bf59b88d13c5467c1.tar.gz llvm-34cd4a484e532cc463fd5a4bf59b88d13c5467c1.tar.bz2 llvm-34cd4a484e532cc463fd5a4bf59b88d13c5467c1.tar.xz |
Fix more -Wshorten-64-to-32 warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/StringExtras.h')
-rw-r--r-- | include/llvm/ADT/StringExtras.h | 4 |
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; } |