From 667ac4aa8f57f94b19c7366ca0d93bc48a409258 Mon Sep 17 00:00:00 2001 From: Johann Muszynski Date: Fri, 23 Feb 2024 08:36:38 +0200 Subject: [PATCH] clang-format code --- example/color_node_editor.cpp | 3 +-- imnodes.cpp | 2 +- imnodes_internal.h | 7 +++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/example/color_node_editor.cpp b/example/color_node_editor.cpp index 82e6670..549bd81 100644 --- a/example/color_node_editor.cpp +++ b/example/color_node_editor.cpp @@ -205,8 +205,7 @@ class ColorNodeEditor // These are driven by the user, so we place this code before rendering the nodes { const bool open_popup = ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) && - ImNodes::IsEditorHovered() && - ImGui::IsKeyReleased(ImGuiKey_A); + ImNodes::IsEditorHovered() && ImGui::IsKeyReleased(ImGuiKey_A); ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(8.f, 8.f)); if (!ImGui::IsAnyItemHovered() && open_popup) diff --git a/imnodes.cpp b/imnodes.cpp index e8bddb8..79a1077 100644 --- a/imnodes.cpp +++ b/imnodes.cpp @@ -1731,7 +1731,7 @@ static inline void CalcMiniMapLayout() const ImVec2 grid_content_size = editor.GridContentBounds.IsInverted() ? max_size : ImFloor(editor.GridContentBounds.GetSize()); - const float grid_content_aspect_ratio = grid_content_size.x / grid_content_size.y; + const float grid_content_aspect_ratio = grid_content_size.x / grid_content_size.y; mini_map_size = ImFloor( grid_content_aspect_ratio > max_size_aspect_ratio ? ImVec2(max_size.x, max_size.x / grid_content_aspect_ratio) diff --git a/imnodes_internal.h b/imnodes_internal.h index 8cfb5d7..bb1ee8f 100644 --- a/imnodes_internal.h +++ b/imnodes_internal.h @@ -264,7 +264,7 @@ struct ImNodesEditorContext // Relative origins of selected nodes for snapping of dragged nodes ImVector SelectedNodeOffsets; // Offset of the primary node origin relative to the mouse cursor. - ImVec2 PrimaryNodeOffset; + ImVec2 PrimaryNodeOffset; ImClickInteractionState ClickInteraction; @@ -285,9 +285,8 @@ struct ImNodesEditorContext ImNodesEditorContext() : Nodes(), Pins(), Links(), Panning(0.f, 0.f), SelectedNodeIndices(), SelectedLinkIndices(), SelectedNodeOffsets(), PrimaryNodeOffset(0.f, 0.f), ClickInteraction(), - MiniMapEnabled(false), MiniMapSizeFraction(0.0f), - MiniMapNodeHoveringCallback(NULL), MiniMapNodeHoveringCallbackUserData(NULL), - MiniMapScaling(0.0f) + MiniMapEnabled(false), MiniMapSizeFraction(0.0f), MiniMapNodeHoveringCallback(NULL), + MiniMapNodeHoveringCallbackUserData(NULL), MiniMapScaling(0.0f) { } };