From ba98c2dee5112f97790336e8cc7122db2cc6795b Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 11 Apr 2014 21:18:42 +0200 Subject: Tiny cleanup. --- planning/planning.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'planning/planning.cpp') diff --git a/planning/planning.cpp b/planning/planning.cpp index 6901966..5b162db 100644 --- a/planning/planning.cpp +++ b/planning/planning.cpp @@ -549,8 +549,6 @@ int Planner::do_work(int distro_placements[NUM_DISTRO]) { memcpy(this->distro_placements, distro_placements, sizeof(distro_placements[0]) * NUM_DISTRO); - num_ports_used.clear(); - Inventory total_inv; unsigned total_cost = 0, total_slack = 0; @@ -639,6 +637,7 @@ int Planner::do_work(int distro_placements[NUM_DISTRO]) FILE *patchlist = fopen("patchlist.txt", "w"); FILE *switchlist = fopen("switches.txt", "w"); in_addr_t subnet_address = inet_addr(FIRST_SUBNET_ADDRESS); + num_ports_used.clear(); for (unsigned i = 0; i < switches.size(); ++i) { const auto distro_it = switches_to_distros.find(i); if (distro_it == switches_to_distros.end()) { -- cgit v1.2.3