|
@@ -3283,13 +3283,13 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id)
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
-bool ImGui::IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged)
|
|
|
+bool ImGui::IsClippedEx(const ImRect& bb, ImGuiID id)
|
|
|
{
|
|
|
ImGuiContext& g = *GImGui;
|
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
|
if (!bb.Overlaps(window->ClipRect))
|
|
|
if (id == 0 || (id != g.ActiveId && id != g.NavId))
|
|
|
- if (clip_even_when_logged || !g.LogEnabled)
|
|
|
+ if (!g.LogEnabled)
|
|
|
return true;
|
|
|
return false;
|
|
|
}
|
|
@@ -7314,7 +7314,7 @@ void ImGui::ErrorCheckEndFrameRecover(ImGuiErrorLogCallback log_callback, voi
|
|
|
{
|
|
|
// PVS-Studio V1044 is "Loop break conditions do not depend on the number of iterations"
|
|
|
ImGuiContext& g = *GImGui;
|
|
|
- while (g.CurrentWindowStack.Size > 0)
|
|
|
+ while (g.CurrentWindowStack.Size > 0) //-V1044
|
|
|
{
|
|
|
ErrorCheckEndWindowRecover(log_callback, user_data);
|
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
@@ -7360,7 +7360,7 @@ void ImGui::ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, vo
|
|
|
if (log_callback) log_callback(user_data, "Recovered from missing TreePop() in '%s'", window->Name);
|
|
|
TreePop();
|
|
|
}
|
|
|
- while (g.GroupStack.Size > stack_sizes->SizeOfGroupStack)
|
|
|
+ while (g.GroupStack.Size > stack_sizes->SizeOfGroupStack) //-V1044
|
|
|
{
|
|
|
if (log_callback) log_callback(user_data, "Recovered from missing EndGroup() in '%s'", window->Name);
|
|
|
EndGroup();
|
|
@@ -7370,7 +7370,7 @@ void ImGui::ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, vo
|
|
|
if (log_callback) log_callback(user_data, "Recovered from missing PopID() in '%s'", window->Name);
|
|
|
PopID();
|
|
|
}
|
|
|
- while (g.DisabledStackSize > stack_sizes->SizeOfDisabledStack)
|
|
|
+ while (g.DisabledStackSize > stack_sizes->SizeOfDisabledStack) //-V1044
|
|
|
{
|
|
|
if (log_callback) log_callback(user_data, "Recovered from missing EndDisabled() in '%s'", window->Name);
|
|
|
EndDisabled();
|
|
@@ -7380,17 +7380,17 @@ void ImGui::ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, vo
|
|
|
if (log_callback) log_callback(user_data, "Recovered from missing PopStyleColor() in '%s' for ImGuiCol_%s", window->Name, GetStyleColorName(g.ColorStack.back().Col));
|
|
|
PopStyleColor();
|
|
|
}
|
|
|
- while (g.ItemFlagsStack.Size > stack_sizes->SizeOfItemFlagsStack)
|
|
|
+ while (g.ItemFlagsStack.Size > stack_sizes->SizeOfItemFlagsStack) //-V1044
|
|
|
{
|
|
|
if (log_callback) log_callback(user_data, "Recovered from missing PopItemFlag() in '%s'", window->Name);
|
|
|
PopItemFlag();
|
|
|
}
|
|
|
- while (g.StyleVarStack.Size > stack_sizes->SizeOfStyleVarStack)
|
|
|
+ while (g.StyleVarStack.Size > stack_sizes->SizeOfStyleVarStack) //-V1044
|
|
|
{
|
|
|
if (log_callback) log_callback(user_data, "Recovered from missing PopStyleVar() in '%s'", window->Name);
|
|
|
PopStyleVar();
|
|
|
}
|
|
|
- while (g.FocusScopeStack.Size > stack_sizes->SizeOfFocusScopeStack)
|
|
|
+ while (g.FocusScopeStack.Size > stack_sizes->SizeOfFocusScopeStack) //-V1044
|
|
|
{
|
|
|
if (log_callback) log_callback(user_data, "Recovered from missing PopFocusScope() in '%s'", window->Name);
|
|
|
PopFocusScope();
|
|
@@ -7561,7 +7561,7 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg, ImGu
|
|
|
#endif
|
|
|
|
|
|
// Clipping test
|
|
|
- const bool is_clipped = IsClippedEx(bb, id, false);
|
|
|
+ const bool is_clipped = IsClippedEx(bb, id);
|
|
|
if (is_clipped)
|
|
|
return false;
|
|
|
//if (g.IO.KeyAlt) window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255,255,0,120)); // [DEBUG]
|