summaryrefslogtreecommitdiff
path: root/src/cppunit
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2021-10-01 02:41:11 +0800
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2021-10-01 02:41:49 +0800
commit40fd60a4743a9e587b197a3991bb5f7e451e6b8a (patch)
tree6c2741434a6912648d4b3529b538a13631bd2945 /src/cppunit
parent6e077ed0705d9bf67f1b643eec367d5815a589b2 (diff)
downloadcppunit-40fd60a4743a9e587b197a3991bb5f7e451e6b8a.tar.gz
get rid of old casting macros
Diffstat (limited to 'src/cppunit')
-rw-r--r--src/cppunit/Exception.cpp2
-rw-r--r--src/cppunit/Test.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/cppunit/Exception.cpp b/src/cppunit/Exception.cpp
index 9401fbc..969e716 100644
--- a/src/cppunit/Exception.cpp
+++ b/src/cppunit/Exception.cpp
@@ -70,7 +70,7 @@ Exception::operator =( const Exception& other )
const char*
Exception::what() const noexcept
{
- Exception *mutableThis = CPPUNIT_CONST_CAST( Exception *, this );
+ Exception *mutableThis = const_cast<Exception*>( this );
mutableThis->m_whatMessage = m_message.shortDescription() + "\n" +
m_message.details();
return m_whatMessage.c_str();
diff --git a/src/cppunit/Test.cpp b/src/cppunit/Test.cpp
index fef8be7..010ea15 100644
--- a/src/cppunit/Test.cpp
+++ b/src/cppunit/Test.cpp
@@ -19,7 +19,7 @@ Test *
Test::findTest( const std::string &testName ) const
{
TestPath path;
- Test *mutableThis = CPPUNIT_CONST_CAST( Test *, this );
+ Test *mutableThis = const_cast<Test*>( this );
mutableThis->findTestPath( testName, path );
if ( !path.isValid() )
throw std::invalid_argument( "No test named <" + testName + "> found in test <"
@@ -32,7 +32,7 @@ bool
Test::findTestPath( const std::string &testName,
TestPath &testPath ) const
{
- Test *mutableThis = CPPUNIT_CONST_CAST( Test *, this );
+ Test *mutableThis = const_cast<Test*>( this );
if ( getName() == testName )
{
testPath.add( mutableThis );
@@ -57,7 +57,7 @@ bool
Test::findTestPath( const Test *test,
TestPath &testPath ) const
{
- Test *mutableThis = CPPUNIT_CONST_CAST( Test *, this );
+ Test *mutableThis = const_cast<Test*>( this );
if ( this == test )
{
testPath.add( mutableThis );
@@ -81,7 +81,7 @@ Test::findTestPath( const Test *test,
TestPath
Test::resolveTestPath( const std::string &testPath ) const
{
- Test *mutableThis = CPPUNIT_CONST_CAST( Test *, this );
+ Test *mutableThis = const_cast<Test*>( this );
return TestPath( mutableThis, testPath );
}