mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
Fix UB when removing nodes with faulty operator==
This commit is contained in:
parent
2a2cb5c8a0
commit
4c000cc03c
1 changed files with 1 additions and 9 deletions
|
@ -98,15 +98,7 @@ Hy3NodeData& Hy3NodeData::operator=(Hy3GroupLayout layout) {
|
|||
}
|
||||
|
||||
bool Hy3NodeData::operator==(const Hy3NodeData& rhs) const {
|
||||
if (this->type != rhs.type) return false;
|
||||
switch (this->type) {
|
||||
case Hy3NodeData::Window:
|
||||
return this->as_window == rhs.as_window;
|
||||
case Hy3NodeData::Group:
|
||||
return this->as_group.children == rhs.as_group.children;
|
||||
}
|
||||
|
||||
return false;
|
||||
return this == &rhs;
|
||||
}
|
||||
|
||||
bool Hy3Node::operator==(const Hy3Node& rhs) const {
|
||||
|
|
Loading…
Add table
Reference in a new issue