mirror of https://github.com/KLayout/klayout.git
Fixed #493 (assertion in MacOS build)
Problem was: default-constructed iterators are not the same in clang's STL
This commit is contained in:
parent
e71c0dcb23
commit
41dcb43a99
|
|
@ -31,6 +31,9 @@ namespace db
|
|||
|
||||
static HierarchyBuilderShapeInserter def_inserter;
|
||||
|
||||
static HierarchyBuilder::cell_map_type null_map;
|
||||
static HierarchyBuilder::cell_map_type::const_iterator null_iterator = null_map.end ();
|
||||
|
||||
// -------------------------------------------------------------------------------------------
|
||||
|
||||
int
|
||||
|
|
@ -168,7 +171,7 @@ HierarchyBuilder::reset ()
|
|||
m_cell_map.clear ();
|
||||
m_cells_seen.clear ();
|
||||
m_cell_stack.clear ();
|
||||
m_cm_entry = cell_map_type::const_iterator ();
|
||||
m_cm_entry = null_iterator;
|
||||
m_cm_new_entry = false;
|
||||
}
|
||||
|
||||
|
|
@ -263,14 +266,14 @@ HierarchyBuilder::end (const RecursiveShapeIterator *iter)
|
|||
m_cells_seen.clear ();
|
||||
mp_initial_cell = m_cell_stack.empty () ? 0 : m_cell_stack.front ().second.front ();
|
||||
m_cell_stack.clear ();
|
||||
m_cm_entry = cell_map_type::const_iterator ();
|
||||
m_cm_entry = null_iterator;
|
||||
m_cm_new_entry = false;
|
||||
}
|
||||
|
||||
void
|
||||
HierarchyBuilder::enter_cell (const RecursiveShapeIterator * /*iter*/, const db::Cell * /*cell*/, const db::Box & /*region*/, const box_tree_type * /*complex_region*/)
|
||||
{
|
||||
tl_assert (m_cm_entry != m_cell_map.end () && m_cm_entry != cell_map_type::const_iterator ());
|
||||
tl_assert (m_cm_entry != m_cell_map.end () && m_cm_entry != null_iterator);
|
||||
|
||||
m_cells_seen.insert (m_cm_entry->first);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue