MCPcopy Create free account
hub / github.com/KLayout/klayout / operator<

Method operator<

src/laybasic/laybasic/layLayerProperties.cc:987–1020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

985}
986
987bool
988LayerPropertiesConstIterator::operator< (const LayerPropertiesConstIterator &d) const
989{
990 tl_assert (m_list);
991 tl_assert (m_list == d.m_list);
992
993 size_t uint = m_uint;
994 size_t duint = d.m_uint;
995 if (uint == duint) {
996 return false;
997 }
998
999 if (!m_list) {
1000 return false;
1001 }
1002
1003 LayerPropertiesList::const_iterator iter = m_list->begin_const ();
1004 size_t n = ((m_list->end_const () - m_list->begin_const ()) + 2);
1005
1006 while (true) {
1007 size_t rem = uint % n;
1008 size_t drem = duint % n;
1009 if (rem != drem) {
1010 return rem < drem;
1011 }
1012 uint /= n;
1013 duint /= n;
1014 if (uint == 0 || duint == 0) {
1015 return uint < duint;
1016 }
1017 n = ((iter[rem - 1].end_children () - iter[rem - 1].begin_children ()) + 2);
1018 iter = iter[rem - 1].begin_children ();
1019 }
1020}
1021
1022std::pair<size_t, size_t>
1023LayerPropertiesConstIterator::factor () const

Callers

nothing calls this directly

Calls 4

begin_constMethod · 0.80
end_constMethod · 0.80
end_childrenMethod · 0.45
begin_childrenMethod · 0.45

Tested by

no test coverage detected