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:
authorAnkit <ankitm>2020-06-27 17:48:40 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2020-06-28 12:57:29 +0300
commit340130719f4dd6c6472b8c17717f24c6474ca13e (patch)
tree5e8c9cf9adfd3d7fdc7fc9d4cec5f60ace3c3e64 /source/blender/blenkernel/BKE_node.h
parentdf8847de6daaecafe6b9b090ca061c8252691bef (diff)
Use const in nodeFindSocket
Since the function only iterates over the input members, and matches their identifiers, `bNode *`can be `const`. All other usages of the `nodeFindSocket` use it with other functions that modify the node. (e.g.: ``nodeAddLink` ) But an exporter needs the node to be a `const`, so this creates unnecessary and slightly unsafe design changes. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D8142
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r--source/blender/blenkernel/BKE_node.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 536d04f8bd3..bdcbe2129c8 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -500,7 +500,7 @@ const char *nodeStaticSocketInterfaceType(int type, int subtype);
} \
((void)0)
-struct bNodeSocket *nodeFindSocket(struct bNode *node, int in_out, const char *identifier);
+struct bNodeSocket *nodeFindSocket(const struct bNode *node, int in_out, const char *identifier);
struct bNodeSocket *nodeAddSocket(struct bNodeTree *ntree,
struct bNode *node,
int in_out,