aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/ADT/StringExtras.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-01-28 07:22:20 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-01-28 07:22:20 +0000
commitbe4922a28a270237d684112b3ab1a16705eb90f2 (patch)
tree41e82dd787186de62330051f0e8abb12d0251c5a /include/llvm/ADT/StringExtras.h
parent40831c5e0ec07c12c9ea438c17ebe5b302fd3df0 (diff)
Convert some old C-style casts to C++ style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19868 91177308-0d34-0410-b5e6-96231b3b80d8
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 e6d1feac1a..d952ae236f 100644
--- a/include/llvm/ADT/StringExtras.h
+++ b/include/llvm/ADT/StringExtras.h
@@ -29,7 +29,7 @@ static inline std::string utohexstr(uint64_t X) {
if (X == 0) *--BufPtr = '0'; // Handle special case...
while (X) {
- unsigned char Mod = (unsigned char)X & 15;
+ unsigned char Mod = static_cast<unsigned char>(X) & 15;
if (Mod < 10)
*--BufPtr = '0' + Mod;
else
@@ -109,7 +109,7 @@ static inline std::string LowercaseString(const std::string &S) {
std::string result(S);
for (unsigned i = 0; i < S.length(); ++i)
if (isupper(result[i]))
- result[i] = (char)tolower(result[i]);
+ result[i] = char(tolower(result[i]));
return result;
}