Skip to content

Commit 6dcc016

Browse files
committed
Fix action_copy_items_from_list ignoring list name
Fixes #2
1 parent 5cd4cdf commit 6dcc016

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

ACEs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ auto FUSION_API action_copy_items_from_list(RunData *const run_data, ac_param_t
327327

328328
handle_exceptions(run_data, &action_copy_items_from_list, [&]
329329
{
330-
auto const *const list_from_ptr = run_data->current_optional();
330+
auto const *const list_from_ptr = run_data->list_optional(list_from_name);
331331
if(!list_from_ptr)
332332
{
333333
return;

RunData.hpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,31 @@ struct RunData final
2626
{
2727
return data().lists[*current_list_name];
2828
}
29-
auto current_optional() noexcept
29+
auto list_optional(lSDK::string_view_t const name) noexcept
3030
-> Data::list_t * //non-owning, optional
3131
{
3232
if(global_data_name)
3333
{
3434
if(auto const it = Data::global.find(*global_data_name); it != end(Data::global))
3535
{
36-
if(auto const jt = it->second.lists.find(*current_list_name); jt != end(it->second.lists))
36+
if(auto const jt = it->second.lists.find(name); jt != end(it->second.lists))
3737
{
3838
return std::addressof(jt->second);
3939
}
4040
}
4141
return nullptr;
4242
}
43-
if(auto const it = local_data->lists.find(*current_list_name); it != end(local_data->lists))
43+
if(auto const it = local_data->lists.find(name); it != end(local_data->lists))
4444
{
4545
return std::addressof(it->second);
4646
}
4747
return nullptr;
4848
}
49+
auto current_optional() noexcept
50+
-> Data::list_t * //non-owning, optional
51+
{
52+
return list_optional(*current_list_name);
53+
}
4954

5055
RunData() = delete;
5156
RunData(RunData const &) = delete;

0 commit comments

Comments
 (0)