GUI2/Tree View Node: used std::make_shared when possible
Child nodes were still managed with unique_ptrs in 1.14, so we couldn't use make_unique there. Child nodes are now managed with shared_ptrs here on master.
This commit is contained in:
parent
36b4b24a8f
commit
c1774005a9
1 changed files with 1 additions and 2 deletions
|
@ -70,8 +70,7 @@ public:
|
|||
const std::map<std::string /* widget id */, string_map>& data,
|
||||
const int index = -1)
|
||||
{
|
||||
ptr_t new_node(new tree_view_node(id, this, get_tree_view(), data));
|
||||
return add_child_impl(std::move(new_node), index);
|
||||
return add_child_impl(std::make_shared<tree_view_node>(id, this, get_tree_view(), data), index);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue