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]
This commit is contained in:
ocornut 2016-04-06 11:11:30 +02:00
parent 319e288eef
commit 31852e1d05

View File

@ -1652,7 +1652,7 @@ ImGuiWindow* ImGui::GetParentWindow()
{ {
ImGuiState& g = *GImGui; ImGuiState& g = *GImGui;
IM_ASSERT(g.CurrentWindowStack.Size >= 2); 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) void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window = NULL)