From 6b23465e91b9b755dd18a5bfa99ca451c9739112 Mon Sep 17 00:00:00 2001 From: "Dr. Dystopia" Date: Thu, 17 Apr 2025 19:19:14 +0200 Subject: [PATCH] Replace `msg` with structured binding - VideoCommon/NetPlayChatUI --- Source/Core/VideoCommon/NetPlayChatUI.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoCommon/NetPlayChatUI.cpp b/Source/Core/VideoCommon/NetPlayChatUI.cpp index c1217d041d..772dd3fe81 100644 --- a/Source/Core/VideoCommon/NetPlayChatUI.cpp +++ b/Source/Core/VideoCommon/NetPlayChatUI.cpp @@ -35,11 +35,10 @@ void NetPlayChatUI::Display() } ImGui::BeginChild("Scrolling", ImVec2(0, -30 * scale), true, ImGuiWindowFlags_None); - for (const auto& msg : m_messages) + for (const auto& [text, color] : m_messages) { - auto c = msg.second; ImGui::PushTextWrapPos(0.0f); - ImGui::TextColored(ImVec4(c[0], c[1], c[2], 1.0f), "%s", msg.first.c_str()); + ImGui::TextColored(ImVec4(color[0], color[1], color[2], 1.0f), "%s", text.c_str()); ImGui::PopTextWrapPos(); }