| 147 | |
| 148 | template <typename T> |
| 149 | bool ParseFloatNumber(const char* str, T* value, char** endptr) { |
| 150 | int old_errno = errno; |
| 151 | errno = 0; |
| 152 | *value = StringToFloat<T>::Convert(str, endptr); |
| 153 | if (errno != 0) return false; |
| 154 | if (*endptr == str) errno = EINVAL; |
| 155 | errno = old_errno; |
| 156 | return true; |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | bool ParseNumber(const char* str, float* value, char** endptr) { |