Commit 496c7632 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a22223af
...@@ -369,6 +369,11 @@ func (A *RangeSet) Equal(B *RangeSet) bool { ...@@ -369,6 +369,11 @@ func (A *RangeSet) Equal(B *RangeSet) bool {
return true return true
} }
// Clear removes all elements from the set.
func (S *RangeSet) Clear() {
S.rangev = nil
}
func (S RangeSet) String() string { func (S RangeSet) String() string {
s := "{" s := "{"
for i, r := range S.rangev { for i, r := range S.rangev {
......
...@@ -732,7 +732,7 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackSet PPTreeSubSet) ...@@ -732,7 +732,7 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackSet PPTreeSubSet)
// XXX k is not there -> hole XXX test // XXX k is not there -> hole XXX test
} }
Bkqueue = SetKey{} Bkqueue.Clear()
tracef("\n") tracef("\n")
tracef(" Akq: %s\n", Akqueue) tracef(" Akq: %s\n", Akqueue)
...@@ -768,7 +768,7 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackSet PPTreeSubSet) ...@@ -768,7 +768,7 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackSet PPTreeSubSet)
a.done = true a.done = true
} }
} }
Akqueue = SetKey{} Akqueue.Clear()
} }
return δ, δtrack, nil return δ, δtrack, nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment