mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-30 09:13:29 +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
|
public: // IContext
|
||||||
virtual IResultCapture& getResultCapture() {
|
virtual IResultCapture& getResultCapture() {
|
||||||
|
if( m_resultCapture )
|
||||||
return *m_resultCapture;
|
return *m_resultCapture;
|
||||||
|
else
|
||||||
|
throw std::logic_error( "No result capture instance" );
|
||||||
}
|
}
|
||||||
virtual IRunner& getRunner() {
|
virtual IRunner& getRunner() {
|
||||||
|
if( m_runner )
|
||||||
return *m_runner;
|
return *m_runner;
|
||||||
|
else
|
||||||
|
throw std::logic_error( "No runner instance" );
|
||||||
}
|
}
|
||||||
virtual size_t getGeneratorIndex( std::string const& fileInfo, size_t totalSize ) {
|
virtual size_t getGeneratorIndex( std::string const& fileInfo, size_t totalSize ) {
|
||||||
return getGeneratorsForCurrentTest()
|
return getGeneratorsForCurrentTest()
|
||||||
|
Loading…
Reference in New Issue
Block a user