Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffi: Move SchemaTreeNode into SchemaTree; Use an optional for the parent ID in the schema tree node to track nodes which have no parents (the root). #554

Merged
merged 11 commits into from
Oct 12, 2024
Prev Previous commit
Next Next commit
Fix const &
LinZhihao-723 committed Oct 10, 2024
commit a82ed4fe128145d2af272d14517ede6138c03ab7
8 changes: 4 additions & 4 deletions components/core/tests/test-ffi_SchemaTree.cpp
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ namespace {
*/
[[nodiscard]] auto insert_node(
SchemaTree& schema_tree,
SchemaTree::NodeLocator locator,
SchemaTree::NodeLocator const& locator,
SchemaTree::Node::id_t expected_id
) -> bool;

@@ -30,13 +30,13 @@ namespace {
*/
[[nodiscard]] auto check_node(
LinZhihao-723 marked this conversation as resolved.
Show resolved Hide resolved
SchemaTree const& schema_tree,
SchemaTree::NodeLocator locator,
SchemaTree::NodeLocator const& locator,
SchemaTree::Node::id_t expected_id
) -> bool;

auto insert_node(
SchemaTree& schema_tree,
SchemaTree::NodeLocator locator,
SchemaTree::NodeLocator const& locator,
SchemaTree::Node::id_t expected_id
) -> bool {
return false == schema_tree.has_node(locator)
@@ -45,7 +45,7 @@ auto insert_node(

auto check_node(
SchemaTree const& schema_tree,
SchemaTree::NodeLocator locator,
SchemaTree::NodeLocator const& locator,
SchemaTree::Node::id_t expected_id
) -> bool {
auto const node_id{schema_tree.try_get_node_id(locator)};