diff options
author | Joe <rbo@gmx.us> | 2024-01-05 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-05 20:20:20 +0100 |
commit | 133c9834756328c4314dc74e341bf9589251b947 (patch) | |
tree | 551225eb8b198927747e30361bc9a4edb4a3a59a /c_ldirs.go | |
parent | awy (diff) | |
download | hardflip-133c9834756328c4314dc74e341bf9589251b947.tar.gz hardflip-133c9834756328c4314dc74e341bf9589251b947.tar.bz2 hardflip-133c9834756328c4314dc74e341bf9589251b947.tar.xz hardflip-133c9834756328c4314dc74e341bf9589251b947.tar.zst hardflip-133c9834756328c4314dc74e341bf9589251b947.zip |
turns out we need litems in the end
Diffstat (limited to 'c_ldirs.go')
-rw-r--r-- | c_ldirs.go | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -68,20 +68,15 @@ type DirsList struct { // adds a directory node to the list func (ldirs *DirsList) add_back(node *DirsNode) { - new_node := node - - new_node.ID = global_id + node.ID = global_id if ldirs.head == nil { - ldirs.head = new_node + ldirs.head = node ldirs.last = ldirs.head return } - curr := ldirs.last - // for curr.next != nil { - // curr = curr.next - // } - curr.next = new_node - ldirs.last = curr.next + last := ldirs.last + last.next = node + ldirs.last = last.next } // return the list node with the according id |