Changeset 724 for code/branches/FICN/src/misc
- Timestamp:
- Dec 29, 2007, 9:39:55 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/misc/Convert.h
r722 r724 53 53 */ 54 54 template <typename T> 55 static bool ToString(std::string &output, T input)55 static bool ToString(std::string* output, T input) 56 56 { 57 57 std::ostringstream oss; 58 58 if (oss << input) 59 59 { 60 output= oss.str();60 (*output) = oss.str(); 61 61 return true; 62 62 } … … 78 78 */ 79 79 template <typename T> 80 static bool ToString(std::string &output, T input, const std::string& fallbackString)80 static bool ToString(std::string* output, T input, const std::string& fallbackString) 81 81 { 82 82 if (Convert::ToString(output, input)) 83 83 return true; 84 84 85 output= fallbackString;85 (*output) = fallbackString; 86 86 return false; 87 87 } … … 99 99 */ 100 100 template <typename T> 101 static bool FromString(T &output, const std::string& input)101 static bool FromString(T* output, const std::string& input) 102 102 { 103 103 std::istringstream iss(input); 104 if (iss >> output)104 if (iss >> (*output)) 105 105 return true; 106 106 … … 121 121 */ 122 122 template <typename T> 123 static bool FromString(T &output, const std::string& input, T fallbackValue)123 static bool FromString(T* output, const std::string& input, T fallbackValue) 124 124 { 125 125 if (Convert::FromString(output, input)) 126 126 return true; 127 127 128 output= fallbackValue;128 (*output) = fallbackValue; 129 129 return false; 130 130 }
Note: See TracChangeset
for help on using the changeset viewer.