| 197 | namespace detail { |
| 198 | template <typename N> |
| 199 | inline bool to_float(const Twine &T, N &Num, N (*StrTo)(const char *, char **)) { |
| 200 | SmallString<32> Storage; |
| 201 | StringRef S = T.toNullTerminatedStringRef(Storage); |
| 202 | char *End; |
| 203 | N Temp = StrTo(S.data(), &End); |
| 204 | if (*End != '\0') |
| 205 | return false; |
| 206 | Num = Temp; |
| 207 | return true; |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | inline bool to_float(const Twine &T, float &Num) { |
no test coverage detected