mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 23:06:10 +01:00
Constify section hints in static-analysis mode
This prevents a `misc-const-correctness` in clang-tidy
This commit is contained in:
parent
cd60a0301c
commit
d7304f0c41
@ -78,7 +78,7 @@ namespace Catch {
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \
|
||||
if ( [[maybe_unused]] int catchInternalPreviousSectionHint = \
|
||||
if ( [[maybe_unused]] const int catchInternalPreviousSectionHint = \
|
||||
catchInternalSectionHint, \
|
||||
catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \
|
||||
catchInternalPreviousSectionHint == __LINE__ ) \
|
||||
@ -88,7 +88,7 @@ namespace Catch {
|
||||
CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \
|
||||
CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS \
|
||||
CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS \
|
||||
if ( [[maybe_unused]] int catchInternalPreviousSectionHint = \
|
||||
if ( [[maybe_unused]] const int catchInternalPreviousSectionHint = \
|
||||
catchInternalSectionHint, \
|
||||
catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \
|
||||
catchInternalPreviousSectionHint == __LINE__ ) \
|
||||
|
Loading…
Reference in New Issue
Block a user