| 309 | } |
| 310 | |
| 311 | Expected<void> parseFirstNum( const std::string_view& str, int& num ) |
| 312 | { |
| 313 | using namespace boost::spirit::x3; |
| 314 | |
| 315 | auto n = [&] ( auto& ctx ) |
| 316 | { |
| 317 | num = _attr( ctx ); |
| 318 | }; |
| 319 | bool r = phrase_parse( |
| 320 | str.begin(), |
| 321 | str.end(), |
| 322 | int_[n], |
| 323 | ascii::space ); |
| 324 | |
| 325 | if ( !r ) |
| 326 | { |
| 327 | return unexpected( "Failed to parse face in OFF-file" ); |
| 328 | } |
| 329 | |
| 330 | return {}; |
| 331 | } |
| 332 | |
| 333 | Expected<void> parsePolygon( const std::string_view& str, VertId* vertId, int* numPoints) |
| 334 | { |
no test coverage detected