Fix GCC warning

This commit is contained in:
ocornut 2020-03-05 12:35:01 +01:00
parent a7ace918fe
commit 1ecc1db226
2 changed files with 3 additions and 3 deletions

View File

@ -11849,7 +11849,7 @@ static void ImGui::DockContextBuildNodesFromSettings(ImGuiContext* ctx, ImGuiDoc
else if (node->ParentNode && node->ParentNode->ChildNodes[1] == NULL) else if (node->ParentNode && node->ParentNode->ChildNodes[1] == NULL)
node->ParentNode->ChildNodes[1] = node; node->ParentNode->ChildNodes[1] = node;
node->SelectedTabId = settings->SelectedWindowId; node->SelectedTabId = settings->SelectedWindowId;
node->SplitAxis = settings->SplitAxis; node->SplitAxis = (ImGuiAxis)settings->SplitAxis;
node->LocalFlags |= (settings->Flags & ImGuiDockNodeFlags_SavedFlagsMask_); node->LocalFlags |= (settings->Flags & ImGuiDockNodeFlags_SavedFlagsMask_);
// Bind host window immediately if it already exist (in case of a rebuild) // Bind host window immediately if it already exist (in case of a rebuild)
@ -14778,7 +14778,7 @@ static void DockSettingsHandler_DockNodeToSettings(ImGuiDockContext* dc, ImGuiDo
node_settings.ParentNodeId = node->ParentNode ? node->ParentNode->ID : 0; node_settings.ParentNodeId = node->ParentNode ? node->ParentNode->ID : 0;
node_settings.ParentWindowId = (node->IsDockSpace() && node->HostWindow && node->HostWindow->ParentWindow) ? node->HostWindow->ParentWindow->ID : 0; node_settings.ParentWindowId = (node->IsDockSpace() && node->HostWindow && node->HostWindow->ParentWindow) ? node->HostWindow->ParentWindow->ID : 0;
node_settings.SelectedWindowId = node->SelectedTabId; node_settings.SelectedWindowId = node->SelectedTabId;
node_settings.SplitAxis = node->IsSplitNode() ? (char)node->SplitAxis : ImGuiAxis_None; node_settings.SplitAxis = (signed char)(node->IsSplitNode() ? node->SplitAxis : ImGuiAxis_None);
node_settings.Depth = (char)depth; node_settings.Depth = (char)depth;
node_settings.Flags = (node->LocalFlags & ImGuiDockNodeFlags_SavedFlagsMask_); node_settings.Flags = (node->LocalFlags & ImGuiDockNodeFlags_SavedFlagsMask_);
node_settings.Pos = ImVec2ih(node->Pos); node_settings.Pos = ImVec2ih(node->Pos);

View File

@ -1094,7 +1094,7 @@ struct ImGuiDockNode
ImVec2 Pos; // Current position ImVec2 Pos; // Current position
ImVec2 Size; // Current size ImVec2 Size; // Current size
ImVec2 SizeRef; // [Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), used to calculate Size. ImVec2 SizeRef; // [Split node only] Last explicitly written-to size (overridden when using a splitter affecting the node), used to calculate Size.
int SplitAxis; // [Split node only] Split axis (X or Y) ImGuiAxis SplitAxis; // [Split node only] Split axis (X or Y)
ImGuiWindowClass WindowClass; // [Root node only] ImGuiWindowClass WindowClass; // [Root node only]
ImGuiDockNodeState State; ImGuiDockNodeState State;