From 31852e1d05007f6a880d5249445af6bde3752485 Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 6 Apr 2016 11:11:30 +0200 Subject: [PATCH] Silence borderline warning with -Werror=strict-overflow Error: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Werror=strict-overflow] --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index eb809f2af..9410376f0 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1652,7 +1652,7 @@ ImGuiWindow* ImGui::GetParentWindow() { ImGuiState& g = *GImGui; IM_ASSERT(g.CurrentWindowStack.Size >= 2); - return g.CurrentWindowStack[g.CurrentWindowStack.Size - 2]; + return g.CurrentWindowStack[(unsigned int)g.CurrentWindowStack.Size - 2]; } void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window = NULL)