MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / set

Method set

extern/Catch2/catch.hpp:9325–9337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9323
9324 auto name() const -> std::string { return *m_name; }
9325 auto set( std::string const& newName ) -> ParserResult {
9326
9327 auto lastSlash = newName.find_last_of( "\\/" );
9328 auto filename = ( lastSlash == std::string::npos )
9329 ? newName
9330 : newName.substr( lastSlash+1 );
9331
9332 *m_name = filename;
9333 if( m_ref )
9334 return m_ref->setValue( filename );
9335 else
9336 return ParserResult::ok( ParseResultType::Matched );
9337 }
9338 };
9339
9340 class Arg : public ParserRefImpl<Arg> {

Callers 2

parseMethod · 0.45
AVXTests.cppFile · 0.45

Calls 2

substrMethod · 0.80
setValueMethod · 0.45

Tested by

no test coverage detected