mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 20:48:46 +02:00
ImDrawList: Tweaks to make style consistent (using pointers, same local names). Added comments. Should be no-op.
This commit is contained in:
@ -4077,15 +4077,15 @@ static void AddWindowToSortBuffer(ImVector<ImGuiWindow*>* out_sorted_windows, Im
|
||||
|
||||
static void AddDrawListToDrawData(ImVector<ImDrawList*>* out_list, ImDrawList* draw_list)
|
||||
{
|
||||
if (draw_list->CmdBuffer.empty())
|
||||
if (draw_list->CmdBuffer.Size == 0)
|
||||
return;
|
||||
|
||||
// Remove trailing command if unused
|
||||
ImDrawCmd& last_cmd = draw_list->CmdBuffer.back();
|
||||
if (last_cmd.ElemCount == 0 && last_cmd.UserCallback == NULL)
|
||||
ImDrawCmd* curr_cmd = &draw_list->CmdBuffer.back();
|
||||
if (curr_cmd->ElemCount == 0 && curr_cmd->UserCallback == NULL)
|
||||
{
|
||||
draw_list->CmdBuffer.pop_back();
|
||||
if (draw_list->CmdBuffer.empty())
|
||||
if (draw_list->CmdBuffer.Size == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user