mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 16:51:22 +08:00
Remove pointer to parent
This commit is contained in:
parent
739bfb9a17
commit
5e1f390655
@ -14,10 +14,9 @@ struct BlocksTree
|
|||||||
{
|
{
|
||||||
profiler::SerilizedBlock* node;
|
profiler::SerilizedBlock* node;
|
||||||
std::vector<BlocksTree > children;
|
std::vector<BlocksTree > children;
|
||||||
BlocksTree* parent;
|
|
||||||
BlocksTree(){
|
BlocksTree(){
|
||||||
node = nullptr;
|
node = nullptr;
|
||||||
parent = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BlocksTree(BlocksTree&& that)
|
BlocksTree(BlocksTree&& that)
|
||||||
@ -36,7 +35,6 @@ struct BlocksTree
|
|||||||
delete node;
|
delete node;
|
||||||
}
|
}
|
||||||
node = nullptr;
|
node = nullptr;
|
||||||
parent = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator < (const BlocksTree& other) const
|
bool operator < (const BlocksTree& other) const
|
||||||
@ -51,12 +49,9 @@ private:
|
|||||||
void makeMove(BlocksTree&& that)
|
void makeMove(BlocksTree&& that)
|
||||||
{
|
{
|
||||||
node = that.node;
|
node = that.node;
|
||||||
parent = that.parent;
|
|
||||||
|
|
||||||
children = std::move(that.children);
|
children = std::move(that.children);
|
||||||
|
|
||||||
that.node = nullptr;
|
that.node = nullptr;
|
||||||
that.parent = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user