| 319 | |
| 320 | template<typename T> |
| 321 | inline bool StringToFloatImpl(T *val, const char *const str) { |
| 322 | // Type T must be either float or double. |
| 323 | FLATBUFFERS_ASSERT(str && val); |
| 324 | auto end = str; |
| 325 | strtoval_impl(val, str, const_cast<char **>(&end)); |
| 326 | auto done = (end != str) && (*end == '\0'); |
| 327 | if (!done) *val = 0; // erase partial result |
| 328 | return done; |
| 329 | } |
| 330 | |
| 331 | // Convert a string to an instance of T. |
| 332 | // Return value (matched with StringToInteger64Impl and strtod): |
no test coverage detected