Merge pull request #4326 from kierdavis/fix-4325

Implement clear() for CountTableRef. Fixes #4325.
This commit is contained in:
Andreas Rumpf
2016-06-14 01:57:26 +02:00
committed by GitHub

View File

@@ -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