@@ -1315,7 +1315,7 @@ void PadDirectConnectionStraps::cutShapes(
13151315}
13161316
13171317void PadDirectConnectionStraps::unifyConnectionTypes (
1318- const std::set <PadDirectConnectionStraps*>& straps)
1318+ const std::vector <PadDirectConnectionStraps*>& straps)
13191319{
13201320 std::set<ConnectionType> types;
13211321 for (auto * strap : straps) {
@@ -1415,22 +1415,25 @@ bool PadDirectConnectionStraps::refineShapes(
14151415 return GridComponent::refineShapes (all_shapes, all_obstructions);
14161416 }
14171417
1418- std::set <Shape*> refine;
1418+ std::vector <Shape*> refine;
14191419 for (const auto & [layer, shapes] : getShapes ()) {
14201420 for (const auto & shape : shapes) {
14211421 if (!strapViaIsObstructed (
14221422 shape.get (), all_shapes, all_obstructions, false )) {
14231423 continue ;
14241424 }
14251425
1426- refine.insert (shape.get ());
1426+ refine.push_back (shape.get ());
14271427 }
14281428 }
14291429
14301430 if (refine.empty ()) {
14311431 return false ;
14321432 }
14331433
1434+ const auto [first, last] = std::ranges::unique (refine.begin (), refine.end ());
1435+ refine.erase (first, last);
1436+
14341437 for (auto * refine_shape : refine) {
14351438 std::unique_ptr<Shape> shape = refine_shape->copy ();
14361439 removeShape (refine_shape);
0 commit comments