Implement clear() for CountTableRef. Fixes #4325.

This commit is contained in:
Kier Davis
2016-06-13 17:00:32 +01:00
parent 58bb12d5ce
commit acbb03ee5e

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