Cleanup: Use const arguments
This commit is contained in:
parent
ae1e68f514
commit
d7a2e0b83c
|
@ -685,7 +685,7 @@ void nodeSetSocketAvailability(struct bNodeSocket *sock, bool is_available);
|
|||
int nodeSocketLinkLimit(const struct bNodeSocket *sock);
|
||||
|
||||
/* Node Clipboard */
|
||||
void BKE_node_clipboard_init(struct bNodeTree *ntree);
|
||||
void BKE_node_clipboard_init(const struct bNodeTree *ntree);
|
||||
void BKE_node_clipboard_clear(void);
|
||||
void BKE_node_clipboard_free(void);
|
||||
bool BKE_node_clipboard_validate(void);
|
||||
|
@ -706,8 +706,8 @@ extern const bNodeInstanceKey NODE_INSTANCE_KEY_BASE;
|
|||
extern const bNodeInstanceKey NODE_INSTANCE_KEY_NONE;
|
||||
|
||||
bNodeInstanceKey BKE_node_instance_key(bNodeInstanceKey parent_key,
|
||||
struct bNodeTree *ntree,
|
||||
struct bNode *node);
|
||||
const struct bNodeTree *ntree,
|
||||
const struct bNode *node);
|
||||
|
||||
bNodeInstanceHash *BKE_node_instance_hash_new(const char *info);
|
||||
void BKE_node_instance_hash_free(bNodeInstanceHash *hash, bNodeInstanceValueFP valfreefp);
|
||||
|
|
|
@ -3574,7 +3574,7 @@ typedef struct bNodeClipboard {
|
|||
|
||||
static bNodeClipboard node_clipboard = {{NULL}};
|
||||
|
||||
void BKE_node_clipboard_init(struct bNodeTree *ntree)
|
||||
void BKE_node_clipboard_init(const struct bNodeTree *ntree)
|
||||
{
|
||||
node_clipboard.type = ntree->type;
|
||||
}
|
||||
|
@ -3718,11 +3718,11 @@ static bNodeInstanceKey node_hash_int_str(bNodeInstanceKey hash, const char *str
|
|||
return hash;
|
||||
}
|
||||
|
||||
bNodeInstanceKey BKE_node_instance_key(bNodeInstanceKey parent_key, bNodeTree *ntree, bNode *node)
|
||||
bNodeInstanceKey BKE_node_instance_key(bNodeInstanceKey parent_key,
|
||||
const bNodeTree *ntree,
|
||||
const bNode *node)
|
||||
{
|
||||
bNodeInstanceKey key;
|
||||
|
||||
key = node_hash_int_str(parent_key, ntree->id.name + 2);
|
||||
bNodeInstanceKey key = node_hash_int_str(parent_key, ntree->id.name + 2);
|
||||
|
||||
if (node) {
|
||||
key = node_hash_int_str(key, node->name);
|
||||
|
|
Loading…
Reference in New Issue