Cleanup: Nodes: Remove unnecessary temporary string

Unnecessary since more of the API was converted to use StringRef.

Pull Request: https://projects.blender.org/blender/blender/pulls/145211
This commit is contained in:
Guillermo Venegas
2025-09-07 03:32:39 +02:00
committed by Hans Goudey
parent 34feb2cefd
commit 33f2dd978b
2 changed files with 2 additions and 5 deletions

View File

@@ -82,9 +82,7 @@ bNode *add_node(const bContext &C, const StringRef idname, const float2 &locatio
node_deselect_all(node_tree);
const std::string idname_str = idname;
bNode *node = bke::node_add_node(&C, node_tree, idname_str.c_str());
bNode *node = bke::node_add_node(&C, node_tree, idname);
BLI_assert(node && node->typeinfo);
position_node_based_on_mouse(*node, location);

View File

@@ -98,8 +98,7 @@ void LinkSearchOpParams::connect_socket(bNode &new_node, bNodeSocket &new_socket
bNode &LinkSearchOpParams::add_node(StringRef idname)
{
std::string idname_str = idname;
bNode *node = bke::node_add_node(&C, node_tree, idname_str.c_str());
bNode *node = bke::node_add_node(&C, node_tree, idname);
BLI_assert(node != nullptr);
added_nodes_.append(node);
return *node;