summaryrefslogtreecommitdiff
path: root/src/tasktree.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tasktree.cc')
-rw-r--r--src/tasktree.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/tasktree.cc b/src/tasktree.cc
index b91c23b..77c8fc8 100644
--- a/src/tasktree.cc
+++ b/src/tasktree.cc
@@ -249,7 +249,6 @@ node_t* TaskTree::createNode(taskid_t id) {
}
void TaskTree::insertChild(node_t* parent, node_t* child) {
-// printf("!!!!! id when node is inserted %d\n", child->data.id);
parent->children.push_back(child);
child->parent = parent;
}
@@ -257,15 +256,12 @@ void TaskTree::insertChild(node_t* parent, node_t* child) {
static void printNode(node_t* node, std::string prefix) {
if(!node) return;
task_t t = node->data;
- printf("%s/%u - %s\n", prefix.c_str(), t.id, t.title.c_str());
+ printf("%s- %u - %s\n", prefix.c_str(), t.id, t.title.c_str());
- char buf[4096];
- sprintf(buf, "%s/%u - %s", prefix.c_str(), t.id, t.title.c_str());
-
NodeList::iterator it;
for(it = node->children.begin(); it != node->children.end(); it++) {
node_t* child = *it;
- printNode(child, buf);
+ printNode(child, " " + prefix);
}
}