Commit daef0a23 authored by Václav Šmilauer's avatar Václav Šmilauer

Fix circular_q::size()

parent 042045b9
...@@ -77,11 +77,11 @@ public: ...@@ -77,11 +77,11 @@ public:
{ {
if (tail_ > head_) if (tail_ > head_)
{ {
return (tail_ - head_) % max_items_; return tail_ - head_;
} }
else else
{ {
return max_items_ - (head_ - tail_ ) % max_items_; return max_items_ - (head_ - tail_ );
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment