mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 23:36:11 +01:00
Attempt to prevent analyser warnings about dereferencing null.
This commit is contained in:
parent
a2d8f774d2
commit
59d556907d
@ -23,10 +23,16 @@ namespace Catch {
|
||||
|
||||
public: // IContext
|
||||
virtual IResultCapture& getResultCapture() {
|
||||
return *m_resultCapture;
|
||||
if( m_resultCapture )
|
||||
return *m_resultCapture;
|
||||
else
|
||||
throw std::logic_error( "No result capture instance" );
|
||||
}
|
||||
virtual IRunner& getRunner() {
|
||||
return *m_runner;
|
||||
if( m_runner )
|
||||
return *m_runner;
|
||||
else
|
||||
throw std::logic_error( "No runner instance" );
|
||||
}
|
||||
virtual size_t getGeneratorIndex( std::string const& fileInfo, size_t totalSize ) {
|
||||
return getGeneratorsForCurrentTest()
|
||||
|
Loading…
Reference in New Issue
Block a user