Fix canonical name

why:
  The name clear() is commonly used as reset function.
This commit is contained in:
Jordan Hrycaj 2021-11-25 17:40:29 +00:00
parent a61869c256
commit f97e953c26
No known key found for this signature in database
GPG Key ID: 4101B9BC5A0DB080

View File

@ -64,6 +64,8 @@ export
RbInfo, RbInfo,
RbResult, RbResult,
`isRed=`, # no need to export all of `rbtree_desc` `isRed=`, # no need to export all of `rbtree_desc`
`linkLeft=`,
`linkRight=`,
results results
type type
@ -129,7 +131,7 @@ proc move*[K,V](sl: var SortedSet[K,V]): SortedSet[K,V] =
result.tree = sl.tree result.tree = sl.tree
sl.init sl.init
proc reset*[K,V](sl: var SortedSet[K,V]) = proc clear*[K,V](sl: var SortedSet[K,V]) =
## Reset list descriptor to its inital value. This function also de-registers ## Reset list descriptor to its inital value. This function also de-registers
## and flushes all traversal descriptors of type `SortedSetWalkRef`. ## and flushes all traversal descriptors of type `SortedSetWalkRef`.
sl.tree.rbTreeReset(clup = proc(c: var SortedSetItemRef[K,V]) = c.slstClup) sl.tree.rbTreeReset(clup = proc(c: var SortedSetItemRef[K,V]) = c.slstClup)