Stabilize feature order in overzoom (#210)

* Stabilize feature order in overzoom

* I want my sorts to be stable, please

* Revert "[ci] test in debug mode (#202)"

This reverts commit 853ada87b5.

* No need to reinitialize here
This commit is contained in:
Erica Fischer
2024-02-29 10:39:10 -08:00
committed by GitHub
parent d9a5c2eed7
commit 312e1560a3
14 changed files with 33 additions and 26 deletions
+2 -2
View File
@@ -136,7 +136,7 @@ bool find_common_edges(std::vector<serial_feature> &features, int z, int line_de
}
}
std::sort(edges.begin(), edges.end(), edgecmp_ring);
std::stable_sort(edges.begin(), edges.end(), edgecmp_ring);
std::set<draw> necessaries;
// Now mark all the points where the set of rings using the edge on one side
@@ -397,7 +397,7 @@ bool find_common_edges(std::vector<serial_feature> &features, int z, int line_de
}
}
}
std::sort(order.begin(), order.end());
std::stable_sort(order.begin(), order.end());
size_t merged = 0;
for (size_t o = 0; o < order.size(); o++) {