Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-12-11 18:51:53 +0300
committerHans Goudey <h.goudey@me.com>2021-12-11 18:51:53 +0300
commit23be5fd4499ad92c049f140564df3e32cfe9cea3 (patch)
tree6210af745bb492331c2d3ca5aa500bf16447592a /source/blender/nodes/composite/nodes/node_composite_mask.cc
parent96387a2eff97709f519274aa510942c5eec6b493 (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/nodes/composite/nodes/node_composite_mask.cc')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_mask.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_mask.cc b/source/blender/nodes/composite/nodes/node_composite_mask.cc
index 0c6f70a3837..a1b76d8a423 100644
--- a/source/blender/nodes/composite/nodes/node_composite_mask.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_mask.cc
@@ -46,7 +46,10 @@ static void node_composit_init_mask(bNodeTree *UNUSED(ntree), bNode *node)
node->custom3 = 0.5f; /* shutter */
}
-static void node_mask_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int maxlen)
+static void node_mask_label(const bNodeTree *UNUSED(ntree),
+ const bNode *node,
+ char *label,
+ int maxlen)
{
if (node->id != nullptr) {
BLI_strncpy(label, node->id->name + 2, maxlen);
@@ -63,7 +66,7 @@ void register_node_type_cmp_mask()
cmp_node_type_base(&ntype, CMP_NODE_MASK, "Mask", NODE_CLASS_INPUT, 0);
ntype.declare = blender::nodes::cmp_node_mask_declare;
node_type_init(&ntype, node_composit_init_mask);
- node_type_label(&ntype, node_mask_label);
+ ntype.labelfunc = node_mask_label;
node_type_storage(&ntype, "NodeMask", node_free_standard_storage, node_copy_standard_storage);