Explorar el Código

avl_tree: tiny lint, updating balance at the appropriate moment

undefined
Guillaume Bittoun Sam Hocevar <sam@hocevar.net> hace 9 años
padre
commit
1d71ae9e22
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      src/lol/base/avl_tree.h

+ 2
- 2
src/lol/base/avl_tree.h Ver fichero

@@ -397,6 +397,8 @@ protected:
replacement->m_child[1] = m_child[1];
if (replacement->m_child[1])
replacement->m_child[1]->m_parent_slot = &replacement->m_child[1];

replacement->update_balance();
}
else
*m_parent_slot = nullptr;
@@ -421,8 +423,6 @@ protected:
replacement->m_chain[0]->m_chain[1] = replacement;
if (replacement->m_chain[1])
replacement->m_chain[1]->m_chain[0] = replacement;

replacement->update_balance();
}
else
{


Cargando…
Cancelar
Guardar