@@ -87,7 +87,7 @@ Finder::closer (double d)
8787}
8888
8989void
90- Finder::start (lay::LayoutViewBase *view, unsigned int cv_index, const std::vector<db::DCplxTrans> &trans, const db::DBox ®ion, const db::DBox &scan_region, int min_level, int max_level, const std::vector<int > &layers)
90+ Finder::start (lay::LayoutViewBase *view, unsigned int cv_index, const std::vector<db::DCplxTrans> &trans, const db::DBox ®ion, const db::DBox &scan_region, int min_level, int max_level, const std::vector<unsigned int > &layers)
9191{
9292 const lay::CellView &cv = view->cellview (cv_index);
9393
@@ -100,8 +100,8 @@ Finder::start (lay::LayoutViewBase *view, unsigned int cv_index, const std::vect
100100
101101 if (layers.size () == 1 ) {
102102
103- m_box_convert = db::box_convert <db::CellInst, false > (*mp_layout, ( unsigned int ) layers [0 ]);
104- m_cell_box_convert = db::box_convert <db::Cell, false > (( unsigned int ) layers [0 ]);
103+ m_box_convert = db::box_convert <db::CellInst, false > (*mp_layout, layers [0 ]);
104+ m_cell_box_convert = db::box_convert <db::Cell, false > (layers [0 ]);
105105
106106 } else {
107107
@@ -202,7 +202,7 @@ Finder::do_find (const db::Cell &cell, int level, const db::DCplxTrans &vp, cons
202202 if (level <= m_max_level /* take level of cell itself*/
203203 && cell.is_proxy ()
204204 && m_layers.size () == 1
205- && ( unsigned int ) m_layers [0 ] == mp_layout->guiding_shape_layer ()) {
205+ && m_layers [0 ] == mp_layout->guiding_shape_layer ()) {
206206
207207 // when looking at the guiding shape layer, we can visit this cell as well allowing to find the guiding shapes
208208
@@ -339,15 +339,18 @@ ShapeFinder::find (LayoutViewBase *view, const db::DBox ®ion_mu)
339339
340340 std::sort (lprops.begin (), lprops.end (), LPContextCompareOp ());
341341
342- std::vector<int > layers;
342+ std::vector<unsigned int > layers;
343343 for (std::vector<lay::LayerPropertiesConstIterator>::const_iterator llp = lprops.begin (); llp != lprops.end (); ) {
344344
345345 layers.clear ();
346346
347347 lay::LayerPropertiesConstIterator lp0 = *llp;
348348 LPContextEqualOp eq;
349349 do {
350- layers.push_back ((*llp)->layer_index ());
350+ int li = (*llp)->layer_index ();
351+ if (li >= 0 ) {
352+ layers.push_back ((unsigned int ) li);
353+ }
351354 ++llp;
352355 } while (llp != lprops.end () && eq (lp0, *llp));
353356
@@ -398,16 +401,19 @@ ShapeFinder::find (lay::LayoutViewBase *view, const lay::LayerProperties &lprops
398401 lay::TextInfo text_info (view);
399402 mp_text_info = (m_flags & db::ShapeIterator::Texts) != 0 ? &text_info : 0 ;
400403
401- std::vector<int > layers;
402- layers.push_back (lprops.layer_index ());
404+ std::vector<unsigned int > layers;
405+ int li = lprops.layer_index ();
406+ if (li >= 0 ) {
407+ layers.push_back ((unsigned int ) li);
408+ }
403409 bool result = find_internal (view, lprops.cellview_index (), &lprops.prop_sel (), lprops.inverse_prop_sel (), lprops.hier_levels (), lprops.trans (), layers, region_mu);
404410
405411 mp_progress = 0 ;
406412 return result;
407413}
408414
409- bool
410- ShapeFinder::find_internal (lay::LayoutViewBase *view, unsigned int cv_index, const std::set<db::properties_id_type> *prop_sel, bool inv_prop_sel, const lay::HierarchyLevelSelection &hier_sel, const std::vector<db::DCplxTrans> &trans_mu, const std::vector<int > &layers, const db::DBox ®ion_mu)
415+ bool
416+ ShapeFinder::find_internal (lay::LayoutViewBase *view, unsigned int cv_index, const std::set<db::properties_id_type> *prop_sel, bool inv_prop_sel, const lay::HierarchyLevelSelection &hier_sel, const std::vector<db::DCplxTrans> &trans_mu, const std::vector<unsigned int > &layers, const db::DBox ®ion_mu)
411417{
412418 m_cv_index = cv_index;
413419
@@ -511,13 +517,13 @@ ShapeFinder::visit_cell (const db::Cell &cell, const db::Box &hit_box, const db:
511517
512518 if (! point_mode ()) {
513519
514- for (std::vector<int >::const_iterator l = layers ().begin (); l != layers ().end (); ++l) {
520+ for (std::vector<unsigned int >::const_iterator l = layers ().begin (); l != layers ().end (); ++l) {
515521
516- if (layers ().size () == 1 || (layers ().size () > 1 && cell.bbox (( unsigned int ) *l).touches (scan_box))) {
522+ if (layers ().size () == 1 || (layers ().size () > 1 && cell.bbox (*l).touches (scan_box))) {
517523
518524 checkpoint ();
519525
520- const db::Shapes &shapes = cell.shapes (( unsigned int ) *l);
526+ const db::Shapes &shapes = cell.shapes (*l);
521527
522528 db::ShapeIterator shape = shapes.begin_touching (scan_box, m_flags, mp_prop_sel, m_inv_prop_sel);
523529 while (! shape.at_end ()) {
@@ -563,9 +569,9 @@ ShapeFinder::visit_cell (const db::Cell &cell, const db::Box &hit_box, const db:
563569
564570 } else {
565571
566- for (std::vector<int >::const_iterator l = layers ().begin (); l != layers ().end (); ++l) {
572+ for (std::vector<unsigned int >::const_iterator l = layers ().begin (); l != layers ().end (); ++l) {
567573
568- if (layers ().size () == 1 || (layers ().size () > 1 && cell.bbox (( unsigned int ) *l).touches (scan_box))) {
574+ if (layers ().size () == 1 || (layers ().size () > 1 && cell.bbox (*l).touches (scan_box))) {
569575
570576 checkpoint ();
571577
@@ -793,7 +799,7 @@ InstFinder::find_internal (LayoutViewBase *view, unsigned int cv_index, const db
793799 try {
794800 std::vector<db::DCplxTrans> tv;
795801 tv.push_back (trans_mu);
796- start (view, cv_index, tv, region_mu, region_mu, view->get_min_hier_levels (), view->get_max_hier_levels (), std::vector<int > ());
802+ start (view, cv_index, tv, region_mu, region_mu, view->get_min_hier_levels (), view->get_max_hier_levels (), std::vector<unsigned int > ());
797803 } catch (StopException) {
798804 // ..
799805 }
0 commit comments