MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / parseFirstNum

Function parseFirstNum

source/MRMesh/MRIOParsing.cpp:311–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311Expected<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
333Expected<void> parsePolygon( const std::string_view& str, VertId* vertId, int* numPoints)
334{

Callers 1

fromOffFunction · 0.85

Calls 3

unexpectedFunction · 0.70
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected