1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Fonts: fixed PVS Studio false positive "expression 'cmd_count != draw_list->CmdBuffer.Size' is always false." (#8720, #8465)

Amend 608dd96
This commit is contained in:
ocornut 2025-06-24 15:24:09 +02:00
parent 0218ddd575
commit 776897d3c9

View file

@ -5705,7 +5705,7 @@ begin:
} }
// Edge case: calling RenderText() with unloaded glyphs triggering texture change. It doesn't happen via ImGui:: calls because CalcTextSize() is always used. // Edge case: calling RenderText() with unloaded glyphs triggering texture change. It doesn't happen via ImGui:: calls because CalcTextSize() is always used.
if (cmd_count != draw_list->CmdBuffer.Size) if (cmd_count != draw_list->CmdBuffer.Size) //-V547
{ {
IM_ASSERT(draw_list->CmdBuffer[draw_list->CmdBuffer.Size - 1].ElemCount == 0); IM_ASSERT(draw_list->CmdBuffer[draw_list->CmdBuffer.Size - 1].ElemCount == 0);
draw_list->CmdBuffer.pop_back(); draw_list->CmdBuffer.pop_back();