Skip to content

Commit

Permalink
AK: Add Queue::clear() to clear out a Queue.
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Jul 28, 2019
1 parent 731f91f commit 66db6f4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions AK/Queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ class Queue {
return value;
}

void clear()
{
m_segments.clear();
m_index_into_first = 0;
m_size = 0;
}

private:
static const int segment_size = 1000;

Expand Down

0 comments on commit 66db6f4

Please sign in to comment.