fix parse bug I accidentally introduced
This commit is contained in:
parent
f8285f9e4c
commit
9bdff0be14
2 changed files with 8 additions and 5 deletions
|
@ -31,7 +31,7 @@ namespace vxorg {
|
||||||
std::string sample_name {};
|
std::string sample_name {};
|
||||||
std::vector<vxorg::VxHeavenItem*> parent_list {};
|
std::vector<vxorg::VxHeavenItem*> parent_list {};
|
||||||
vxorg::VxHeavenTree::Node* parent = node->parent_node();
|
vxorg::VxHeavenTree::Node* parent = node->parent_node();
|
||||||
|
|
||||||
while(parent) {
|
while(parent) {
|
||||||
if(parent->data().name.empty())
|
if(parent->data().name.empty())
|
||||||
break;
|
break;
|
||||||
|
@ -101,7 +101,7 @@ namespace vxorg {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(split.size() > 4) {
|
if(split.size() > 4) {
|
||||||
auto subvariants = std::span(split.data() + 4, split.size() - 4);
|
auto subvariants = std::span(split.data() + 3, split.size() - 3);
|
||||||
auto leaf = family_leaf;
|
auto leaf = family_leaf;
|
||||||
|
|
||||||
for(auto& subvariant : subvariants) {
|
for(auto& subvariant : subvariants) {
|
||||||
|
|
|
@ -13,11 +13,14 @@ int main() {
|
||||||
|
|
||||||
// walk the resulting tree
|
// walk the resulting tree
|
||||||
tree.walk([](auto* node) {
|
tree.walk([](auto* node) {
|
||||||
auto tab_count = node->parent_count();
|
auto tabulation_level = node->parent_count();
|
||||||
auto& data = node->data();
|
auto& data = node->data();
|
||||||
|
|
||||||
for(auto i = 0; i < tab_count; ++i)
|
if(tabulation_level != 0) {
|
||||||
std::printf("\t");
|
for(auto i = 0; i < tabulation_level; ++i) {
|
||||||
|
std::printf("\t");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(data.name.empty()) {
|
if(data.name.empty()) {
|
||||||
std::printf("(root)\n");
|
std::printf("(root)\n");
|
||||||
|
|
Loading…
Reference in a new issue