I keep finding issues but none of them are "the" issue

This commit is contained in:
Pagwin 2024-11-24 01:23:19 -05:00
parent 94f53b7156
commit c3eaa8783b
No known key found for this signature in database
GPG key ID: 81137023740CA260

14
Map.hpp
View file

@ -138,12 +138,20 @@ template <typename Key_T, typename Mapped_T> class Map {
if (new_child) {
new_child->parent = this;
}
switch (dir) {
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:
return this->right = std::move(new_child);
this->right = std::move(new_child);
if (this->right) {
this->right->parent = this;
}
return this->right;
default:
assert(false);
}