Переглянути джерело

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

undefined
Sam Hocevar 10 роки тому
джерело
коміт
7cc072d1be
1 змінених файлів з 6 додано та 3 видалено
  1. +6
    -3
      src/lol/base/avl_tree.h

+ 6
- 3
src/lol/base/avl_tree.h Переглянути файл

@@ -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;
}


Завантаження…
Відмінити
Зберегти