From 74128855be479f285cafe4c03ba68dd9ee3f8afa Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 26 Jan 2024 09:53:18 -0500 Subject: [PATCH] Cleanup: Fix unused function and variable in node RNA --- source/blender/makesrna/intern/rna_nodetree.cc | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/source/blender/makesrna/intern/rna_nodetree.cc b/source/blender/makesrna/intern/rna_nodetree.cc index 38dba742d25..2275bffc5b2 100644 --- a/source/blender/makesrna/intern/rna_nodetree.cc +++ b/source/blender/makesrna/intern/rna_nodetree.cc @@ -3929,18 +3929,6 @@ static bNode *find_node_by_enum_definition(bNodeTree *ntree, const NodeEnumDefin return nullptr; } -static bNode *find_node_by_enum_item(bNodeTree *ntree, const NodeEnumItem *item) -{ - ntree->ensure_topology_cache(); - for (bNode *node : ntree->nodes_by_type("GeometryNodeMenuSwitch")) { - NodeMenuSwitch *storage = static_cast(node->storage); - if (storage->enum_definition.items().contains_ptr(item)) { - return node; - } - } - return nullptr; -} - static NodeEnumDefinition *find_enum_definition_by_item(bNodeTree *ntree, const NodeEnumItem *item) { ntree->ensure_topology_cache(); @@ -3964,8 +3952,7 @@ static void rna_NodeEnumDefinition_tag_changed(bNodeTree *ntree, NodeEnumDefinit static void rna_NodeEnumItem_update(Main *bmain, Scene * /*scene*/, PointerRNA *ptr) { bNodeTree *ntree = reinterpret_cast(ptr->owner_id); - const NodeEnumItem *item = static_cast(ptr->data); - BLI_assert(find_node_by_enum_item(ntree, item) != nullptr); + BLI_assert(find_node_by_enum_item(ntree, static_cast(ptr->data)) != nullptr); ED_node_tree_propagate_change(nullptr, bmain, ntree); }