From 626e37841cfedef589fecb975876e7d22986cfb7 Mon Sep 17 00:00:00 2001 From: Baptiste Lepilleur Date: Fri, 19 Apr 2002 09:54:19 +0000 Subject: 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. --- src/cppunit/TypeInfoHelper.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/cppunit') 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; } -- cgit v1.2.1