diff --git a/power_grid_model_io_native_c/power_grid_model_io_native/include/power_grid_model_io_native/vnf_converter/vnf_pgm_converter.hpp b/power_grid_model_io_native_c/power_grid_model_io_native/include/power_grid_model_io_native/vnf_converter/vnf_pgm_converter.hpp index be2d082..b4193d5 100644 --- a/power_grid_model_io_native_c/power_grid_model_io_native/include/power_grid_model_io_native/vnf_converter/vnf_pgm_converter.hpp +++ b/power_grid_model_io_native_c/power_grid_model_io_native/include/power_grid_model_io_native/vnf_converter/vnf_pgm_converter.hpp @@ -87,7 +87,7 @@ inline std::string PgmVnfConverter::convert_input() { convert_links_input(); power_grid_model::Container container; - + for (const auto& node : nodes) { container.emplace(node.id(), node); } @@ -121,6 +121,7 @@ inline std::vector PgmVnfConverter::convert_node_input() std::vector nodes; + nodes.reserve(node_inputs.size()); for (const auto& node_input : node_inputs) { nodes.emplace_back(node_input); }