Cleanup: move C++ declarations to separate .hh header

This commit is contained in:
2022-11-25 12:18:10 +01:00
parent 826535979a
commit 60ad5f49fa
4 changed files with 24 additions and 19 deletions

View File

@@ -176,20 +176,3 @@ bool ED_space_node_color_sample(struct Main *bmain,
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
/* node_relationships.cc */
namespace blender::ed::space_node {
void node_insert_on_link_flags_set(SpaceNode &snode, const ARegion &region);
/**
* Assumes link with #NODE_LINKFLAG_HILITE set.
*/
void node_insert_on_link_flags(Main &bmain, SpaceNode &snode);
void node_insert_on_link_flags_clear(bNodeTree &node_tree);
} // namespace blender::ed::space_node
#endif

View File

@@ -0,0 +1,22 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#pragma once
#include "ED_node.h"
struct SpaceNode;
struct ARegion;
struct Main;
struct bNodeTree;
namespace blender::ed::space_node {
void node_insert_on_link_flags_set(SpaceNode &snode, const ARegion &region);
/**
* Assumes link with #NODE_LINKFLAG_HILITE set.
*/
void node_insert_on_link_flags(Main &bmain, SpaceNode &snode);
void node_insert_on_link_flags_clear(bNodeTree &node_tree);
} // namespace blender::ed::space_node

View File

@@ -23,7 +23,7 @@
#include "BKE_node_tree_update.h"
#include "BKE_screen.h"
#include "ED_node.h" /* own include */
#include "ED_node.hh" /* own include */
#include "ED_render.h"
#include "ED_screen.h"
#include "ED_space_api.h"

View File

@@ -18,7 +18,7 @@
#include "BKE_node_tree_update.h"
#include "BKE_report.h"
#include "ED_node.h"
#include "ED_node.hh"
#include "UI_interface.h"
#include "UI_view2d.h"