From 176d8fbe747d63ecf282480e258ad9a174816404 Mon Sep 17 00:00:00 2001 From: omar Date: Wed, 22 Nov 2017 11:02:42 +0100 Subject: [PATCH] Fixed unreferenced variable warnings. --- imgui.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index c074864c3..023662932 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3747,9 +3747,9 @@ bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags ext void ImGui::EndPopup() { - ImGuiWindow* window = GetCurrentWindow(); - IM_ASSERT(window->Flags & ImGuiWindowFlags_Popup); // Mismatched BeginPopup()/EndPopup() calls - IM_ASSERT(GImGui->CurrentPopupStack.Size > 0); + ImGuiContext& g = *GImGui; (void)g; + IM_ASSERT(g.CurrentWindow->Flags & ImGuiWindowFlags_Popup); // Mismatched BeginPopup()/EndPopup() calls + IM_ASSERT(g.CurrentPopupStack.Size > 0); End(); } @@ -4278,7 +4278,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) window->WindowPadding = ImVec2(0.0f, (flags & ImGuiWindowFlags_MenuBar) ? style.WindowPadding.y : 0.0f); const float window_rounding = window->WindowRounding; const float window_border_size = window->WindowBorderSize; - const ImVec2 window_padding = window->WindowPadding; // Calculate auto-fit size, handle automatic resize const ImVec2 size_auto_fit = CalcSizeAutoFit(window);