mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
intsets.empty is wrong
This commit is contained in:
@@ -191,9 +191,10 @@ proc `$`*(s: IntSet): string =
|
||||
## The `$` operator for int sets.
|
||||
dollarImpl()
|
||||
|
||||
proc empty*(s: IntSet): bool {.inline.} =
|
||||
proc empty*(s: IntSet): bool {.inline, deprecated.} =
|
||||
## returns true if `s` is empty. This is safe to call even before
|
||||
## the set has been initialized with `initIntSet`.
|
||||
## the set has been initialized with `initIntSet`. Note this never
|
||||
## worked reliably and so is deprecated.
|
||||
result = s.counter == 0
|
||||
|
||||
when isMainModule:
|
||||
|
||||
Reference in New Issue
Block a user