diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-28 21:21:09 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-28 21:34:47 +0200 |
commit | 66db6f4f925965c33bb8b27452c3c210f0b924ce (patch) | |
tree | 96184dec3f57c67a28f212ce3b0a9dbb88d9c817 /AK/Queue.h | |
parent | 731f91f1ab940f134886e034661e62f9862291e0 (diff) | |
download | serenity-66db6f4f925965c33bb8b27452c3c210f0b924ce.zip |
AK: Add Queue::clear() to clear out a Queue.
Diffstat (limited to 'AK/Queue.h')
-rw-r--r-- | AK/Queue.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/AK/Queue.h b/AK/Queue.h index 8ae0fc094b..7a21c51b3a 100644 --- a/AK/Queue.h +++ b/AK/Queue.h @@ -40,6 +40,13 @@ public: return value; } + void clear() + { + m_segments.clear(); + m_index_into_first = 0; + m_size = 0; + } + private: static const int segment_size = 1000; |