From dc6408a0680cd6bd07764d55485b3d6539913a1e Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Tue, 6 Dec 2022 18:44:29 +0100 Subject: [PATCH] Some cleanup --- src/db/db/dbAsIfFlatRegion.cc | 1 - src/db/db/dbCompoundOperation.cc | 10 +++++----- src/db/db/dbRegionLocalOperations.cc | 9 ++++++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/db/db/dbAsIfFlatRegion.cc b/src/db/db/dbAsIfFlatRegion.cc index be42a4843..11d770c69 100644 --- a/src/db/db/dbAsIfFlatRegion.cc +++ b/src/db/db/dbAsIfFlatRegion.cc @@ -1070,7 +1070,6 @@ AsIfFlatRegion::run_check (db::edge_relation_type rel, bool different_polygons, #if defined(USE_LOCAL_PROCESSOR) bool needs_merged_primary = different_polygons || options.needs_merged (); -needs_merged_primary = true; // @@@ db::RegionIterator polygons (needs_merged_primary ? begin_merged () : begin ()); bool primary_is_merged = ! merged_semantics () || needs_merged_primary || is_merged (); diff --git a/src/db/db/dbCompoundOperation.cc b/src/db/db/dbCompoundOperation.cc index 11122a2ae..3bfbfada9 100644 --- a/src/db/db/dbCompoundOperation.cc +++ b/src/db/db/dbCompoundOperation.cc @@ -1561,7 +1561,7 @@ CompoundRegionCheckOperationNode::CompoundRegionCheckOperationNode (CompoundRegi tl_assert (input == 0); // input is a dummy parameter m_has_other = other->has_external_inputs (); -// @@@ needs a concept to deal with merged/non-merged inputs + // TODO: needs a concept to deal with merged/non-merged inputs m_is_other_merged = other->is_merged (); set_description ("check"); @@ -1588,8 +1588,8 @@ CompoundRegionCheckOperationNode::computed_dist () const void CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *layout, const shape_interactions &interactions, std::vector > &results, size_t max_vertex_count, double area_ratio) const { -// @@@ needs a concept to deal with merged/non-merged primary -bool is_merged = true; + // TODO: needs a concept to deal with merged/non-merged inputs + bool is_merged = true; db::check_local_operation op (m_check, m_different_polygons, is_merged, m_has_other, m_is_other_merged, m_options); tl_assert (results.size () == 1); @@ -1606,8 +1606,8 @@ bool is_merged = true; void CompoundRegionCheckOperationNode::do_compute_local (CompoundRegionOperationCache * /*cache*/, db::Layout *layout, const shape_interactions &interactions, std::vector > &results, size_t max_vertex_count, double area_ratio) const { -// @@@ needs a concept to deal with merged/non-merged primary -bool is_merged = true; + // TODO: needs a concept to deal with merged/non-merged inputs + bool is_merged = true; db::check_local_operation op (m_check, m_different_polygons, is_merged, m_has_other, m_is_other_merged, m_options); tl_assert (results.size () == 1); diff --git a/src/db/db/dbRegionLocalOperations.cc b/src/db/db/dbRegionLocalOperations.cc index f1d543a62..0f439efc7 100644 --- a/src/db/db/dbRegionLocalOperations.cc +++ b/src/db/db/dbRegionLocalOperations.cc @@ -317,7 +317,7 @@ check_local_operation::do_compute_local (db::Layout *layout, const shape ++nn; } -// @@@ Use edges directly + // TODO: Use edges directly polygons.clear (); db::polygon_ref_generator ps (layout, polygons); @@ -402,7 +402,7 @@ check_local_operation::do_compute_local (db::Layout *layout, const shape ++nn; } -// @@@ Use edges directly + // TODO: Use edges directly spolygons.clear (); db::polygon_ref_generator ps (layout, spolygons); @@ -836,7 +836,10 @@ void interacting_local_operation::do_compute_local (db::Layout * /*l } - tl_assert (nstart > 0); + if (nstart == 0) { + // should not happen - but for safety we return here. + return; + } db::InteractionDetector id (m_mode, nstart - 1); id.set_include_touching (m_touching);