Fixed PVS Studio false positive.
This commit is contained in:
parent
7c9f0c148c
commit
2de0a07cd4
@ -8228,7 +8228,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
// Set default BgClickFlags
|
// Set default BgClickFlags
|
||||||
// This is set at the end of this function, so UpdateWindowManualResize()/ClampWindowPos() may use last-frame value if overridden by user code.
|
// This is set at the end of this function, so UpdateWindowManualResize()/ClampWindowPos() may use last-frame value if overridden by user code.
|
||||||
// FIXME: The general intent is that we will later expose config options to default to enable scrolling + select scrolling mouse button.
|
// FIXME: The general intent is that we will later expose config options to default to enable scrolling + select scrolling mouse button.
|
||||||
window->BgClickFlags = (flags & ImGuiWindowFlags_ChildWindow) ? parent_window->BgClickFlags : (g.IO.ConfigWindowsMoveFromTitleBarOnly ? ImGuiWindowBgClickFlags_None : ImGuiWindowBgClickFlags_Move);
|
window->BgClickFlags = (flags & ImGuiWindowFlags_ChildWindow) ? parent_window->BgClickFlags : (g.IO.ConfigWindowsMoveFromTitleBarOnly ? ImGuiWindowBgClickFlags_None : ImGuiWindowBgClickFlags_Move); // -V1004
|
||||||
|
|
||||||
// We fill last item data based on Title Bar/Tab, in order for IsItemHovered() and IsItemActive() to be usable after Begin().
|
// We fill last item data based on Title Bar/Tab, in order for IsItemHovered() and IsItemActive() to be usable after Begin().
|
||||||
// This is useful to allow creating context menus on title bar only, etc.
|
// This is useful to allow creating context menus on title bar only, etc.
|
||||||
|
|||||||
@ -722,6 +722,7 @@ void ImDrawList::_SetTexture(ImTextureRef tex_ref)
|
|||||||
|
|
||||||
void ImDrawList::_SetPixelDensity(float pixel_density)
|
void ImDrawList::_SetPixelDensity(float pixel_density)
|
||||||
{
|
{
|
||||||
|
IM_ASSERT(pixel_density > 0.0f);
|
||||||
_FringeScale = 1.0f / pixel_density;
|
_FringeScale = 1.0f / pixel_density;
|
||||||
_InvFringeScale = pixel_density;
|
_InvFringeScale = pixel_density;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user