diff --git a/modules/EnergyManager/Market.cpp b/modules/EnergyManager/Market.cpp index dc488041d..439b39070 100644 --- a/modules/EnergyManager/Market.cpp +++ b/modules/EnergyManager/Market.cpp @@ -245,7 +245,7 @@ Market::Market(types::energy::EnergyFlowRequest& _energy_flow_request, const flo // Recursion: create one Market for each child for (auto& flow_child : _energy_flow_request.children) { - _children.emplace_back(std::make_unique(flow_child, _nominal_ac_voltage, this)); + _children.emplace_back(flow_child, _nominal_ac_voltage, this); } } @@ -267,7 +267,7 @@ void Market::get_list_of_evses(std::vector& list) { } for (auto& child : _children) { - child->get_list_of_evses(list); + child.get_list_of_evses(list); } } @@ -278,7 +278,7 @@ std::vector Market::get_list_of_evses() { } for (auto& child : _children) { - child->get_list_of_evses(list); + child.get_list_of_evses(list); } return list; }