From f4482d3cedec63f3c63b5069be02d2c37a9338ca Mon Sep 17 00:00:00 2001 From: Matt Borgerson Date: Tue, 7 Jan 2025 00:51:12 -0700 Subject: [PATCH] ui: Fix variable shadowing --- ui/xui/popup-menu.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/xui/popup-menu.cc b/ui/xui/popup-menu.cc index 82ae785137..f62b75042a 100644 --- a/ui/xui/popup-menu.cc +++ b/ui/xui/popup-menu.cc @@ -56,13 +56,13 @@ bool PopupMenuCheck(std::string text, std::string icon = "", bool v = false) ImGui::PushFont(g_font_mgr.m_menu_font); const ImVec2 p0 = ImGui::GetItemRectMin(); const ImVec2 p1 = ImGui::GetItemRectMax(); - const char *icon = ICON_FA_CHECK; - ImVec2 ts_icon = ImGui::CalcTextSize(icon); + const char *check_icon = ICON_FA_CHECK; + ImVec2 ts_icon = ImGui::CalcTextSize(check_icon); ImDrawList *draw_list = ImGui::GetWindowDrawList(); ImGuiStyle &style = ImGui::GetStyle(); draw_list->AddText(ImVec2(p1.x - style.FramePadding.x - ts_icon.x, p0.y + (p1.y - p0.y - ts_icon.y) / 2), - ImGui::GetColorU32(ImGuiCol_Text), icon); + ImGui::GetColorU32(ImGuiCol_Text), check_icon); ImGui::PopFont(); } return status;