| 23 | } |
| 24 | |
| 25 | static bool StringVecToFloatVec(std::vector<float> &floatArray, const StringUtils::StringVec &lineParts) |
| 26 | { |
| 27 | floatArray.resize(lineParts.size()); |
| 28 | |
| 29 | for(unsigned int i=0; i<lineParts.size(); i++) |
| 30 | { |
| 31 | float x = NAN; |
| 32 | const char *str = lineParts[i].c_str(); |
| 33 | const auto result = OCIO::NumberUtils::from_chars(str, str + lineParts[i].size(), x); |
| 34 | if (result.ec != std::errc()) |
| 35 | { |
| 36 | return false; |
| 37 | } |
| 38 | floatArray[i] = x; |
| 39 | } |
| 40 | |
| 41 | return true; |
| 42 | } |
| 43 | |
| 44 | bool StringFloatVecClose(std::string value, std::string expected, float eps) |
| 45 | { |
no test coverage detected