mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-25 00:00:40 +01:00
Fixed uninitialized fields in constructor - wouldn't have caused a problem (thanks Coverity!)
This commit is contained in:
parent
f1f3424cdd
commit
5ea23977f7
@ -1150,6 +1150,10 @@ struct ImGuiDrawContext
|
|||||||
MenuBarOffsetX = 0.0f;
|
MenuBarOffsetX = 0.0f;
|
||||||
StateStorage = NULL;
|
StateStorage = NULL;
|
||||||
LayoutType = ImGuiLayoutType_Vertical;
|
LayoutType = ImGuiLayoutType_Vertical;
|
||||||
|
ItemWidth = 0.0f;
|
||||||
|
ButtonRepeat = false;
|
||||||
|
AllowKeyboardFocus = true;
|
||||||
|
TextWrapPos = 1.0f;
|
||||||
ColorEditMode = ImGuiColorEditMode_RGB;
|
ColorEditMode = ImGuiColorEditMode_RGB;
|
||||||
memset(StackSizesBackup, 0, sizeof(StackSizesBackup));
|
memset(StackSizesBackup, 0, sizeof(StackSizesBackup));
|
||||||
|
|
||||||
@ -1333,6 +1337,7 @@ struct ImGuiState
|
|||||||
ActiveIdIsAlive = false;
|
ActiveIdIsAlive = false;
|
||||||
ActiveIdIsJustActivated = false;
|
ActiveIdIsJustActivated = false;
|
||||||
ActiveIdIsFocusedOnly = false;
|
ActiveIdIsFocusedOnly = false;
|
||||||
|
ActiveIdWindow = NULL;
|
||||||
MovedWindow = NULL;
|
MovedWindow = NULL;
|
||||||
SettingsDirtyTimer = 0.0f;
|
SettingsDirtyTimer = 0.0f;
|
||||||
DisableHideTextAfterDoubleHash = 0;
|
DisableHideTextAfterDoubleHash = 0;
|
||||||
@ -3201,7 +3206,6 @@ bool ImGui::BeginPopupContextVoid(const char* str_id, int button)
|
|||||||
bool ImGui::BeginChild(const char* str_id, const ImVec2& size_arg, bool border, ImGuiWindowFlags extra_flags)
|
bool ImGui::BeginChild(const char* str_id, const ImVec2& size_arg, bool border, ImGuiWindowFlags extra_flags)
|
||||||
{
|
{
|
||||||
ImGuiWindow* window = GetCurrentWindow();
|
ImGuiWindow* window = GetCurrentWindow();
|
||||||
|
|
||||||
ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_ChildWindow;
|
ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_ChildWindow;
|
||||||
|
|
||||||
const ImVec2 content_max = window->Pos + ImGui::GetContentRegionMax();
|
const ImVec2 content_max = window->Pos + ImGui::GetContentRegionMax();
|
||||||
@ -3441,6 +3445,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||||||
g.CurrentWindowStack.push_back(window);
|
g.CurrentWindowStack.push_back(window);
|
||||||
SetCurrentWindow(window);
|
SetCurrentWindow(window);
|
||||||
CheckStacksSize(window, true);
|
CheckStacksSize(window, true);
|
||||||
|
IM_ASSERT(parent_window != NULL || !(flags & ImGuiWindowFlags_ChildWindow));
|
||||||
|
|
||||||
const int current_frame = ImGui::GetFrameCount();
|
const int current_frame = ImGui::GetFrameCount();
|
||||||
bool window_was_visible = (window->LastFrameDrawn == current_frame - 1); // Not using !WasActive because the implicit "Debug" window would always toggle off->on
|
bool window_was_visible = (window->LastFrameDrawn == current_frame - 1); // Not using !WasActive because the implicit "Debug" window would always toggle off->on
|
||||||
@ -10243,7 +10248,6 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref)
|
|||||||
filter.Draw("Filter colors", 200);
|
filter.Draw("Filter colors", 200);
|
||||||
|
|
||||||
ImGui::BeginChild("#colors", ImVec2(0, 300), true);
|
ImGui::BeginChild("#colors", ImVec2(0, 300), true);
|
||||||
|
|
||||||
ImGui::ColorEditMode(edit_mode);
|
ImGui::ColorEditMode(edit_mode);
|
||||||
for (int i = 0; i < ImGuiCol_COUNT; i++)
|
for (int i = 0; i < ImGuiCol_COUNT; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user