Fixed #1172 (for real)
This commit is contained in:
parent
cbe25a41b0
commit
93fa75bb07
6 changed files with 28 additions and 13 deletions
|
|
@ -59,7 +59,7 @@ proc enqueue*[T](q: var TQueue[T], item: T) =
|
|||
|
||||
proc dequeue*[T](q: var TQueue[T]): T =
|
||||
## removes and returns the first element of the queue `q`.
|
||||
assert q.len > 0
|
||||
assert q.count > 0
|
||||
dec q.count
|
||||
result = q.data[q.rd]
|
||||
q.rd = (q.rd + 1) and q.mask
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue