diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-11 18:51:53 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-11 18:51:53 +0300 |
commit | 23be5fd4499ad92c049f140564df3e32cfe9cea3 (patch) | |
tree | 6210af745bb492331c2d3ca5aa500bf16447592a /source/blender/blenkernel/BKE_node.h | |
parent | 96387a2eff97709f519274aa510942c5eec6b493 (diff) |
Cleanup: Use const arguments
Also remove unnecessary function to set a node type's
label function that duplicated its definition, and make
another function static.
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r-- | source/blender/blenkernel/BKE_node.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 0902e6867a2..777cc807423 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -258,7 +258,10 @@ typedef struct bNodeType { * Optional custom label function for the node header. * \note Used as a fallback when #bNode.label isn't set. */ - void (*labelfunc)(struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen); + void (*labelfunc)(const struct bNodeTree *ntree, + const struct bNode *node, + char *label, + int maxlen); /** Called when the node is updated in the editor. */ void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node); @@ -967,7 +970,7 @@ void BKE_node_preview_set_pixel( /** \name Node Type Access * \{ */ -void nodeLabel(struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen); +void nodeLabel(const struct bNodeTree *ntree, const struct bNode *node, char *label, int maxlen); /** * Get node socket label if it is set. */ @@ -1000,9 +1003,6 @@ void node_type_storage(struct bNodeType *ntype, void (*copyfunc)(struct bNodeTree *dest_ntree, struct bNode *dest_node, const struct bNode *src_node)); -void node_type_label( - struct bNodeType *ntype, - void (*labelfunc)(struct bNodeTree *ntree, struct bNode *, char *label, int maxlen)); void node_type_update(struct bNodeType *ntype, void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node)); void node_type_group_update(struct bNodeType *ntype, |