Ejemplo n.º 1
0
 int operator()(edge const & e1, edge const & e2) const {
     if (e1.m_fn != e2.m_fn)
        return static_cast<int>(e1.m_fn) - static_cast<int>(e2.m_fn);
     if (e1.m_kind != e2.m_kind)
         return static_cast<int>(e1.m_kind) - static_cast<int>(e2.m_kind);
     return quick_cmp(e1.m_name, e2.m_name);
 }
Ejemplo n.º 2
0
int head_index::cmp::operator()(head_index const & i1, head_index const & i2) const {
    if (i1.m_kind != i2.m_kind || i1.m_kind != expr_kind::Constant)
        return static_cast<int>(i1.m_kind) - static_cast<int>(i2.m_kind);
    else
        return quick_cmp(i1.m_const_name, i2.m_const_name);
}