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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue