From b65c0e27e9f42c9e96714b8c4973417589368787 Mon Sep 17 00:00:00 2001 From: Robert Blaauboer Date: Thu, 10 Nov 2022 12:45:56 +0000 Subject: [PATCH] Make ScopedMessage in INFO logging macro const If users have const correctness checks enabled then this would flagged forcing users to wrap the INFO macro themselves or forego using it altogether. --- src/catch2/catch_message.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/catch2/catch_message.hpp b/src/catch2/catch_message.hpp index e508cf5b2d..4f71f227ba 100644 --- a/src/catch2/catch_message.hpp +++ b/src/catch2/catch_message.hpp @@ -103,7 +103,7 @@ namespace Catch { /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_INFO( macroName, log ) \ - Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) + const Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_UNSCOPED_INFO( macroName, log ) \