From d0f5996864f37fd5bf144ee4f760abb8e9f2bd01 Mon Sep 17 00:00:00 2001 From: Javier Espert Real Date: Wed, 27 May 2015 20:56:41 +0100 Subject: [PATCH] Fixed "char * const" versus "const char *" confusions throught the code base. --- README.md | 2 +- docs/own-main.md | 6 +++--- include/catch_runner.hpp | 4 ++-- include/internal/catch_default_main.hpp | 6 +++--- include/internal/catch_version.hpp | 2 +- single_include/catch.hpp | 16 ++++++++-------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 193cf55d..a6bb6113 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![catch logo](catch-logo-small.png) -*v1.1 build 3 (master branch)* +*v1.1 build 4 (master branch)* Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch) diff --git a/docs/own-main.md b/docs/own-main.md index f8c836e6..f3e0c15d 100644 --- a/docs/own-main.md +++ b/docs/own-main.md @@ -16,7 +16,7 @@ If you just need to have code that executes before and/ or after Catch this is t #define CATCH_CONFIG_RUNNER #include "catch.hpp" -int main( int argc, char* const argv[] ) +int main( int argc, char const * argv[] ) { // global setup... @@ -36,7 +36,7 @@ If you still want Catch to process the command line, but you want to programatic #define CATCH_CONFIG_RUNNER #include "catch.hpp" -int main( int argc, char* const argv[] ) +int main( int argc, char const * argv[] ) { Catch::Session session; // There must be exactly once instance @@ -65,4 +65,4 @@ Catch embeds a powerful command line parser which you can also use to parse your --- -[Home](Readme.md) \ No newline at end of file +[Home](Readme.md) diff --git a/include/catch_runner.hpp b/include/catch_runner.hpp index bf03ccdf..9e3a9545 100644 --- a/include/catch_runner.hpp +++ b/include/catch_runner.hpp @@ -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 ) diff --git a/include/internal/catch_default_main.hpp b/include/internal/catch_default_main.hpp index b7b65a5b..8e032349 100644 --- a/include/internal/catch_default_main.hpp +++ b/include/internal/catch_default_main.hpp @@ -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]; diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp index 4a830532..e58d0bc6 100644 --- a/include/internal/catch_version.hpp +++ b/include/internal/catch_version.hpp @@ -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 diff --git a/single_include/catch.hpp b/single_include/catch.hpp index 391c7ab4..64891be9 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -1,6 +1,6 @@ /* - * CATCH v1.1 build 3 (master branch) - * Generated: 2015-05-21 06:16:00.388118 + * CATCH v1.1 build 4 (master branch) + * Generated: 2015-05-27 20:46:59.941284 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. @@ -5681,7 +5681,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 ); @@ -5707,7 +5707,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 ) @@ -6807,7 +6807,7 @@ namespace Catch { namespace Catch { // These numbers are maintained by a script - Version libraryVersion( 1, 1, 3, "master" ); + Version libraryVersion( 1, 1, 4, "master" ); } // #included from: catch_message.hpp @@ -9274,20 +9274,20 @@ namespace Catch { #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];