0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 00:31:02 +08:00

Remove pointer to parent

This commit is contained in:
Sergey Yagovtsev 2016-06-19 22:37:17 +03:00
parent 739bfb9a17
commit 5e1f390655

View File

@ -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;
} }
}; };