[Bf-blender-cvs] [d9d4b9899e8] master: Cleanup: Remove includes in node_util.h header

Hans Goudey noreply at git.blender.org
Mon Dec 13 05:57:40 CET 2021


Commit: d9d4b9899e8b78af6324d4f76b8e69f555bbc49d
Author: Hans Goudey
Date:   Sun Dec 12 22:53:03 2021 -0600
Branches: master
https://developer.blender.org/rBd9d4b9899e8b78af6324d4f76b8e69f555bbc49d

Cleanup: Remove includes in node_util.h header

This ends up including the removed headers in many unnecessary places.
Also, remove unnecessary extern from function definitions.

===================================================================

M	source/blender/editors/space_node/drawnode.cc
M	source/blender/nodes/composite/node_composite_util.hh
M	source/blender/nodes/intern/node_util.h

===================================================================

diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc
index faed0f0fda0..430908f016f 100644
--- a/source/blender/editors/space_node/drawnode.cc
+++ b/source/blender/editors/space_node/drawnode.cc
@@ -2454,7 +2454,6 @@ static void node_composit_buts_planetrackdeform(uiLayout *layout, bContext *C, P
   }
 }
 
-
 static void node_composit_buts_sunbeams(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
 {
   uiItemR(layout, ptr, "source", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, "", ICON_NONE);
diff --git a/source/blender/nodes/composite/node_composite_util.hh b/source/blender/nodes/composite/node_composite_util.hh
index 63576d4109f..04708d0d854 100644
--- a/source/blender/nodes/composite/node_composite_util.hh
+++ b/source/blender/nodes/composite/node_composite_util.hh
@@ -42,8 +42,8 @@
 
 #include "RE_pipeline.h"
 
-/* only for forward declarations */
 #include "NOD_composite.h"
+#include "NOD_socket.h"
 #include "NOD_socket_declarations.hh"
 
 #define CMP_SCALE_MAX 12000
diff --git a/source/blender/nodes/intern/node_util.h b/source/blender/nodes/intern/node_util.h
index 635d5364594..d7da2303088 100644
--- a/source/blender/nodes/intern/node_util.h
+++ b/source/blender/nodes/intern/node_util.h
@@ -23,20 +23,6 @@
 
 #pragma once
 
-#include "DNA_listBase.h"
-
-#include "BLI_utildefines.h"
-
-#include "BKE_node.h"
-
-#include "MEM_guardedalloc.h"
-
-#include "NOD_socket.h"
-
-#include "GPU_material.h" /* For Shader muting GPU code... */
-
-#include "RNA_access.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -56,18 +42,18 @@ typedef struct bNodeExecData {
 
 /**** Storage Data ****/
 
-extern void node_free_curves(struct bNode *node);
-extern void node_free_standard_storage(struct bNode *node);
+void node_free_curves(struct bNode *node);
+void node_free_standard_storage(struct bNode *node);
 
-extern void node_copy_curves(struct bNodeTree *dest_ntree,
-                             struct bNode *dest_node,
-                             const struct bNode *src_node);
-extern void node_copy_standard_storage(struct bNodeTree *dest_ntree,
-                                       struct bNode *dest_node,
-                                       const struct bNode *src_node);
-extern void *node_initexec_curves(struct bNodeExecContext *context,
-                                  struct bNode *node,
-                                  bNodeInstanceKey key);
+void node_copy_curves(struct bNodeTree *dest_ntree,
+                      struct bNode *dest_node,
+                      const struct bNode *src_node);
+void node_copy_standard_storage(struct bNodeTree *dest_ntree,
+                                struct bNode *dest_node,
+                                const struct bNode *src_node);
+void *node_initexec_curves(struct bNodeExecContext *context,
+                           struct bNode *node,
+                           bNodeInstanceKey key);
 
 /**** Updates ****/
 void node_sock_label(struct bNodeSocket *sock, const char *name);



More information about the Bf-blender-cvs mailing list