mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-27 13:55:11 +00:00
Cast this to (void*) in zero-clearing memset calls to fix -Wnontrivial-memcall. Amends for docking (#9247, #8295, #8129, #8135)
This commit is contained in:
@@ -17630,7 +17630,7 @@ struct ImGuiDockNodeSettings
|
||||
ImVec2ih Pos;
|
||||
ImVec2ih Size;
|
||||
ImVec2ih SizeRef;
|
||||
ImGuiDockNodeSettings() { memset(this, 0, sizeof(*this)); SplitAxis = ImGuiAxis_None; }
|
||||
ImGuiDockNodeSettings() { memset((void*)this, 0, sizeof(*this)); SplitAxis = ImGuiAxis_None; }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -18662,7 +18662,7 @@ struct ImGuiDockNodeTreeInfo
|
||||
int CountNodesWithWindows;
|
||||
//ImGuiWindowClass WindowClassForMerges;
|
||||
|
||||
ImGuiDockNodeTreeInfo() { memset(this, 0, sizeof(*this)); }
|
||||
ImGuiDockNodeTreeInfo() { memset((void*)this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
static void DockNodeFindInfo(ImGuiDockNode* node, ImGuiDockNodeTreeInfo* info)
|
||||
|
||||
2
imgui.h
2
imgui.h
@@ -2804,7 +2804,7 @@ struct ImGuiWindowClass
|
||||
bool DockingAlwaysTabBar; // Set to true to enforce single floating windows of this class always having their own docking node (equivalent of setting the global io.ConfigDockingAlwaysTabBar)
|
||||
bool DockingAllowUnclassed; // Set to true to allow windows of this class to be docked/merged with an unclassed window. // FIXME-DOCK: Move to DockNodeFlags override?
|
||||
|
||||
ImGuiWindowClass() { memset(this, 0, sizeof(*this)); ParentViewportId = (ImGuiID)-1; DockingAllowUnclassed = true; }
|
||||
ImGuiWindowClass() { memset((void*)this, 0, sizeof(*this)); ParentViewportId = (ImGuiID)-1; DockingAllowUnclassed = true; }
|
||||
};
|
||||
|
||||
// Data payload for Drag and Drop operations: AcceptDragDropPayload(), GetDragDropPayload()
|
||||
|
||||
@@ -2115,7 +2115,7 @@ struct ImGuiDockContext
|
||||
ImVector<ImGuiDockRequest> Requests;
|
||||
ImVector<ImGuiDockNodeSettings> NodesSettings;
|
||||
bool WantFullRebuild;
|
||||
ImGuiDockContext() { memset(this, 0, sizeof(*this)); }
|
||||
ImGuiDockContext() { memset((void*)this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
#endif // #ifdef IMGUI_HAS_DOCK
|
||||
|
||||
Reference in New Issue
Block a user