mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-24 13:39:24 +00:00
Use CATCH_NULL instead of NULL
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444)
This commit is contained in:
parent
3b18d9e962
commit
805de43a3d
25 changed files with 112 additions and 101 deletions
|
@ -17,7 +17,7 @@ namespace Catch {
|
|||
|
||||
class Context : public IMutableContext {
|
||||
|
||||
Context() : m_config( NULL ), m_runner( NULL ), m_resultCapture( NULL ) {}
|
||||
Context() : m_config( CATCH_NULL ), m_runner( CATCH_NULL ), m_resultCapture( CATCH_NULL ) {}
|
||||
Context( Context const& );
|
||||
void operator=( Context const& );
|
||||
|
||||
|
@ -63,7 +63,7 @@ namespace Catch {
|
|||
m_generatorsByTestName.find( testName );
|
||||
return it != m_generatorsByTestName.end()
|
||||
? it->second
|
||||
: NULL;
|
||||
: CATCH_NULL;
|
||||
}
|
||||
|
||||
IGeneratorsForTest& getGeneratorsForCurrentTest() {
|
||||
|
@ -84,7 +84,7 @@ namespace Catch {
|
|||
};
|
||||
|
||||
namespace {
|
||||
Context* currentContext = NULL;
|
||||
Context* currentContext = CATCH_NULL;
|
||||
}
|
||||
IMutableContext& getCurrentMutableContext() {
|
||||
if( !currentContext )
|
||||
|
@ -105,7 +105,7 @@ namespace Catch {
|
|||
|
||||
void cleanUpContext() {
|
||||
delete currentContext;
|
||||
currentContext = NULL;
|
||||
currentContext = CATCH_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue