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-04 00:25:17 +0300
committerHans Goudey <h.goudey@me.com>2021-12-04 00:25:17 +0300
commit2d8606b36071dd14290aa8852451535a49d3096d (patch)
tree66674726756a859fa1a1e66e9b8eac84387ba2b8 /source/blender/blenkernel/intern/node.cc
parentca0dbf8c26fb637ad06bd170e4e25d200d7ca0f0 (diff)
Cleanup: Use references in node editor, other improvements
This helps to tell when a pointer is expected to be null, and avoid overly verbose code when dereferencing. This commit also includes a few other cleanups in this area: - Use const in a few places - Use `float2` instead of `float[2]` - Remove some unnecessary includes and old code The change can be continued further in the future.
Diffstat (limited to 'source/blender/blenkernel/intern/node.cc')
-rw-r--r--source/blender/blenkernel/intern/node.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index 4178e7577d8..359dbaab12b 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -1455,7 +1455,7 @@ void nodeUnregisterType(bNodeType *nt)
BLI_ghash_remove(nodetypes_hash, nt->idname, nullptr, node_free_type);
}
-bool nodeTypeUndefined(bNode *node)
+bool nodeTypeUndefined(const bNode *node)
{
return (node->typeinfo == &NodeTypeUndefined) ||
((ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP)) && node->id &&