diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-04-19 09:54:19 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-04-19 09:54:19 +0000 |
| commit | 626e37841cfedef589fecb975876e7d22986cfb7 (patch) | |
| tree | 1fcf8aa0383ffde9d9bd2a7a20aa60ae8de65e13 /src/cppunit | |
| parent | d564cf8e0506bbc2c8c39ebbfb6d913d140afa6e (diff) | |
| download | cppunit-626e37841cfedef589fecb975876e7d22986cfb7.tar.gz | |
Configure.
configure.in: added some makefile.am
* contrib/readme.txt: updated.
* contrib/bc5/bc5-makefile.zip: added borland 5.5 makefile. Contributed by
project cuppa.
* src/cppunit/TypeInfoHelper.cpp: fixed implementation to be more
portable.
Diffstat (limited to 'src/cppunit')
| -rw-r--r-- | src/cppunit/TypeInfoHelper.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/cppunit/TypeInfoHelper.cpp b/src/cppunit/TypeInfoHelper.cpp index cf0a8c1..a3fff08 100644 --- a/src/cppunit/TypeInfoHelper.cpp +++ b/src/cppunit/TypeInfoHelper.cpp @@ -11,17 +11,12 @@ namespace CppUnit { std::string TypeInfoHelper::getClassName( const std::type_info &info ) { - static std::string classPrefix( "class " ); - std::string name( info.name() ); + static std::string classPrefix( "class " ); + std::string name( info.name() ); - bool has_class_prefix = 0 == -#if CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST - name.compare( classPrefix, 0, classPrefix.length() ); -#else - name.compare( 0, classPrefix.length(), classPrefix ); -#endif - - return has_class_prefix ? name.substr( classPrefix.length() ) : name; + if ( name.substr( 0, classPrefix.length() ) == classPrefix ) + return name.substr( classPrefix.length() ); + return name; } |
