diff options
| author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2021-10-01 02:41:11 +0800 |
|---|---|---|
| committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2021-10-01 02:41:49 +0800 |
| commit | 40fd60a4743a9e587b197a3991bb5f7e451e6b8a (patch) | |
| tree | 6c2741434a6912648d4b3529b538a13631bd2945 /include/cppunit | |
| parent | 6e077ed0705d9bf67f1b643eec367d5815a589b2 (diff) | |
| download | cppunit-40fd60a4743a9e587b197a3991bb5f7e451e6b8a.tar.gz | |
get rid of old casting macros
Diffstat (limited to 'include/cppunit')
| -rw-r--r-- | include/cppunit/Portability.h | 15 | ||||
| -rw-r--r-- | include/cppunit/config/config-msvc6.h | 3 | ||||
| -rw-r--r-- | include/cppunit/extensions/TestSuiteBuilderContext.h | 2 |
3 files changed, 1 insertions, 19 deletions
diff --git a/include/cppunit/Portability.h b/include/cppunit/Portability.h index c2e3bd0..4efa9af 100644 --- a/include/cppunit/Portability.h +++ b/include/cppunit/Portability.h @@ -73,21 +73,6 @@ #endif #endif -// If CPPUNIT_HAVE_CPP_CAST is defined, then c++ style cast will be used, -// otherwise, C style cast are used. -#if defined( CPPUNIT_HAVE_CPP_CAST ) -# define CPPUNIT_CONST_CAST( TargetType, pointer ) \ - const_cast<TargetType>( pointer ) - -# define CPPUNIT_STATIC_CAST( TargetType, pointer ) \ - static_cast<TargetType>( pointer ) -#else // defined( CPPUNIT_HAVE_CPP_CAST ) -# define CPPUNIT_CONST_CAST( TargetType, pointer ) \ - ((TargetType)( pointer )) -# define CPPUNIT_STATIC_CAST( TargetType, pointer ) \ - ((TargetType)( pointer )) -#endif // defined( CPPUNIT_HAVE_CPP_CAST ) - // If CPPUNIT_NO_STD_NAMESPACE is defined then STL are in the global space. // => Define macro 'std' to nothing #if defined(CPPUNIT_NO_STD_NAMESPACE) diff --git a/include/cppunit/config/config-msvc6.h b/include/cppunit/config/config-msvc6.h index 0edc059..ac03c89 100644 --- a/include/cppunit/config/config-msvc6.h +++ b/include/cppunit/config/config-msvc6.h @@ -47,9 +47,6 @@ # define CPPUNIT_COMPILER_LOCATION_FORMAT "%p(%l):" #endif -// Define to 1 if the compiler support C++ style cast. -#define CPPUNIT_HAVE_CPP_CAST 1 - /* define to 1 if the compiler has _finite() */ #ifndef CPPUNIT_HAVE__FINITE #define CPPUNIT_HAVE__FINITE 1 diff --git a/include/cppunit/extensions/TestSuiteBuilderContext.h b/include/cppunit/extensions/TestSuiteBuilderContext.h index f66a203..acea374 100644 --- a/include/cppunit/extensions/TestSuiteBuilderContext.h +++ b/include/cppunit/extensions/TestSuiteBuilderContext.h @@ -135,7 +135,7 @@ public: */ FixtureType *makeFixture() const { - return CPPUNIT_STATIC_CAST( FixtureType *, + return static_cast<FixtureType*>( TestSuiteBuilderContextBase::makeTestFixture() ); } }; |
