Changed branchName to char*, as per #266

This commit is contained in:
Phil Nash 2014-04-18 08:28:52 +01:00
parent cfc37b5fe9
commit 7303b2b60e
3 changed files with 7 additions and 7 deletions

View File

@ -132,7 +132,7 @@ namespace Catch {
std::cout << "\nCatch v" << libraryVersion.majorVersion << "."
<< libraryVersion.minorVersion << " build "
<< libraryVersion.buildNumber;
if( libraryVersion.branchName != "master" )
if( libraryVersion.branchName != std::string( "master" ) )
std::cout << " (" << libraryVersion.branchName << " branch)";
std::cout << "\n";

View File

@ -15,17 +15,17 @@ namespace Catch {
Version( unsigned int _majorVersion,
unsigned int _minorVersion,
unsigned int _buildNumber,
std::string const& _branchName )
char const* const _branchName )
: majorVersion( _majorVersion ),
minorVersion( _minorVersion ),
buildNumber( _buildNumber ),
branchName( _branchName )
{}
const unsigned int majorVersion;
const unsigned int minorVersion;
const unsigned int buildNumber;
const std::string branchName;
unsigned int const majorVersion;
unsigned int const minorVersion;
unsigned int const buildNumber;
char const* const branchName;
private:
void operator=( Version const& );

View File

@ -262,7 +262,7 @@ namespace Catch {
<< " is a Catch v" << libraryVersion.majorVersion << "."
<< libraryVersion.minorVersion << " b"
<< libraryVersion.buildNumber;
if( libraryVersion.branchName != "master" )
if( libraryVersion.branchName != std::string( "master" ) )
stream << " (" << libraryVersion.branchName << ")";
stream << " host application.\n"
<< "Run with -? for options\n\n";