AK: Allow overriding the Queue segment size with a template parameter

This commit is contained in:
Andreas Kling 2019-11-03 12:33:51 +01:00
parent 78a744da77
commit 8c45891c80
Notes: sideshowbarker 2024-07-19 11:27:20 +09:00

View file

@ -6,7 +6,7 @@
namespace AK {
template<typename T>
template<typename T, int segment_size = 1000>
class Queue {
public:
Queue() { }
@ -54,8 +54,6 @@ public:
}
private:
static const int segment_size = 1000;
SinglyLinkedList<OwnPtr<Vector<T, segment_size>>> m_segments;
int m_index_into_first { 0 };
int m_size { 0 };