Changeset 714 for code/branches/FICN/src
- Timestamp:
- Dec 28, 2007, 11:24:35 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/misc/String2Number.h
r708 r714 59 59 */ 60 60 template <typename T> 61 const std::string &number2String(T variable)61 const std::string number2String(T variable) 62 62 { 63 63 std::ostringstream oss; 64 64 if (oss << variable) 65 return *(new std::string(oss.str()));65 return std::string(oss.str()); 66 66 67 return *(new std::string(""));67 return std::string(""); 68 68 } 69 69 … … 78 78 */ 79 79 template <typename T> 80 const std::string &number2String(T variable, const std::string& fallbackString)80 const std::string number2String(T variable, const std::string& fallbackString) 81 81 { 82 82 std::ostringstream oss; 83 83 if (oss << variable) 84 return *(new std::string(oss.str()));84 return std::string(oss.str()); 85 85 86 86 return fallbackString;
Note: See TracChangeset
for help on using the changeset viewer.