aboutsummaryrefslogtreecommitdiffstats
path: root/c_litems.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-15 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-15 20:20:20 +0100
commit302ef8cfa60d2d7c6236e1dd7821750e4e1e8a47 (patch)
tree0bd3082ad6e04c7008f9c4a443ed1abfc665cbdf /c_litems.go
parentcleaner (diff)
downloadhardflip-302ef8cfa60d2d7c6236e1dd7821750e4e1e8a47.tar.gz
hardflip-302ef8cfa60d2d7c6236e1dd7821750e4e1e8a47.tar.bz2
hardflip-302ef8cfa60d2d7c6236e1dd7821750e4e1e8a47.tar.xz
hardflip-302ef8cfa60d2d7c6236e1dd7821750e4e1e8a47.tar.zst
hardflip-302ef8cfa60d2d7c6236e1dd7821750e4e1e8a47.zip
cleaner i guess
Diffstat (limited to '')
-rw-r--r--c_litems.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/c_litems.go b/c_litems.go
index 4aa21d6..86841ca 100644
--- a/c_litems.go
+++ b/c_litems.go
@@ -210,3 +210,12 @@ func (item *ItemsNode) get_next_level() *ItemsNode {
}
return nil
}
+
+func (litems *ItemsList) reset_id() {
+ if litems.head != nil {
+ litems.head.ID = 1
+ }
+ for ptr := litems.head; ptr != nil && ptr.next != nil; ptr = ptr.next {
+ ptr.next.ID = ptr.ID + 1
+ }
+}