-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathfailure_cleanup.cpp
More file actions
20 lines (19 loc) · 886 Bytes
/
failure_cleanup.cpp
File metadata and controls
20 lines (19 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "../classes/Args/Args.h"
#include "../classes/GraphGeneration/GraphListEntry.h"
#include "../classes/GraphGeneration/PlaceRadius.h"
#include "../classes/WaypointQuadtree/WaypointQuadtree.h"
#include <vector>
void failure_cleanup
( WaypointQuadtree& all_waypoints, std::vector<unsigned int>& colocate_counts,
std::list<std::string*>& updates, std::list<std::string*>& systemupdates
)
{ Args::colocationlimit = 0; // silence colocation reports
all_waypoints.final_report(colocate_counts); // destroy quadtree nodes & colocation lists
for (auto g = GraphListEntry::entries.begin(); g < GraphListEntry::entries.end(); g += 3)
{ delete g->regions; // destroy
delete g->systems; // GraphListEntry
delete g->placeradius; // data
}
for (std::string* u : updates) delete[] u; // destroy updates
for (std::string* u : systemupdates) delete[] u; // & systemupdates
}