Skip to content

Commit 509500b

Browse files
committed
More constified globals
1 parent fbef829 commit 509500b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

examples/210-Evt-EventListeners.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ void print( std::ostream& os, int const level, std::string const& title, Catch::
307307
// 2. My listener and registration:
308308
//
309309

310-
char const * dashed_line =
310+
char const * const dashed_line =
311311
"--------------------------------------------------------------------------";
312312

313313

src/catch2/catch_translate_exception.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace Catch {
6565
static std::string translatorName( signature ); \
6666
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
6767
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \
68-
namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \
68+
namespace{ const Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \
6969
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION \
7070
static std::string translatorName( signature )
7171

tests/SelfTest/UsageTests/Misc.tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace {
5656

5757
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION
5858
CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS
59-
static AutoTestReg autoTestReg;
59+
static const AutoTestReg autoTestReg;
6060
CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION
6161

6262
template<typename T>

0 commit comments

Comments
 (0)