From 8b70b78ba489b090d9866e6a4084ab1e8613b527 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 16 Nov 2003 20:21:15 +0000 Subject: Fixes for PR114: Thanks to Reid Spencer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10029 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/Support/StringExtras.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/Support/StringExtras.h') diff --git a/include/Support/StringExtras.h b/include/Support/StringExtras.h index 2ebac81..08e5eb7 100644 --- a/include/Support/StringExtras.h +++ b/include/Support/StringExtras.h @@ -57,14 +57,14 @@ static inline std::string utostr(unsigned long long X, bool isNeg = false) { static inline std::string itostr(int64_t X) { if (X < 0) - return utostr((uint64_t)-X, true); + return utostr(static_cast(-X), true); else - return utostr((uint64_t)X); + return utostr(static_cast(X)); } static inline std::string utostr(unsigned long X, bool isNeg = false) { - return utostr((unsigned long long)X, isNeg); + return utostr(static_cast(X), isNeg); } static inline std::string utostr(unsigned X, bool isNeg = false) { @@ -86,9 +86,9 @@ static inline std::string utostr(unsigned X, bool isNeg = false) { static inline std::string itostr(int X) { if (X < 0) - return utostr((unsigned)-X, true); + return utostr(static_cast(-X), true); else - return utostr((unsigned)X); + return utostr(static_cast(X)); } static inline std::string ftostr(double V) { -- cgit v1.1