wrote down suspects to keep in mind for tomorrow
This commit is contained in:
parent
c48eff8fc7
commit
3f1182515d
2 changed files with 15 additions and 0 deletions
12
Map.hpp
12
Map.hpp
|
@ -541,9 +541,21 @@ private:
|
||||||
// 1 child
|
// 1 child
|
||||||
else if (erasing->left) {
|
else if (erasing->left) {
|
||||||
*erasing = std::move(*erasing->left);
|
*erasing = std::move(*erasing->left);
|
||||||
|
if (erasing->prev != nullptr) {
|
||||||
|
erasing->prev->next = erasing;
|
||||||
|
}
|
||||||
|
if (erasing->next != nullptr) {
|
||||||
|
erasing->next->prev = erasing;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
} else if (erasing->right) {
|
} else if (erasing->right) {
|
||||||
*erasing = std::move(*erasing->right);
|
*erasing = std::move(*erasing->right);
|
||||||
|
if (erasing->prev != nullptr) {
|
||||||
|
erasing->prev->next = erasing;
|
||||||
|
}
|
||||||
|
if (erasing->next != nullptr) {
|
||||||
|
erasing->next->prev = erasing;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// no children and root
|
// no children and root
|
||||||
|
|
3
suspects
Normal file
3
suspects
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
core_erase
|
||||||
|
|
||||||
|
erase_child
|
Loading…
Reference in a new issue