From 50b240fcbd3822e3d7aa9d5fa2c86274393de14a Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 28 Jul 2019 22:42:42 -0400 Subject: [PATCH] VideoCommon/OnScreenDisplay: Default initialize all Message members Provides a deterministic initial state in the case of the default constructor. --- Source/Core/VideoCommon/OnScreenDisplay.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoCommon/OnScreenDisplay.cpp b/Source/Core/VideoCommon/OnScreenDisplay.cpp index a38dc35318..24d8987d99 100644 --- a/Source/Core/VideoCommon/OnScreenDisplay.cpp +++ b/Source/Core/VideoCommon/OnScreenDisplay.cpp @@ -26,14 +26,14 @@ constexpr float WINDOW_PADDING = 4.0f; // Pixels between subsequent OSD message struct Message { - Message() {} + Message() = default; Message(const std::string& text_, u32 timestamp_, u32 color_) : text(text_), timestamp(timestamp_), color(color_) { } std::string text; - u32 timestamp; - u32 color; + u32 timestamp = 0; + u32 color = 0; }; static std::multimap s_messages; static std::mutex s_messages_mutex;