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/BKE_node.h
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/BKE_node.h')
-rw-r--r--source/blender/blenkernel/BKE_node.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 776845b4c99..85699e4c28d 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -285,7 +285,7 @@ typedef struct bNodeType {
*/
void (*labelfunc)(struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen);
/** Optional custom resize handle polling. */
- NodeResizeDirection (*resize_area_func)(struct bNode *node, int x, int y);
+ NodeResizeDirection (*resize_area_func)(const struct bNode *node, int x, int y);
/** Optional selection area polling. */
int (*select_area_func)(struct bNode *node, int x, int y);
/** Optional tweak area polling (for grabbing). */
@@ -555,7 +555,7 @@ void ntreeInterfaceTypeUpdate(struct bNodeTree *ntree);
struct bNodeType *nodeTypeFind(const char *idname);
void nodeRegisterType(struct bNodeType *ntype);
void nodeUnregisterType(struct bNodeType *ntype);
-bool nodeTypeUndefined(struct bNode *node);
+bool nodeTypeUndefined(const struct bNode *node);
struct GHashIterator *nodeTypeGetIterator(void);
/* Helper macros for iterating over node types. */