From 3a1ef1409750ac2840d235409f539a73a886937b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sat, 11 Mar 2023 21:27:11 +0100 Subject: [PATCH] Use hasMessage() instead of getMessage().empty() --- src/catch2/reporters/catch_reporter_junit.cpp | 2 +- src/catch2/reporters/catch_reporter_sonarqube.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp index 9a9b94af..e7f17342 100644 --- a/src/catch2/reporters/catch_reporter_junit.cpp +++ b/src/catch2/reporters/catch_reporter_junit.cpp @@ -295,7 +295,7 @@ namespace Catch { } } - if( !result.getMessage().empty() ) + if( !result.hasMessage() ) rss << result.getMessage() << '\n'; for( auto const& msg : stats.infoMessages ) if( msg.type == ResultWas::Info ) diff --git a/src/catch2/reporters/catch_reporter_sonarqube.cpp b/src/catch2/reporters/catch_reporter_sonarqube.cpp index dd002b61..dc3f8c82 100644 --- a/src/catch2/reporters/catch_reporter_sonarqube.cpp +++ b/src/catch2/reporters/catch_reporter_sonarqube.cpp @@ -147,7 +147,7 @@ namespace Catch { } } - if (!result.getMessage().empty()) + if (!result.hasMessage()) textRss << result.getMessage() << '\n'; for (auto const& msg : stats.infoMessages)