mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
Implement clear() for CountTableRef. Fixes #4325.
This commit is contained in:
@@ -754,7 +754,7 @@ proc len*[A](t: CountTable[A]): int =
|
||||
## returns the number of keys in `t`.
|
||||
result = t.counter
|
||||
|
||||
proc clear*[A](t: CountTable[A] | CountTable[A]) =
|
||||
proc clear*[A](t: CountTable[A] | CountTableRef[A]) =
|
||||
## Resets the table so that it is empty.
|
||||
clearImpl()
|
||||
t.counter = 0
|
||||
|
||||
Reference in New Issue
Block a user