MCPcopy Create free account
hub / github.com/Profactor/cv-plot / set

Method set

CvPlot/ext/catch2/inc/catch.hpp:9241–9253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9239
9240 auto name() const -> std::string { return *m_name; }
9241 auto set( std::string const& newName ) -> ParserResult {
9242
9243 auto lastSlash = newName.find_last_of( "\\/" );
9244 auto filename = ( lastSlash == std::string::npos )
9245 ? newName
9246 : newName.substr( lastSlash+1 );
9247
9248 *m_name = filename;
9249 if( m_ref )
9250 return m_ref->setValue( filename );
9251 else
9252 return ParserResult::ok( ParseResultType::Matched );
9253 }
9254 };
9255
9256 class Arg : public ParserRefImpl<Arg> {

Callers 1

parseMethod · 0.80

Calls 2

substrMethod · 0.80
setValueMethod · 0.45

Tested by

no test coverage detected