Fixed "char * const" versus "const char *" confusions throught the code base.

This commit is contained in:
Javier Espert Real
2015-05-27 20:56:41 +01:00
parent c51e86819d
commit d0f5996864
6 changed files with 18 additions and 18 deletions

View File

@@ -137,7 +137,7 @@ namespace Catch {
Catch::cout() << "For more detail usage please see the project docs\n" << std::endl;
}
int applyCommandLine( int argc, char* const argv[], OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
int applyCommandLine( int argc, char const * argv[], OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
try {
m_cli.setThrowOnUnrecognisedTokens( unusedOptionBehaviour == OnUnusedOptions::Fail );
m_unusedTokens = m_cli.parseInto( argc, argv, m_configData );
@@ -163,7 +163,7 @@ namespace Catch {
m_config.reset();
}
int run( int argc, char* const argv[] ) {
int run( int argc, char const * argv[] ) {
int returnCode = applyCommandLine( argc, argv );
if( returnCode == 0 )

View File

@@ -11,20 +11,20 @@
#ifndef __OBJC__
// Standard C/C++ main entry point
int main (int argc, char * const argv[]) {
int main (int argc, char const * argv[]) {
return Catch::Session().run( argc, argv );
}
#else // __OBJC__
// Objective-C entry point
int main (int argc, char * const argv[]) {
int main (int argc, char const * argv[]) {
#if !CATCH_ARC_ENABLED
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
#endif
Catch::registerTestMethods();
int result = Catch::Session().run( argc, (char* const*)argv );
int result = Catch::Session().run( argc, argv );
#if !CATCH_ARC_ENABLED
[pool drain];

View File

@@ -13,7 +13,7 @@
namespace Catch {
// These numbers are maintained by a script
Version libraryVersion( 1, 1, 3, "master" );
Version libraryVersion( 1, 1, 4, "master" );
}
#endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED