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]
features/sdl_renderer3_multiviewports
ocornut ago%!(EXTRA string=9 years)
parent 319e288eef
commit 31852e1d05
  1. 2
      imgui.cpp

@ -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)

Loading…
Cancel
Save