MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / set

Method set

extlibs/catch/include/catch/catch.hpp:9008–9020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9006
9007 auto name() const -> std::string { return *m_name; }
9008 auto set( std::string const& newName ) -> ParserResult {
9009
9010 auto lastSlash = newName.find_last_of( "\\/" );
9011 auto filename = ( lastSlash == std::string::npos )
9012 ? newName
9013 : newName.substr( lastSlash+1 );
9014
9015 *m_name = filename;
9016 if( m_ref )
9017 return m_ref->setValue( filename );
9018 else
9019 return ParserResult::ok( ParseResultType::Matched );
9020 }
9021 };
9022
9023 class Arg : public ParserRefImpl<Arg> {

Callers 1

parseMethod · 0.45

Calls 2

substrMethod · 0.80
setValueMethod · 0.45

Tested by

no test coverage detected