Misc: fixes zealous MSVC static analyzer warnings + make GetInputSourceName(), GetMouseSourceName() a little more tolerant. (#8876)

This commit is contained in:
ocornut
2025-08-11 11:01:13 +02:00
parent 47c41483bd
commit 1c57dc21c2
3 changed files with 10 additions and 3 deletions

View File

@@ -8883,6 +8883,7 @@ void ImGui::EndMenuBar()
PopClipRect();
PopID();
IM_MSVC_WARNING_SUPPRESS(6011); // Static Analysis false positive "warning C6011: Dereferencing NULL pointer 'window'"
window->DC.MenuBarOffset.x = window->DC.CursorPos.x - window->Pos.x; // Save horizontal position so next append can reuse it. This is kinda equivalent to a per-layer CursorPos.
// FIXME: Extremely confusing, cleanup by (a) working on WorkRect stack system (b) not using a Group confusingly here.