diff options
author | Chris Lattner <sabre@nondot.org> | 2002-01-20 22:54:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-01-20 22:54:45 +0000 |
commit | 697954c15da58bd8b186dbafdedd8b06db770201 (patch) | |
tree | e119a71f09b5c2513c8c270161ae2a858c6f3b96 /include/Support/StringExtras.h | |
parent | 13c4659220bc78a0a3529f4d9e57546e898088e3 (diff) |
Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/Support/StringExtras.h')
-rw-r--r-- | include/Support/StringExtras.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/Support/StringExtras.h b/include/Support/StringExtras.h index e67e25ced5..46e2c5aaf0 100644 --- a/include/Support/StringExtras.h +++ b/include/Support/StringExtras.h @@ -11,7 +11,7 @@ #include <string> #include <stdio.h> -static inline string utostr(uint64_t X, bool isNeg = false) { +static inline std::string utostr(uint64_t X, bool isNeg = false) { char Buffer[40]; char *BufPtr = Buffer+39; @@ -25,10 +25,10 @@ static inline string utostr(uint64_t X, bool isNeg = false) { if (isNeg) *--BufPtr = '-'; // Add negative sign... - return string(BufPtr); + return std::string(BufPtr); } -static inline string itostr(int64_t X) { +static inline std::string itostr(int64_t X) { if (X < 0) return utostr((uint64_t)-X, true); else @@ -36,7 +36,7 @@ static inline string itostr(int64_t X) { } -static inline string utostr(unsigned X, bool isNeg = false) { +static inline std::string utostr(unsigned X, bool isNeg = false) { char Buffer[20]; char *BufPtr = Buffer+19; @@ -50,17 +50,17 @@ static inline string utostr(unsigned X, bool isNeg = false) { if (isNeg) *--BufPtr = '-'; // Add negative sign... - return string(BufPtr); + return std::string(BufPtr); } -static inline string itostr(int X) { +static inline std::string itostr(int X) { if (X < 0) return utostr((unsigned)-X, true); else return utostr((unsigned)X); } -static inline string ftostr(double V) { +static inline std::string ftostr(double V) { char Buffer[200]; snprintf(Buffer, 200, "%e", V); return Buffer; |