diff options
author | Florian Becker <fb@vxapps.com> | 2021-10-01 02:45:02 +0800 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2021-10-01 02:45:02 +0800 |
commit | a31e2451e763f918ec900e6dfb0e63cf505f8cda (patch) | |
tree | 7b664726966df24ddbbfe3d4718702a38a1c6e00 | |
parent | 40fd60a4743a9e587b197a3991bb5f7e451e6b8a (diff) | |
download | cppunit-a31e2451e763f918ec900e6dfb0e63cf505f8cda.tar.gz |
replace 0 with nullptr when assigning to a pointer
-rw-r--r-- | include/cppunit/SynchronizedObject.h | 2 | ||||
-rw-r--r-- | include/cppunit/TestResult.h | 2 | ||||
-rw-r--r-- | include/cppunit/TestResultCollector.h | 2 | ||||
-rw-r--r-- | include/cppunit/TestSuccessListener.h | 2 | ||||
-rw-r--r-- | src/cppunit/SynchronizedObject.cpp | 2 | ||||
-rw-r--r-- | src/cppunit/TypeInfoHelper.cpp | 4 |
6 files changed, 7 insertions, 7 deletions
diff --git a/include/cppunit/SynchronizedObject.h b/include/cppunit/SynchronizedObject.h index 59c3cbb..68bd0cf 100644 --- a/include/cppunit/SynchronizedObject.h +++ b/include/cppunit/SynchronizedObject.h @@ -36,7 +36,7 @@ public: /*! Constructs a SynchronizedObject object. */ - SynchronizedObject( SynchronizationObject *syncObject =0 ); + SynchronizedObject( SynchronizationObject *syncObject = nullptr ); /// Destructor. virtual ~SynchronizedObject(); diff --git a/include/cppunit/TestResult.h b/include/cppunit/TestResult.h index 3c4ddc9..7dc2402 100644 --- a/include/cppunit/TestResult.h +++ b/include/cppunit/TestResult.h @@ -48,7 +48,7 @@ class CPPUNIT_API TestResult : protected SynchronizedObject { public: /// Construct a TestResult - TestResult( SynchronizationObject *syncObject = 0 ); + TestResult( SynchronizationObject *syncObject = nullptr ); /// Destroys a test result virtual ~TestResult() override; diff --git a/include/cppunit/TestResultCollector.h b/include/cppunit/TestResultCollector.h index 287f019..314f1cc 100644 --- a/include/cppunit/TestResultCollector.h +++ b/include/cppunit/TestResultCollector.h @@ -37,7 +37,7 @@ public: /*! Constructs a TestResultCollector object. */ - TestResultCollector( SynchronizationObject *syncObject = 0 ); + TestResultCollector( SynchronizationObject *syncObject = nullptr ); /// Destructor. virtual ~TestResultCollector() override; diff --git a/include/cppunit/TestSuccessListener.h b/include/cppunit/TestSuccessListener.h index 18de362..714fbf6 100644 --- a/include/cppunit/TestSuccessListener.h +++ b/include/cppunit/TestSuccessListener.h @@ -17,7 +17,7 @@ class CPPUNIT_API TestSuccessListener : public TestListener, public: /*! Constructs a TestSuccessListener object. */ - TestSuccessListener( SynchronizationObject *syncObject = 0 ); + TestSuccessListener( SynchronizationObject *syncObject = nullptr ); /// Destructor. virtual ~TestSuccessListener() override; diff --git a/src/cppunit/SynchronizedObject.cpp b/src/cppunit/SynchronizedObject.cpp index 1764538..489f378 100644 --- a/src/cppunit/SynchronizedObject.cpp +++ b/src/cppunit/SynchronizedObject.cpp @@ -5,7 +5,7 @@ CPPUNIT_NS_BEGIN SynchronizedObject::SynchronizedObject( SynchronizationObject *syncObject ) - : m_syncObject( syncObject == 0 ? new SynchronizationObject() : + : m_syncObject( syncObject == nullptr ? new SynchronizationObject() : syncObject ) { } diff --git a/src/cppunit/TypeInfoHelper.cpp b/src/cppunit/TypeInfoHelper.cpp index aa24a80..2472077 100644 --- a/src/cppunit/TypeInfoHelper.cpp +++ b/src/cppunit/TypeInfoHelper.cpp @@ -17,12 +17,12 @@ TypeInfoHelper::getClassName( const std::type_info &info ) #if defined(CPPUNIT_HAVE_GCC_ABI_DEMANGLE) && CPPUNIT_HAVE_GCC_ABI_DEMANGLE int status = 0; - char* c_name = 0; + char* c_name = nullptr; const char* c_origName = info.name(); if(c_origName[0] == '*') ++c_origName; - c_name = abi::__cxa_demangle( c_origName, 0, 0, &status ); + c_name = abi::__cxa_demangle( c_origName, nullptr, nullptr, &status ); std::string name; if(c_name) |