MCPcopy Create free account
hub / github.com/RenderKit/oidn / validate

Method validate

external/catch.hpp:9448–9463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9446 }
9447
9448 auto validate() const -> Result override {
9449 if( m_optNames.empty() )
9450 return Result::logicError( "No options supplied to Opt" );
9451 for( auto const &name : m_optNames ) {
9452 if( name.empty() )
9453 return Result::logicError( "Option name cannot be empty" );
9454#ifdef CATCH_PLATFORM_WINDOWS
9455 if( name[0] != '-' && name[0] != '/' )
9456 return Result::logicError( "Option name must begin with '-' or '/'" );
9457#else
9458 if( name[0] != '-' )
9459 return Result::logicError( "Option name must begin with '-'" );
9460#endif
9461 }
9462 return ParserRefImpl::validate();
9463 }
9464 };
9465
9466 struct Help : Opt {

Callers 1

validateMethod · 0.45

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected