提交 3d9d4b9b 编写于 作者: M Megvii Engine Team 提交者: Xinran Xu

fix(sdk/load_and_run): fix ciruclar dependency in DataPaser::Brace

GitOrigin-RevId: d07f8c19b28d2062f8f399aba6ba5290b4191d40
上级 3bd699fd
......@@ -194,9 +194,7 @@ R"__usage__(
struct DataParser {
struct Brace {
Brace() { parent = nullptr; }
std::shared_ptr<Brace> parent;
std::weak_ptr<Brace> parent;
std::vector<std::shared_ptr<Brace>> chidren;
};
......@@ -397,7 +395,7 @@ private:
cur->chidren.emplace_back(child);
cur = child;
} else if (c == ']') {
cur = cur->parent;
cur = cur->parent.lock();
} else if (c == ',') {
number_cnt++;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册