From 1ecc1db226592ea61923fd19ec86ed8bc2109ee9 Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 5 Mar 2020 12:35:01 +0100 Subject: [PATCH] Fix GCC warning --- imgui.cpp | 4 ++-- imgui_internal.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index ef3c3eeb..533216e0 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -11849,7 +11849,7 @@ static void ImGui::DockContextBuildNodesFromSettings(ImGuiContext* ctx, ImGuiDoc else if (node->ParentNode && node->ParentNode->ChildNodes[1] == NULL) node->ParentNode->ChildNodes[1] = node; node->SelectedTabId = settings->SelectedWindowId; - node->SplitAxis = settings->SplitAxis; + node->SplitAxis = (ImGuiAxis)settings->SplitAxis; node->LocalFlags |= (settings->Flags & ImGuiDockNodeFlags_SavedFlagsMask_); // 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.ParentWindowId = (node->IsDockSpace() && node->HostWindow && node->HostWindow->ParentWindow) ? node->HostWindow->ParentWindow->ID : 0; 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.Flags = (node->LocalFlags & ImGuiDockNodeFlags_SavedFlagsMask_); node_settings.Pos = ImVec2ih(node->Pos); diff --git a/imgui_internal.h b/imgui_internal.h index a3c31b1a..2e82ed41 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -1094,7 +1094,7 @@ struct ImGuiDockNode ImVec2 Pos; // Current position 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. - 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] ImGuiDockNodeState State;