Explorar el Código

base: fix a data loss bug in the avl_tree copy constructor.

undefined
Sam Hocevar hace 10 años
padre
commit
7cc072d1be
Se han modificado 1 ficheros con 6 adiciones y 3 borrados
  1. +6
    -3
      src/lol/base/avl_tree.h

+ 6
- 3
src/lol/base/avl_tree.h Ver fichero

@@ -39,10 +39,13 @@ public:

avl_tree & operator=(avl_tree const & other)
{
clear();
if (&other != this)
{
clear();

for (auto it : other)
insert(it.key, it.value);
for (auto it : other)
insert(it.key, it.value);
}

return *this;
}


Cargando…
Cancelar
Guardar