Skip to content

Commit 16d5671

Browse files
author
xanatos
committed
If (for example) the new max_size must be 5 then at the end the queue.size() must be <= 5, so the exit condition must be <=, so the continuing condition must be > (and not >= as it was).
1 parent 4c6b210 commit 16d5671

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mruset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ template <typename T> class mruset
5151
size_type max_size(size_type s)
5252
{
5353
if (s)
54-
while (queue.size() >= s)
54+
while (queue.size() > s)
5555
{
5656
set.erase(queue.front());
5757
queue.pop_front();

0 commit comments

Comments
 (0)