mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 20:27:11 +01:00 
			
		
		
		
	Constify section hints in static-analysis mode
This prevents a `misc-const-correctness` in clang-tidy
This commit is contained in:
		| @@ -78,7 +78,7 @@ namespace Catch { | |||||||
|         CATCH_INTERNAL_START_WARNINGS_SUPPRESSION                           \ |         CATCH_INTERNAL_START_WARNINGS_SUPPRESSION                           \ | ||||||
|         CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS                    \ |         CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS                    \ | ||||||
|         CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS                             \ |         CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS                             \ | ||||||
|         if ( [[maybe_unused]] int catchInternalPreviousSectionHint =        \ |         if ( [[maybe_unused]] const int catchInternalPreviousSectionHint =  \ | ||||||
|                  catchInternalSectionHint,                                  \ |                  catchInternalSectionHint,                                  \ | ||||||
|              catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \ |              catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \ | ||||||
|              catchInternalPreviousSectionHint == __LINE__ )                 \ |              catchInternalPreviousSectionHint == __LINE__ )                 \ | ||||||
| @@ -88,7 +88,7 @@ namespace Catch { | |||||||
|         CATCH_INTERNAL_START_WARNINGS_SUPPRESSION                           \ |         CATCH_INTERNAL_START_WARNINGS_SUPPRESSION                           \ | ||||||
|         CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS                    \ |         CATCH_INTERNAL_SUPPRESS_UNUSED_VARIABLE_WARNINGS                    \ | ||||||
|         CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS                             \ |         CATCH_INTERNAL_SUPPRESS_SHADOW_WARNINGS                             \ | ||||||
|         if ( [[maybe_unused]] int catchInternalPreviousSectionHint =        \ |         if ( [[maybe_unused]] const int catchInternalPreviousSectionHint =  \ | ||||||
|                  catchInternalSectionHint,                                  \ |                  catchInternalSectionHint,                                  \ | ||||||
|              catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \ |              catchInternalSectionHint = Catch::Detail::GetNewSectionHint(); \ | ||||||
|              catchInternalPreviousSectionHint == __LINE__ )                 \ |              catchInternalPreviousSectionHint == __LINE__ )                 \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Martin Hořeňovský
					Martin Hořeňovský