mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
AK: Allow overriding the Queue segment size with a template parameter
This commit is contained in:
parent
78a744da77
commit
8c45891c80
1 changed files with 1 additions and 3 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
namespace AK {
|
namespace AK {
|
||||||
|
|
||||||
template<typename T>
|
template<typename T, int segment_size = 1000>
|
||||||
class Queue {
|
class Queue {
|
||||||
public:
|
public:
|
||||||
Queue() { }
|
Queue() { }
|
||||||
|
@ -54,8 +54,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int segment_size = 1000;
|
|
||||||
|
|
||||||
SinglyLinkedList<OwnPtr<Vector<T, segment_size>>> m_segments;
|
SinglyLinkedList<OwnPtr<Vector<T, segment_size>>> m_segments;
|
||||||
int m_index_into_first { 0 };
|
int m_index_into_first { 0 };
|
||||||
int m_size { 0 };
|
int m_size { 0 };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue