From 4cb8914ad348cc64ca66ff4158543bcccef1646c Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Fri, 23 Sep 2022 14:57:55 +0200 Subject: [PATCH 1/2] VolumeVerifier: Add missing assignment to summary_text. --- Source/Core/DiscIO/VolumeVerifier.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp index 109b4c2f64..a2810b5919 100644 --- a/Source/Core/DiscIO/VolumeVerifier.cpp +++ b/Source/Core/DiscIO/VolumeVerifier.cpp @@ -1432,8 +1432,9 @@ void VolumeVerifier::Finish() } else { - Common::GetStringT("Problems with low severity were found. They will most " - "likely not prevent the game from running."); + m_result.summary_text = + Common::GetStringT("Problems with low severity were found. They will most " + "likely not prevent the game from running."); } break; case Severity::Medium: From 9860b68b9c760d88c5cdb3bd6bb28f28cdd9191f Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Fri, 23 Sep 2022 14:58:18 +0200 Subject: [PATCH 2/2] Common: Add [[nodiscard]] to GetStringT(). --- Source/Core/Common/MsgHandler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/MsgHandler.h b/Source/Core/Common/MsgHandler.h index e3ed2c80db..23f8e9036d 100644 --- a/Source/Core/Common/MsgHandler.h +++ b/Source/Core/Common/MsgHandler.h @@ -29,7 +29,7 @@ using StringTranslator = std::string (*)(const char* text); void RegisterMsgAlertHandler(MsgAlertHandler handler); void RegisterStringTranslator(StringTranslator translator); -std::string GetStringT(const char* string); +[[nodiscard]] std::string GetStringT(const char* string); bool MsgAlertFmtImpl(bool yes_no, MsgType style, Common::Log::LogType log_type, const char* file, int line, fmt::string_view format, const fmt::format_args& args);