I keep finding issues but none of them are "the" issue
This commit is contained in:
parent
94f53b7156
commit
c3eaa8783b
1 changed files with 11 additions and 3 deletions
14
Map.hpp
14
Map.hpp
|
@ -138,12 +138,20 @@ template <typename Key_T, typename Mapped_T> class Map {
|
||||||
if (new_child) {
|
if (new_child) {
|
||||||
new_child->parent = this;
|
new_child->parent = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (dir) {
|
switch (dir) {
|
||||||
case Direction::Left:
|
case Direction::Left:
|
||||||
return this->left = std::move(new_child);
|
|
||||||
|
this->left = std::move(new_child);
|
||||||
|
if (this->left) {
|
||||||
|
this->left->parent = this;
|
||||||
|
}
|
||||||
|
return this->left;
|
||||||
case Direction::Right:
|
case Direction::Right:
|
||||||
return this->right = std::move(new_child);
|
this->right = std::move(new_child);
|
||||||
|
if (this->right) {
|
||||||
|
this->right->parent = this;
|
||||||
|
}
|
||||||
|
return this->right;
|
||||||
default:
|
default:
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue